Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
// Blocking. Returns the gas price.
GetGasPrice(ctx context.Context) (*GasPriceEtherscan, error)
}
Client is the interface to a ServerProof that calculates zk proofs
type GasPriceEtherscan ¶
type GasPriceEtherscan struct {
LastBlock string `json:"LastBlock"`
SafeGasPrice string `json:"SafeGasPrice"`
ProposeGasPrice string `json:"ProposeGasPrice"`
FastGasPrice string `json:"FastGasPrice"`
}
GasPriceEtherscan definition
type MockEtherscanClient ¶
type MockEtherscanClient struct {
}
MockEtherscanClient is a mock EtherscanServer to be used in tests. It doesn't calculate anything
func (*MockEtherscanClient) GetGasPrice ¶
func (p *MockEtherscanClient) GetGasPrice(ctx context.Context) (*GasPriceEtherscan, error)
GetGasPrice retrieves the gas price estimation from etherscan
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service definition
func NewEtherscanService ¶
NewEtherscanService is the constructor that creates an etherscanService
func (*Service) GetGasPrice ¶
func (p *Service) GetGasPrice(ctx context.Context) (*GasPriceEtherscan, error)
GetGasPrice retrieves the gas price estimation from etherscan
Click to show internal directories.
Click to hide internal directories.