Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Online is when the implementation is permitted // to make outbound connections. Online Mode = "ONLINE" // Offline is when the implementation is not permitted // to make outbound connections. Offline Mode = "OFFLINE" // Mainnet is the Fantom Mainnet. Mainnet string = "MAINNET" // Testnet is the Fantom Testnet. Testnet string = "TESTNET" // ModeEnv is the environment variable read // to determine mode. ModeEnv = "MODE" // NetworkEnv is the environment variable // read to determine network. NetworkEnv = "NETWORK" // PortEnv is the environment variable // read to determine the port for the Rosetta // implementation. PortEnv = "PORT" // OperaEnv is an optional environment variable // used to connect rosetta-fantom to an already // running Opera node. OperaEnv = "OPERA" // DefaultOperaURL is the default URL for // a running Opera node. This is used // when OperaEnv is not populated. DefaultOperaURL = "http://localhost:18545" // SkipAdminEnv is an optional environment variable // to skip RPC `admin` calls which are typically not supported // by hosted node services. When not set, defaults to true. SkipAdminEnv = "SKIP_ADMIN" // OperaArgsEnv is an environment variable to pass arguments to the Opera process OperaArgsEnv = "OPERA_ARGS" // MiddlewareVersion is the version of rosetta-fantom. MiddlewareVersion = "0.0.4" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Mode Mode Network *types.NetworkIdentifier GenesisBlockIdentifier *types.BlockIdentifier OperaURL string RemoteOpera bool Port int OperaArguments string SkipAdmin bool ChainID *big.Int }
Configuration determines how
func LoadConfiguration ¶
func LoadConfiguration() (*Configuration, error)
LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.
Click to show internal directories.
Click to hide internal directories.