Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // Start price getter client Start(ctx context.Context) // GetEthToMaticPrice getting eth to matic price GetEthToMaticPrice(ctx context.Context) (*big.Float, error) }
Client for the pricegetter
type Config ¶
type Config struct { // Type is price getter type Type Type `mapstructure:"Type"` // PriceProvider config PriceProvider priceprovider.Config `mapstructure:"PriceProvider"` // UpdateFrequency is price updating frequency, used only for the async type UpdateFrequency types.Duration `mapstructure:"UpdateFrequency"` // DefaultPrice is used only for the default type DefaultPrice TokenPrice `mapstructure:"DefaultPrice"` }
Config represents the configuration of the pricegetter
type TokenPrice ¶
TokenPrice is a wrapper type that parses token amount to big float
func (*TokenPrice) UnmarshalText ¶
func (t *TokenPrice) UnmarshalText(data []byte) error
UnmarshalText unmarshal token amount from float string to big int
Click to show internal directories.
Click to hide internal directories.