Skip to content

Commit

Permalink
Eth keys command fix (#11)
Browse files Browse the repository at this point in the history
* make install for the artifact build in runner

* Revert "Dzmitryhil/cosmos 0.42.1 (#9)" - eth_keys wrong initialisation

* new contract address for the runner
  • Loading branch information
dzmitryhil authored Sep 24, 2021
1 parent 11fdaf7 commit eeccb77
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cmd/onomyd/cmd/eth_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (

const flagPassphrase = "passphrase"

// AddEthKeysCommands registers a sub-tree of commands to interact with
// Commands registers a sub-tree of commands to interact with
// local private key storage.
func AddEthKeysCommands(defaultNodeHome string) *cobra.Command {
func Commands(defaultNodeHome string) *cobra.Command {
cmd := &cobra.Command{
Use: "eth_keys",
Short: "Manage your application's ethereum keys",
Expand Down
3 changes: 1 addition & 2 deletions cmd/onomyd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
GenTxCmd(onomy.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, onomy.DefaultNodeHome),
genutilcli.ValidateGenesisCmd(onomy.ModuleBasics),
AddGenesisAccountCmd(onomy.DefaultNodeHome),
AddEthKeysCommands(onomy.DefaultNodeHome),
tmcli.NewCompletionCmd(rootCmd, true),
debug.Cmd(),
)
Expand All @@ -108,7 +107,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) {
queryCommand(),
txCommand(),
keys.Commands(onomy.DefaultNodeHome),
// Commands(onomy.DefaultNodeHome),
Commands(onomy.DefaultNodeHome),
)
}

Expand Down
5 changes: 2 additions & 3 deletions deploy/single-node-runner-rinkeby/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ ENV PATH=$PATH:$GOPATH/bin

# build onomyd artifact
WORKDIR $ONOMY_DIR
RUN make build
# copy binary to bin
RUN cp onomyd /usr/bin/onomyd
RUN make install

# ------------------ orchestrator ------------------

Expand All @@ -47,6 +45,7 @@ RUN curl https://get.starport.network/faucet! | bash

# ------------------ run node ------------------

WORKDIR /root/home
RUN cp -r $ONOMY_DIR/deploy/single-node-runner-rinkeby/scripts scripts
RUN mkdir onomy
RUN cp -r $ONOMY_DIR/deploy/single-node-runner-rinkeby/onomy_home onomy/onomy
Expand Down
6 changes: 3 additions & 3 deletions deploy/single-node-runner-rinkeby/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This home contains testnet chain settings and genesys file of the chain.
***The contract used for the runner***.

```
Gravity deployed at Address - 0x3292d20ADa8d5FEC9719613d6624380A594e7B23
Gravity deployed at Address - 0x8778174A44b74CD75daEeCbC9830D675Cc5C892C
```

## Run
Expand Down Expand Up @@ -140,7 +140,7 @@ The ETC20 coins used in that part are FAU. You can substitute "erc20-address" to
gbt -a onomy client eth-to-cosmos \
--ethereum-key="e0b21b1d80e53f38734a3ed395796956b50c637916ddbb6cedb096b848053d2d" \
--ethereum-rpc="http://0.0.0.0:8545" \
--gravity-contract-address=0x3292d20ADa8d5FEC9719613d6624380A594e7B23 \
--gravity-contract-address=0x8778174A44b74CD75daEeCbC9830D675Cc5C892C \
--token-contract-address=0xFab46E002BbF0b4509813474841E0716E6730136 \
--amount=10 \
--destination=onomy1e6xtwjw9mgmljyrqw6mlw3nrpuz3p79gct73nw
Expand Down Expand Up @@ -190,7 +190,7 @@ The ETC20 coins used in that part are FAU. You can substitute "erc20-address" to
./gbt -a onomy client eth-to-cosmos \
--ethereum-key="e0b21b1d80e53f38734a3ed395796956b50c637916ddbb6cedb096b848053d2d" \
--ethereum-rpc="http://$ETH_HOST:8545" \
--gravity-contract-address=0x3292d20ADa8d5FEC9719613d6624380A594e7B23 \
--gravity-contract-address=0x8778174A44b74CD75daEeCbC9830D675Cc5C892C \
--token-contract-address=0xFab46E002BbF0b4509813474841E0716E6730136 \
--amount=10 \
--destination=onomy1e6xtwjw9mgmljyrqw6mlw3nrpuz3p79gct73nw
Expand Down
8 changes: 4 additions & 4 deletions deploy/single-node-runner-rinkeby/scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ETH_HOST="0.0.0.0"
# Eth node rpc port
ETH_RPC_PORT="8545"

ETH_CONTRACT_ADDRESS=0x3292d20ADa8d5FEC9719613d6624380A594e7B23
ETH_CONTRACT_ADDRESS=0x8778174A44b74CD75daEeCbC9830D675Cc5C892C

# ------------------ Run onomy ------------------

Expand Down Expand Up @@ -72,8 +72,8 @@ geth --rinkeby --syncmode "light" \
GETH_IPC_PATH="/root/.ethereum/rinkeby/geth.ipc"
GETH_CONSOLE="geth --rinkeby attach ipc:$GETH_IPC_PATH console --exec"

# 600 sec to run light node
for i in {1..600}; do
# 600000 sec to run light node
for i in {1..600000}; do
sleep 1
echo "attempt $i to start the eth node"

Expand All @@ -89,7 +89,7 @@ for i in {1..600}; do
continue
fi

if [ $i -eq 600 ]; then
if [ $i -eq 600000 ]; then
echo "timeout for ethereum light node exceed"
exit
fi
Expand Down

0 comments on commit eeccb77

Please sign in to comment.