Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FlagYes is the flag for yes. FlagYes = "yes" // FlagCfg is the flag for cfg. FlagCfg = "cfg" // FlagNetwork is the flag for the network name. Valid values: ["testnet", "mainnet", "custom"]. FlagNetwork = "network" // FlagCustomNetwork is the flag for the custom network file. This is required if --network=custom FlagCustomNetwork = "custom-network-file" // FlagAmount is the flag for amount. FlagAmount = "amount" // FlagRemoteMT is the flag for remote-merkletree. FlagRemoteMT = "remote-merkletree" // FlagHTTPAPI is the flag for http.api. FlagHTTPAPI = "http.api" // FlagKeyStorePath is the path of the key store file containing the private key of the account going to sing and approve the tokens FlagKeyStorePath = "key-store-path" // FlagPassword is the password needed to decrypt the key store FlagPassword = "password" // FlagMigrations is the flag for migrations. FlagMigrations = "migrations" // FlagOutputFile is the flag for the output file FlagOutputFile = "output" // FlagMaxAmount is the flag to avoid to use the flag FlagAmount FlagMaxAmount = "max-amount" // FlagDocumentationFileType is the flag for the choose which file generate json-schema FlagDocumentationFileType = "config-file" )
View Source
const ( // LeafTypeBalance specifies that leaf stores Balance LeafTypeBalance leafType = 0 // LeafTypeNonce specifies that leaf stores Nonce LeafTypeNonce leafType = 1 // LeafTypeCode specifies that leaf stores Code LeafTypeCode leafType = 2 // LeafTypeStorage specifies that leaf stores Storage Value LeafTypeStorage leafType = 3 // LeafTypeSCLength specifies that leaf stores Storage Value LeafTypeSCLength leafType = 4 )
View Source
const DefaultValues = `` /* 1223-byte string literal not displayed */
DefaultValues is the default configuration
View Source
const MainnetNetworkConfigJSON = `` /* 93115-byte string literal not displayed */
MainnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup
View Source
const TestnetNetworkConfigJSON = `` /* 92708-byte string literal not displayed */
TestnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup
Variables ¶
This section is empty.
Functions ¶
func LoadGenesisFileAsString ¶
LoadGenesisFileAsString loads the genesis file as a string
Types ¶
type Config ¶
type Config struct { // Configure Log level for all the services, allow also to store the logs in a file Log log.Config // Configuration of the sequence sender service SequenceSender sequencesender.Config // Configuration of the genesis of the network. This is used to known the initial state of the network NetworkConfig NetworkConfig }
Config represents the configuration of the entire Hermez Node The file is TOML format You could find some examples:
- `config/environments/local/local.node.config.toml`: running a permisionless node
- `config/environments/mainnet/node.config.toml`
- `config/environments/public/node.config.toml`
- `test/config/test.node.config.toml`: configuration for a trusted node used in CI
type GenesisFromJSON ¶
type GenesisFromJSON struct { // L1: root hash of the genesis block Root string `json:"root"` // L1: block number of the genesis block GenesisBlockNum uint64 `json:"genesisBlockNumber"` // L2: List of states contracts used to populate merkle tree at initial state Genesis []genesisAccountFromJSON `json:"genesis"` // L1: configuration of the network L1Config etherman.L1Config }
GenesisFromJSON is the config file for network_custom
type NetworkConfig ¶
type NetworkConfig struct { // L1: Configuration related to L1 L1Config etherman.L1Config `json:"l1Config"` // L1: Genesis of the rollup, first block number and root Genesis state.Genesis }
NetworkConfig is the configuration struct for the different environments
func LoadGenesisFromJSONString ¶
func LoadGenesisFromJSONString(jsonStr string) (NetworkConfig, error)
LoadGenesisFromJSONString loads the genesis file from JSON string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.