Skip to content

Commit

Permalink
Merge pull request #1578 from onflow/chasefleming/1577
Browse files Browse the repository at this point in the history
Fix gas limit issue automatically running emulator on `flow dev`
  • Loading branch information
chasefleming authored May 6, 2024
2 parents f6ba575 + 85d7e1f commit d2c8455
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions internal/dependencymanager/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package dependencymanager

import (
"fmt"

"github.com/onflow/flow-cli/internal/util"

"github.com/spf13/cobra"
Expand Down
13 changes: 9 additions & 4 deletions internal/super/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import (
"strings"
"syscall"

flowGo "github.com/onflow/flow-go/model/flow"

"github.com/onflow/cadence/runtime/parser"
"github.com/onflow/flow-emulator/server"
"github.com/onflow/flowkit"
Expand Down Expand Up @@ -82,10 +84,13 @@ func dev(
log := zerolog.New(consoleWriter).With().Timestamp().Logger()

emulatorServer := server.NewEmulatorServer(&log, &server.Config{
ServicePublicKey: (*privateKey).PublicKey(),
ServicePrivateKey: *privateKey,
ServiceKeySigAlgo: serviceAccount.Key.SigAlgo(),
ServiceKeyHashAlgo: serviceAccount.Key.HashAlgo(),
ChainID: flowGo.Emulator,
ServicePublicKey: (*privateKey).PublicKey(),
ServicePrivateKey: *privateKey,
ServiceKeySigAlgo: serviceAccount.Key.SigAlgo(),
ServiceKeyHashAlgo: serviceAccount.Key.HashAlgo(),
ScriptGasLimit: 100000,
TransactionMaxGasLimit: 9999,
})

emuErr := emulatorServer.Listen()
Expand Down

0 comments on commit d2c8455

Please sign in to comment.