Skip to content

Commit

Permalink
op-node: cleanup genesis command
Browse files Browse the repository at this point in the history
  • Loading branch information
tynes committed Jul 26, 2023
1 parent ac6c0e8 commit 74305be
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions op-node/cmd/genesis/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package genesis
import (
"context"
"encoding/json"
"errors"
"fmt"
"math/big"
"os"
Expand Down Expand Up @@ -92,11 +93,11 @@ var Subcommands = cli.Commands{
},
&cli.StringFlag{
Name: "deploy-config",
Usage: "Path to hardhat deploy config file",
Usage: "Path to deploy config file",
},
&cli.StringFlag{
Name: "deployment-dir",
Usage: "Path to deployment directory",
Usage: "Path to network deployment directory",
},
&cli.StringFlag{
Name: "outfile.l2",
Expand All @@ -115,7 +116,13 @@ var Subcommands = cli.Commands{
return err
}

depPath, network := filepath.Split(ctx.String("deployment-dir"))
deployDir := ctx.String("deployment-dir")
if deployDir == "" {
return errors.New("Must specify --deployment-dir")
}

log.Info("Deployment directory", "path", deployDir)
depPath, network := filepath.Split(deployDir)
hh, err := hardhat.New(network, nil, []string{depPath})
if err != nil {
return err
Expand Down

0 comments on commit 74305be

Please sign in to comment.