Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ETHUSDRate ¶
ETHUSDRate represent rate for usd
type ETHUSDRateFetcher ¶
type ETHUSDRateFetcher struct {
// contains filtered or unexported fields
}
ETHUSDRateFetcher represent fetcher for ETH-USD rate
func NewETHUSDRateFetcher ¶
func NewETHUSDRateFetcher(sugar *zap.SugaredLogger, dbName string, client client.Client, rateProvider tokenrate.ETHUSDRateProvider) (*ETHUSDRateFetcher, error)
NewETHUSDRateFetcher return new instance of ETHUSDFetcher
func (*ETHUSDRateFetcher) FetchRates ¶
func (ef *ETHUSDRateFetcher) FetchRates(blockNumber uint64, timestamp time.Time) (ETHUSDRate, error)
FetchRates fetch ETH-USD rate and save to db
func (ETHUSDRateFetcher) SaveTokenRate ¶
func (ef ETHUSDRateFetcher) SaveTokenRate(rate ETHUSDRate) error
SaveTokenRate into influx
Click to show internal directories.
Click to hide internal directories.