Skip to content

Commit

Permalink
move to local
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Dec 11, 2024
1 parent f1ca865 commit 4a83f5d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package local

import (
"fmt"
Expand All @@ -17,20 +17,26 @@ import (
observertypes "github.com/zeta-chain/node/x/observer/types"
)

const grpcURLFlag = "grpc-url"

func NewGetZetaclientBootstrap() *cobra.Command {
var ConfigureZetaclientBootstrapCmd = &cobra.Command{
Use: "get-zetaclient-bootstrap",
Short: "get bootstrap address book entries for zetaclient",
RunE: getZetaclientBootstrap,
}

ConfigureZetaclientBootstrapCmd.Flags().
String(grpcURLFlag, "zetacore0:9090", "--grpc-url zetacore0:9090")

return ConfigureZetaclientBootstrapCmd
}

func getZetaclientBootstrap(cmd *cobra.Command, _ []string) error {
sdkconfig.SetDefault(true)
grpcURL, _ := cmd.Flags().GetString(grpcURLFlag)
rpcClient, err := rpc.NewGRPCClients(
"zetacore0:9090",
grpcURL,
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithBlock(),
)
Expand Down
2 changes: 2 additions & 0 deletions cmd/zetae2e/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func NewLocalCmd() *cobra.Command {
cmd.Flags().
Bool(flagUpgradeContracts, false, "set to true to upgrade Gateways and ERC20Custody contracts during setup for ZEVM and EVM")

cmd.AddCommand(NewGetZetaclientBootstrap())

return cmd
}

Expand Down
1 change: 0 additions & 1 deletion cmd/zetae2e/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func NewRootCmd() *cobra.Command {
NewStressTestCmd(),
NewInitCmd(),
NewSetupBitcoinCmd(),
NewGetZetaclientBootstrap(),
)

return cmd
Expand Down
2 changes: 1 addition & 1 deletion contrib/localnet/scripts/start-zetaclientd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RELAYER_KEY_PATH="$HOME/.zetacored/relayer-keys"
mkdir -p "${RELAYER_KEY_PATH}"

mkdir -p "$HOME/.tss/"
zetae2e get-zetaclient-bootstrap > "$HOME/.tss/address_book.seed"
zetae2e local get-zetaclient-bootstrap > "$HOME/.tss/address_book.seed"

MYIP=$(/sbin/ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)

Expand Down

0 comments on commit 4a83f5d

Please sign in to comment.