Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Blockchain is Ethereum. Blockchain string = "Ethereum" // MainnetNetwork is the value of the network // in MainnetNetworkIdentifier. MainnetNetwork string = "Mainnet" // RopstenNetwork is the value of the network // in RopstenNetworkIdentifier. RopstenNetwork string = "Ropsten" // RinkebyNetwork is the value of the network // in RinkebyNetworkNetworkIdentifier. RinkebyNetwork string = "Rinkeby" // GoerliNetwork is the value of the network // in GoerliNetworkNetworkIdentifier. GoerliNetwork string = "Goerli" // Symbol is the symbol value // used in Currency. Symbol = "ETH" // Decimals is the decimals value // used in Currency. Decimals = 18 // Online is when the implementation is permitted // to make outbound connections. Online configuration.Mode = "ONLINE" // Offline is when the implementation is not permitted // to make outbound connections. Offline configuration.Mode = "OFFLINE" // Mainnet is the Ethereum Mainnet. Mainnet string = "MAINNET" // Ropsten is the Ethereum Ropsten testnet. Ropsten string = "ROPSTEN" // Rinkeby is the Ethereum Rinkeby testnet. Rinkeby string = "RINKEBY" // Goerli is the Ethereum Görli testnet. Goerli string = "GOERLI" // Testnet defaults to `Ropsten` for backwards compatibility. Testnet string = "TESTNET" // DataDirectory is the default location for all // persistent data. DataDirectory = "/data" // 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" // TokenFilterEnv is the environment variable // read to determine if we will filter tokens // using our token white list TokenFilterEnv = "FILTER" // GethEnv is an optional environment variable // used to connect rosetta-ethereum to an already // running geth node. GethEnv = "GETH" // DefaultGethURL is the default URL for // a running geth node. This is used // when GethEnv is not populated. DefaultGethURL = "http://127.0.0.1:8546" // SkipGethAdminEnv is an optional environment variable // to skip geth `admin` calls which are typically not supported // by hosted node services. When not set, defaults to false. SkipGethAdminEnv = "SKIP_GETH_ADMIN" // MiddlewareVersion is the version of rosetta-ethereum. MiddlewareVersion = "0.0.4" // MainnetGethArguments are the arguments to start a mainnet geth instance. MainnetGethArguments = `--config=/app/ethereum/geth.toml --gcmode=archive --graphql` // GenesisBlockIndex is the index of the genesis block. GenesisBlockIndex = int64(0) )
Variables ¶
View Source
var ( // RopstenGethArguments are the arguments to start a ropsten geth instance. RopstenGethArguments = fmt.Sprintf("%s --ropsten", MainnetGethArguments) // RinkebyGethArguments are the arguments to start a rinkeby geth instance. RinkebyGethArguments = fmt.Sprintf("%s --rinkeby", MainnetGethArguments) // GoerliGethArguments are the arguments to start a ropsten geth instance. GoerliGethArguments = fmt.Sprintf("%s --goerli", MainnetGethArguments) // MainnetGenesisBlockIdentifier is the *types.BlockIdentifier // of the mainnet genesis block. MainnetGenesisBlockIdentifier = &types.BlockIdentifier{ Hash: params.MainnetGenesisHash.Hex(), Index: GenesisBlockIndex, } // RopstenGenesisBlockIdentifier is the *types.BlockIdentifier // of the Ropsten genesis block. RopstenGenesisBlockIdentifier = &types.BlockIdentifier{ Hash: params.RopstenGenesisHash.Hex(), Index: GenesisBlockIndex, } // RinkebyGenesisBlockIdentifier is the *types.BlockIdentifier // of the Ropsten genesis block. RinkebyGenesisBlockIdentifier = &types.BlockIdentifier{ Hash: params.RinkebyGenesisHash.Hex(), Index: GenesisBlockIndex, } // GoerliGenesisBlockIdentifier is the *types.BlockIdentifier // of the Goerli genesis block. GoerliGenesisBlockIdentifier = &types.BlockIdentifier{ Hash: params.GoerliGenesisHash.Hex(), Index: GenesisBlockIndex, } )
Functions ¶
func LoadConfiguration ¶
func LoadConfiguration() (*configuration.Configuration, error)
LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.
Types ¶
Click to show internal directories.
Click to hide internal directories.