client

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartReporterDaemonTaskLoop

func StartReporterDaemonTaskLoop(
	client *Client,
	ctx context.Context,
	flags flags.DaemonFlags,
	ticker *time.Ticker,
	stop <-chan bool,

)

Types

type Client

type Client struct {
	// reporter account name
	AccountName string
	// Query clients
	OracleQueryClient oracletypes.QueryClient
	StakingClient     stakingtypes.QueryClient
	ReporterClient    reportertypes.QueryClient
	GlobalfeeClient   globalfeetypes.QueryClient

	MarketParams       []pricefeedtypes.MarketParam
	MarketToExchange   *pricefeedservertypes.MarketToExchangePrices
	TokenDepositsCache *tokenbridgetypes.DepositReports
	StakingKeeper      stakingkeeper.Keeper
	// contains filtered or unexported fields
}

func NewClient

func NewClient(clctx client.Context, logger log.Logger, accountName, valGasMin string) *Client

func (*Client) CurrentQuery

func (c *Client) CurrentQuery(ctx context.Context) ([]byte, *oracletypes.QueryMeta, error)

func (*Client) CurrentQueryByQueryId

func (c *Client) CurrentQueryByQueryId(ctx context.Context, queryId string) (*oracletypes.QueryMeta, error)

func (*Client) GenerateAndBroadcastSpotPriceReport

func (c *Client) GenerateAndBroadcastSpotPriceReport(ctx context.Context, qd []byte, querymeta *oracletypes.QueryMeta) error

func (Client) LatestBlockHeight

func (c Client) LatestBlockHeight(ctx context.Context) (int64, error)

func (*Client) MonitorCyclelistQuery

func (c *Client) MonitorCyclelistQuery(ctx context.Context, wg *sync.WaitGroup)

func (*Client) MonitorForTippedQueries

func (c *Client) MonitorForTippedQueries(ctx context.Context, wg *sync.WaitGroup)

func (*Client) MonitorTokenBridgeReports

func (c *Client) MonitorTokenBridgeReports(ctx context.Context, wg *sync.WaitGroup)

func (*Client) SetGasPrice

func (c *Client) SetGasPrice(ctx context.Context) error

func (*Client) Start

func (c *Client) Start(
	ctx context.Context,
	flags flags.DaemonFlags,
	appFlags appflags.Flags,
	grpcClient daemontypes.GrpcClient,
	marketParams []pricefeedtypes.MarketParam,
	marketToExchange *pricefeedservertypes.MarketToExchangePrices,
	tokenDepositsCache *tokenbridgetypes.DepositReports,

	stakingKeeper stakingkeeper.Keeper,
	chainId string,
) error

func (Client) Status

func (c Client) Status(ctx context.Context) (*cmttypes.ResultStatus, error)

func (Client) WaitForBlockHeight

func (c Client) WaitForBlockHeight(ctx context.Context, h int64) error

func (Client) WaitForNBlocks

func (c Client) WaitForNBlocks(ctx context.Context, n int64) error

func (Client) WaitForNextBlock

func (c Client) WaitForNextBlock(ctx context.Context) error

func (*Client) WaitForTx

func (c *Client) WaitForTx(ctx context.Context, hash string) (*cmttypes.ResultTx, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL