Documentation ¶
Index ¶
Constants ¶
View Source
const ( Environment = "environment" EnvironmentDevelopment = "development" EnvironmentProduction = "production" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Environment string `yaml:"environment" validate:"required" default:"development"` Database *Database `yaml:"database"` Redis *Redis `yaml:"redis"` RSS3Chain *RSS3Chain `yaml:"rss3_chain"` Settler *Settler `yaml:"settler"` SpecialRewards *SpecialRewards `yaml:"special_rewards"` GeoIP *GeoIP `yaml:"geo_ip"` RPC *RPC `yaml:"rpc"` Telemetry *Telemetry `json:"telemetry"` }
type RPC ¶
type RPC struct {
RPCNetwork *RPCNetwork `yaml:"network"`
}
type RPCEndpoint ¶
type RPCNetwork ¶
type RPCNetwork struct { Ethereum *RPCEndpoint `yaml:"ethereum"` Crossbell *RPCEndpoint `yaml:"crossbell"` Polygon *RPCEndpoint `yaml:"polygon"` Farcaster *RPCEndpoint `yaml:"farcaster"` }
type Redis ¶
type Redis struct {
URI string `mapstructure:"uri" validate:"required" default:"redis://localhost:6379/0"`
}
type Settler ¶
type Settler struct { PrivateKey string `yaml:"private_key"` WalletAddress string `yaml:"wallet_address"` SignerEndpoint string `yaml:"signer_endpoint"` // EpochIntervalInHours EpochIntervalInHours int `yaml:"epoch_interval_in_hours" default:"18"` GasLimit uint64 `yaml:"gas_limit" default:"2500000"` // BatchSize is the number of Nodes to process in each batch. // This is to prevent the contract call from running out of gas. BatchSize int `yaml:"batch_size" default:"200"` }
type SpecialRewards ¶
type SpecialRewards struct { GiniCoefficient float64 `yaml:"gini_coefficient" validate:"required"` StakerFactor float64 `yaml:"staker_factor" validate:"required"` NodeThreshold float64 `yaml:"node_threshold" validate:"required"` EpochLimit int `yaml:"epoch_limit" validate:"required"` Rewards float64 `yaml:"rewards" validate:"required"` RewardsCeiling float64 `yaml:"rewards_ceiling" validate:"required"` RewardsRatioActive float64 `yaml:"rewards_ratio_active" validate:"required"` RewardsRatioOperation float64 `yaml:"rewards_ratio_operation" validate:"required"` }
Click to show internal directories.
Click to hide internal directories.