Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "RELAYER"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // PriceStore is the price store which will be used to get the latest // prices. PriceStore *store.PriceStore // PokeTicker invokes the Relayer routine that relays prices to the Medianizer // contracts. PokeTicker *timeutil.Ticker // Pairs is the list supported pairs by Relayer with their configuration. Pairs []*Pair // Logger is a current logger interface used by the Relayer. Logger log.Logger // Recoverer provides a method to recover the public key from a signature. // The default is crypto.ECRecoverer. Recoverer crypto.Recoverer }
Config is the configuration for Relayer.
type Pair ¶
type Pair struct { // AssetPair is the name of asset pair, e.g. ETHUSD. AssetPair string // Spread is the minimum calcSpread between the Oracle price and new // price required to send update. Spread float64 // Expiration is the minimum time difference between the last Oracle // update on the Medianizer contract and current time required to send // update. Expiration time.Duration // Median is the instance of the oracle.Median which is the interface for // the Medianizer contract. Median median.Median // FeedAddresses is the list of addresses which are allowed to send // updates to the Medianizer contract. FeedAddresses []types.Address // FeedAddressesUpdateTicker invokes the FeedAddresses update routine // when ticked. // // TODO(mdobak): Instead of updating the list periodically, we should // listen for events from the Medianizer contract. FeedAddressesUpdateTicker *timeutil.Ticker }
Click to show internal directories.
Click to hide internal directories.