start

package
v1.22.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const EnvPrefix = "FLOW"

Variables

This section is empty.

Functions

func Cmd

func Cmd(config StartConfig) *cobra.Command

func Exit

func Exit(code int, msg string)

Types

type Config

type Config struct {
	Port                         int           `default:"3569" flag:"port,p" info:"port to run RPC server"`
	DebuggerPort                 int           `default:"2345" flag:"debugger-port" info:"port to run the Debugger (Debug Adapter Protocol)"`
	RestPort                     int           `default:"8888" flag:"rest-port" info:"port to run the REST API"`
	AdminPort                    int           `default:"8080" flag:"admin-port" info:"port to run the admin API"`
	Verbose                      bool          `default:"false" flag:"verbose,v" info:"enable verbose logging"`
	LogFormat                    string        `default:"text" flag:"log-format" info:"logging output format. Valid values (text, JSON)"`
	BlockTime                    time.Duration `` /* 147-byte string literal not displayed */
	ServicePrivateKey            string        `flag:"service-priv-key" info:"service account private key"`
	ServicePublicKey             string        `flag:"service-pub-key" info:"service account public key"`
	ServiceKeySigAlgo            string        `default:"ECDSA_P256" flag:"service-sig-algo" info:"service account key signature algorithm"`
	ServiceKeyHashAlgo           string        `default:"SHA3_256" flag:"service-hash-algo" info:"service account key hash algorithm"`
	Init                         bool          `default:"false" flag:"init" info:"whether to initialize a new account profile"`
	GRPCDebug                    bool          `default:"false" flag:"grpc-debug" info:"enable gRPC server reflection for debugging with grpc_cli"`
	RESTDebug                    bool          `default:"false" flag:"rest-debug" info:"enable REST API debugging output"`
	Persist                      bool          `default:"false" flag:"persist" info:"enable persistent storage"`
	Snapshot                     bool          `default:"false" flag:"snapshot" info:"enable snapshots for emulator"`
	DBPath                       string        `default:"./flowdb" flag:"dbpath" info:"path to database directory"`
	ForkCacheDir                 string        `default:".flow-fork-cache" flag:"fork-cache-dir" info:"directory for fork register cache"`
	SimpleAddresses              bool          `default:"false" flag:"simple-addresses" info:"use sequential addresses starting with 0x01"`
	TokenSupply                  string        `default:"1000000000.0" flag:"token-supply" info:"initial FLOW token supply"`
	TransactionExpiry            int           `default:"10" flag:"transaction-expiry" info:"transaction expiry, measured in blocks"`
	StorageLimitEnabled          bool          `default:"true" flag:"storage-limit" info:"enable account storage limit"`
	StorageMBPerFLOW             string        `` /* 175-byte string literal not displayed */
	MinimumAccountBalance        string        `` /* 194-byte string literal not displayed */
	TransactionFeesEnabled       bool          `default:"false" flag:"transaction-fees" info:"enable transaction fees"`
	TransactionMaxGasLimit       int           `default:"9999" flag:"transaction-max-gas-limit" info:"(deprecated) use --transaction-max-compute-limit"`
	ScriptGasLimit               int           `default:"100000" flag:"script-gas-limit" info:"(deprecated) use --script-compute-limit"`
	TransactionMaxComputeLimit   int           `default:"9999" flag:"transaction-max-compute-limit" info:"maximum computation limit for transactions"`
	ScriptComputeLimit           int           `default:"100000" flag:"script-compute-limit" info:"compute limit for scripts"`
	Contracts                    bool          `default:"false" flag:"contracts" info:"deploy common contracts when emulator starts"`
	ContractRemovalEnabled       bool          `` /* 127-byte string literal not displayed */
	SkipTxValidation             bool          `default:"false" flag:"skip-tx-validation" info:"skip verification of transaction signatures and sequence numbers"`
	Host                         string        `default:"" flag:"host" info:"host to listen on for emulator GRPC/REST/Admin servers (default: all interfaces)"`
	ChainID                      string        `` /* 133-byte string literal not displayed */
	RedisURL                     string        `` /* 146-byte string literal not displayed */
	SqliteURL                    string        `default:"" flag:"sqlite-url" info:"sqlite db URL for persisting sqlite storage backend "`
	CoverageReportingEnabled     bool          `default:"false" flag:"coverage-reporting" info:"enable Cadence code coverage reporting"`
	ComputationProfilingEnabled  bool          `default:"false" flag:"computation-profiling" info:"enable Cadence computation profiling"`
	LegacyContractUpgradeEnabled bool          `default:"false" flag:"legacy-upgrade" info:"enable Cadence legacy contract upgrade"`
	ForkHost                     string        `default:"" flag:"fork-host" info:"gRPC access node address (host:port) to fork from"`
	ForkHeight                   uint64        `default:"0" flag:"fork-height" info:"height to pin fork; defaults to latest sealed"`
	CheckpointPath               string        `default:"" flag:"checkpoint-dir" info:"checkpoint directory to load the emulator state from"`
	StateHash                    string        `default:"" flag:"state-hash" info:"state hash of the checkpoint to load the emulator state from"`
	ComputationReportingEnabled  bool          `default:"false" flag:"computation-reporting" info:"enable Cadence computation reporting"`
	ScheduledTransactionsEnabled bool          `default:"true" flag:"scheduled-transactions" info:"enable Cadence scheduled transactions"`
	SetupVMBridgeEnabled         bool          `` /* 126-byte string literal not displayed */
	NumAccounts                  int           `default:"0" flag:"num-accounts" info:"number of precreated accounts at startup"`
	EVMTestHelpersEnabled        bool          `default:"false" flag:"evm-test-helpers" info:"enable EVM test helper functions"`

	// Deprecated hidden aliases
	StartBlockHeight uint64 `default:"0" flag:"start-block-height" info:"(deprecated) use --fork-height"`
	RPCHost          string `default:"" flag:"rpc-host" info:"(deprecated) use --fork-host"`
}

type HttpMiddleware added in v1.4.0

type HttpMiddleware func(http.Handler) http.Handler

type StartConfig added in v1.4.0

type StartConfig struct {
	GetServiceKey   serviceKeyFunc
	RestMiddlewares []HttpMiddleware
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL