55 lines
1.6 KiB
Nim
55 lines
1.6 KiB
Nim
|
# Nimbus
|
||
|
# Copyright (c) 2023-2024 Status Research & Development GmbH
|
||
|
# Licensed and distributed under either of
|
||
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||
|
|
||
|
{.push raises: [].}
|
||
|
|
||
|
import
|
||
|
confutils, confutils/std/net,
|
||
|
nimcrypto/hash,
|
||
|
../../logging
|
||
|
|
||
|
export net
|
||
|
|
||
|
type
|
||
|
StateBridgeCmd* = enum
|
||
|
noCommand
|
||
|
|
||
|
StateBridgeConf* = object
|
||
|
# Logging
|
||
|
logLevel* {.
|
||
|
desc: "Sets the log level"
|
||
|
defaultValue: "INFO"
|
||
|
name: "log-level" .}: string
|
||
|
|
||
|
logStdout* {.
|
||
|
hidden
|
||
|
desc: "Specifies what kind of logs should be written to stdout (auto, colors, nocolors, json)"
|
||
|
defaultValueDesc: "auto"
|
||
|
defaultValue: StdoutLogKind.Auto
|
||
|
name: "log-format" .}: StdoutLogKind
|
||
|
|
||
|
# Portal JSON-RPC API server to connect to
|
||
|
rpcAddress* {.
|
||
|
desc: "Listening address of the Portal JSON-RPC server"
|
||
|
defaultValue: "127.0.0.1"
|
||
|
name: "rpc-address" .}: string
|
||
|
|
||
|
rpcPort* {.
|
||
|
desc: "Listening port of the Portal JSON-RPC server"
|
||
|
defaultValue: 8545
|
||
|
name: "rpc-port" .}: Port
|
||
|
|
||
|
dataDir* {.
|
||
|
desc: "Data directory to lookup state data. Should point to the directory with json files generated by https://github.com/morph-dev/young-ethereum e.g. ./vendor/portal-spec-tests/tests/mainnet/state/"
|
||
|
name: "data-dir".}: string
|
||
|
|
||
|
case cmd* {.
|
||
|
command
|
||
|
defaultValue: noCommand .}: StateBridgeCmd
|
||
|
of noCommand:
|
||
|
discard
|