Commit 74305be2 authored by Mark Tyneway's avatar Mark Tyneway

op-node: cleanup genesis command

parent ac6c0e81
...@@ -3,6 +3,7 @@ package genesis ...@@ -3,6 +3,7 @@ package genesis
import ( import (
"context" "context"
"encoding/json" "encoding/json"
"errors"
"fmt" "fmt"
"math/big" "math/big"
"os" "os"
...@@ -92,11 +93,11 @@ var Subcommands = cli.Commands{ ...@@ -92,11 +93,11 @@ var Subcommands = cli.Commands{
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "deploy-config", Name: "deploy-config",
Usage: "Path to hardhat deploy config file", Usage: "Path to deploy config file",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "deployment-dir", Name: "deployment-dir",
Usage: "Path to deployment directory", Usage: "Path to network deployment directory",
}, },
&cli.StringFlag{ &cli.StringFlag{
Name: "outfile.l2", Name: "outfile.l2",
...@@ -115,7 +116,13 @@ var Subcommands = cli.Commands{ ...@@ -115,7 +116,13 @@ var Subcommands = cli.Commands{
return err 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}) hh, err := hardhat.New(network, nil, []string{depPath})
if err != nil { if err != nil {
return err return err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment