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 Polygon Mainnet. Mainnet string = "MAINNET" // Mumbai is the Polygon testnet Mumbai string = "MUMBAI" // Testnet defaults to `Mumbai` 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" // BorEnv is an optional environment variable // used to connect polygon-rosetta to an already // running bor node. BorEnv = "BOR" // DefaultBorURL is the default URL for // a running geth node. This is used // when GethEnv is not populated. DefaultBorURL = "http://localhost:8545" // 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" // GethHeadersEnv is an optional environment variable // of a comma-separated list of key:value pairs to apply // to geth clients as headers. When not set, defaults to [] GethHeadersEnv = "GETH_HEADERS" // MiddlewareVersion is the version of polygon-rosetta. MiddlewareVersion = "0.0.4" // MainnetChainID is the chain ID for Mainnet MainnetChainID = "137" // MumbaiChainID is the chain ID for Mumbai Testnet MumbaiChainID = "80001" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Mode Mode Network *types.NetworkIdentifier GenesisBlockIdentifier *types.BlockIdentifier BorURL string RemoteGeth bool Port int SkipGethAdmin bool GethHeaders []*polygon.HTTPHeader // Block Reward Data Params *params.ChainConfig // Governance contract where the token will be sent to and burnt in london fork BurntContract map[string]string }
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.