Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPriceAPIRequestFailed = errors.New("failed to fetch price api") ErrEmptyPrice = errors.New("dollar price in ETH is empty") )
Functions ¶
This section is empty.
Types ¶
type AirdropConfig ¶ added in v0.1.1
type AirdropConfiger ¶ added in v0.1.1
type AirdropConfiger interface {
AirdropConfig() AirdropConfig
}
func NewAirdropConfiger ¶ added in v0.1.1
func NewAirdropConfiger(getter kv.Getter) AirdropConfiger
type Broadcaster ¶
type Broadcaster struct { RPC *ethclient.Client ChainID *big.Int PrivateKey *ecdsa.PrivateKey Address common.Address QueryLimit uint64 ERC20PermitTransfer common.Address // contains filtered or unexported fields }
func (*Broadcaster) IncrementNonce ¶ added in v0.1.1
func (n *Broadcaster) IncrementNonce()
func (*Broadcaster) LockNonce ¶ added in v0.1.1
func (n *Broadcaster) LockNonce()
func (*Broadcaster) MultiplyGasPrice ¶ added in v0.2.0
func (n *Broadcaster) MultiplyGasPrice(gasPrice *big.Int) *big.Int
func (*Broadcaster) Nonce ¶ added in v0.1.1
func (n *Broadcaster) Nonce() uint64
func (*Broadcaster) ResetNonce ¶ added in v0.1.1
func (n *Broadcaster) ResetNonce(client *ethclient.Client) error
ResetNonce sets nonce to the value received from a node
func (*Broadcaster) UnlockNonce ¶ added in v0.1.1
func (n *Broadcaster) UnlockNonce()
type Broadcasterer ¶
type Broadcasterer interface {
Broadcaster() Broadcaster
}
func NewBroadcaster ¶
func NewBroadcaster(getter kv.Getter) Broadcasterer
type Config ¶
type Config struct { comfig.Logger pgdb.Databaser comfig.Listenerer identity.VerifierProvider Broadcasterer AirdropConfiger PriceAPIConfiger // contains filtered or unexported fields }
func (*Config) NewRouting ¶ added in v0.1.1
func (*Config) Verifier ¶
func (c *Config) Verifier() *Verifierer
type GlobalParams ¶
type PriceAPIConfig ¶ added in v0.2.0
type PriceAPIConfig struct { URL *url.URL `fig:"url,required"` Key string `fig:"key,required"` CurrencyID string `fig:"currency_id,required"` QuoteTag string `fig:"quote_tag,required"` }
func (PriceAPIConfig) ConvertPrice ¶ added in v0.2.0
func (cfg PriceAPIConfig) ConvertPrice() (*big.Float, error)
ConvertPrice converts tokens price
type PriceAPIConfiger ¶ added in v0.2.0
type PriceAPIConfiger interface {
PriceAPIConfig() PriceAPIConfig
}
func NewPriceAPIConfiger ¶ added in v0.2.0
func NewPriceAPIConfiger(getter kv.Getter) PriceAPIConfiger
type QuoteResponse ¶ added in v0.2.0
type Verifierer ¶
type Verifierer struct { Params GlobalParams ZkVerifier *zk.Verifier }
Click to show internal directories.
Click to hide internal directories.