TARAXA
taraxa::cli::Config Class Reference

#include <config.hpp>

Collaboration diagram for taraxa::cli::Config:

Public Types

enum class  ChainIdType { Mainnet = 841 , Testnet , Devnet , LastNetworkId }
 

Public Member Functions

 Config (int argc, const char *argv[])
 
bool nodeConfigured ()
 
FullNodeConfig getNodeConfiguration ()
 

Static Public Attributes

static constexpr ChainIdType DEFAULT_CHAIN_ID = ChainIdType::Mainnet
 

Protected Member Functions

std::string dirNameFromFile (const std::string &file)
 

Protected Attributes

FullNodeConfig node_config_
 
bool node_configured_ = false
 

Static Protected Attributes

static constexpr const char * CONFIG = "config"
 
static constexpr const char * GENESIS = "genesis"
 
static constexpr const char * DATA_DIR = "data-dir"
 
static constexpr const char * CHAIN_ID = "chain-id"
 
static constexpr const char * CHAIN = "chain"
 
static constexpr const char * COMMAND = "command"
 
static constexpr const char * DESTROY_DB = "destroy-db"
 
static constexpr const char * REBUILD_NETWORK = "rebuild-network"
 
static constexpr const char * REBUILD_DB = "rebuild-db"
 
static constexpr const char * REBUILD_DB_PERIOD = "rebuild-db-period"
 
static constexpr const char * REVERT_TO_PERIOD = "revert-to-period"
 
static constexpr const char * LIGHT = "light"
 
static constexpr const char * HELP = "help"
 
static constexpr const char * VERSION = "version"
 
static constexpr const char * WALLET = "wallet"
 
static constexpr const char * PRUNE_STATE_DB = "prune-state-db"
 
static constexpr const char * NODE_COMMAND = "node"
 
static constexpr const char * ACCOUNT_COMMAND = "account"
 
static constexpr const char * VRF_COMMAND = "vrf"
 
static constexpr const char * CONFIG_COMMAND = "config"
 
static constexpr const char * BOOT_NODES = "boot-nodes"
 
static constexpr const char * PUBLIC_IP = "public-ip"
 
static constexpr const char * PORT = "port"
 
static constexpr const char * LOG_CHANNELS = "log-channels"
 
static constexpr const char * LOG_CONFIGURATIONS = "log-configurations"
 
static constexpr const char * BOOT_NODES_APPEND = "boot-nodes-append"
 
static constexpr const char * LOG_CHANNELS_APPEND = "log-channels-append"
 
static constexpr const char * NODE_SECRET = "node-secret"
 
static constexpr const char * VRF_SECRET = "vrf-secret"
 
static constexpr const char * OVERWRITE_CONFIG = "overwrite-config"
 
static constexpr const char * ENABLE_TEST_RPC = "enable-test-rpc"
 
static constexpr const char * ENABLE_DEBUG = "debug"
 
static constexpr const char * MIGRATE_ONLY = "migrate-only"
 
static constexpr const char * FIX_TRX_PERIOD = "fix-transactions-period"
 

Member Enumeration Documentation

◆ ChainIdType

Enumerator
Mainnet 
Testnet 
Devnet 
LastNetworkId 

Constructor & Destructor Documentation

◆ Config()

taraxa::cli::Config::Config ( int  argc,
const char *  argv[] 
)

Member Function Documentation

◆ dirNameFromFile()

std::string taraxa::cli::Config::dirNameFromFile ( const std::string &  file)
protected

◆ getNodeConfiguration()

FullNodeConfig taraxa::cli::Config::getNodeConfiguration ( )

◆ nodeConfigured()

bool taraxa::cli::Config::nodeConfigured ( )

Member Data Documentation

◆ ACCOUNT_COMMAND

constexpr const char* taraxa::cli::Config::ACCOUNT_COMMAND = "account"
staticconstexprprotected

◆ BOOT_NODES

constexpr const char* taraxa::cli::Config::BOOT_NODES = "boot-nodes"
staticconstexprprotected

◆ BOOT_NODES_APPEND

constexpr const char* taraxa::cli::Config::BOOT_NODES_APPEND = "boot-nodes-append"
staticconstexprprotected

◆ CHAIN

constexpr const char* taraxa::cli::Config::CHAIN = "chain"
staticconstexprprotected

◆ CHAIN_ID

constexpr const char* taraxa::cli::Config::CHAIN_ID = "chain-id"
staticconstexprprotected

◆ COMMAND

constexpr const char* taraxa::cli::Config::COMMAND = "command"
staticconstexprprotected

◆ CONFIG

constexpr const char* taraxa::cli::Config::CONFIG = "config"
staticconstexprprotected

◆ CONFIG_COMMAND

constexpr const char* taraxa::cli::Config::CONFIG_COMMAND = "config"
staticconstexprprotected

◆ DATA_DIR

constexpr const char* taraxa::cli::Config::DATA_DIR = "data-dir"
staticconstexprprotected

◆ DEFAULT_CHAIN_ID

constexpr ChainIdType taraxa::cli::Config::DEFAULT_CHAIN_ID = ChainIdType::Mainnet
staticconstexpr

◆ DESTROY_DB

constexpr const char* taraxa::cli::Config::DESTROY_DB = "destroy-db"
staticconstexprprotected

◆ ENABLE_DEBUG

constexpr const char* taraxa::cli::Config::ENABLE_DEBUG = "debug"
staticconstexprprotected

◆ ENABLE_TEST_RPC

constexpr const char* taraxa::cli::Config::ENABLE_TEST_RPC = "enable-test-rpc"
staticconstexprprotected

◆ FIX_TRX_PERIOD

constexpr const char* taraxa::cli::Config::FIX_TRX_PERIOD = "fix-transactions-period"
staticconstexprprotected

◆ GENESIS

constexpr const char* taraxa::cli::Config::GENESIS = "genesis"
staticconstexprprotected

◆ HELP

constexpr const char* taraxa::cli::Config::HELP = "help"
staticconstexprprotected

◆ LIGHT

constexpr const char* taraxa::cli::Config::LIGHT = "light"
staticconstexprprotected

◆ LOG_CHANNELS

constexpr const char* taraxa::cli::Config::LOG_CHANNELS = "log-channels"
staticconstexprprotected

◆ LOG_CHANNELS_APPEND

constexpr const char* taraxa::cli::Config::LOG_CHANNELS_APPEND = "log-channels-append"
staticconstexprprotected

◆ LOG_CONFIGURATIONS

constexpr const char* taraxa::cli::Config::LOG_CONFIGURATIONS = "log-configurations"
staticconstexprprotected

◆ MIGRATE_ONLY

constexpr const char* taraxa::cli::Config::MIGRATE_ONLY = "migrate-only"
staticconstexprprotected

◆ NODE_COMMAND

constexpr const char* taraxa::cli::Config::NODE_COMMAND = "node"
staticconstexprprotected

◆ node_config_

FullNodeConfig taraxa::cli::Config::node_config_
protected

◆ node_configured_

bool taraxa::cli::Config::node_configured_ = false
protected

◆ NODE_SECRET

constexpr const char* taraxa::cli::Config::NODE_SECRET = "node-secret"
staticconstexprprotected

◆ OVERWRITE_CONFIG

constexpr const char* taraxa::cli::Config::OVERWRITE_CONFIG = "overwrite-config"
staticconstexprprotected

◆ PORT

constexpr const char* taraxa::cli::Config::PORT = "port"
staticconstexprprotected

◆ PRUNE_STATE_DB

constexpr const char* taraxa::cli::Config::PRUNE_STATE_DB = "prune-state-db"
staticconstexprprotected

◆ PUBLIC_IP

constexpr const char* taraxa::cli::Config::PUBLIC_IP = "public-ip"
staticconstexprprotected

◆ REBUILD_DB

constexpr const char* taraxa::cli::Config::REBUILD_DB = "rebuild-db"
staticconstexprprotected

◆ REBUILD_DB_PERIOD

constexpr const char* taraxa::cli::Config::REBUILD_DB_PERIOD = "rebuild-db-period"
staticconstexprprotected

◆ REBUILD_NETWORK

constexpr const char* taraxa::cli::Config::REBUILD_NETWORK = "rebuild-network"
staticconstexprprotected

◆ REVERT_TO_PERIOD

constexpr const char* taraxa::cli::Config::REVERT_TO_PERIOD = "revert-to-period"
staticconstexprprotected

◆ VERSION

constexpr const char* taraxa::cli::Config::VERSION = "version"
staticconstexprprotected

◆ VRF_COMMAND

constexpr const char* taraxa::cli::Config::VRF_COMMAND = "vrf"
staticconstexprprotected

◆ VRF_SECRET

constexpr const char* taraxa::cli::Config::VRF_SECRET = "vrf-secret"
staticconstexprprotected

◆ WALLET

constexpr const char* taraxa::cli::Config::WALLET = "wallet"
staticconstexprprotected

The documentation for this class was generated from the following files: