Commit 2bdb8182 authored by ControlCplusControlV's avatar ControlCplusControlV Committed by GitHub

open up anvil args (#13320)

Co-authored-by: default avatarMatthew Slipper <me@matthewslipper.com>
parent 70e71c23
......@@ -33,18 +33,21 @@ type Runner struct {
}
func New(l1RPCURL string, logger log.Logger) (*Runner, error) {
return NewWithOpts(l1RPCURL, "1000000000", logger)
}
func NewWithOpts(l1RPCURL string, baseFee string, logger log.Logger) (*Runner, error) {
if _, err := exec.LookPath("anvil"); err != nil {
return nil, fmt.Errorf("anvil not found in PATH: %w", err)
}
proc := exec.Command(
"anvil",
"--fork-url", l1RPCURL,
"--port",
"0",
"--base-fee",
"1000000000",
)
args := []string{"--port", "0", "--base-fee", baseFee}
if l1RPCURL != "" {
args = append([]string{"--fork-url", l1RPCURL}, args...)
}
proc := exec.Command("anvil", args...)
stdout, err := proc.StdoutPipe()
if err != nil {
return nil, 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