Documentation ¶
Index ¶
Constants ¶
View Source
const LoggerTag = "RELAYER"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Signer is the signer which will be used to sign poke transactions to the // Medianizer contracts. Signer ethereum.Signer // 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 }
Config is the configuration for Relayer.
type Pair ¶
type Pair struct { // AssetPair is the name of asset pair, e.g. ETHUSD. AssetPair string // OracleSpread is the minimum calcSpread between the Oracle price and new // price required to send update. OracleSpread float64 // OracleExpiration is the minimum time difference between the last Oracle // update on the Medianizer contract and current time required to send // update. OracleExpiration time.Duration // Median is the instance of the oracle.Median which is the interface for // the Medianizer contract. Median median.Median // FeederAddresses is the list of addresses which are allowed to send // updates to the Medianizer contract. FeederAddresses []types.Address // FeederAddressesUpdateTicker invokes the FeederAddresses update routine // when ticked. // // TODO(mdobak): Instead of updating the list periodically, we should // listen for events from the Medianizer contract. FeederAddressesUpdateTicker *timeutil.Ticker }
Click to show internal directories.
Click to hide internal directories.