client

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package client provides a GraphQL client for consuming logs.

Index

Constants

View Source
const GetLogsRangeDocument = `` /* 315-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *client.Client
}

func NewClient

func NewClient(cli *http.Client, baseURL string, options ...client.HTTPRequestOption) *Client

func (*Client) GetLogsRange

func (c *Client) GetLogsRange(ctx context.Context, chainID int, startBlock int, endBlock int, page int, httpRequestOptions ...client.HTTPRequestOption) (*GetLogsRange, error)

type GetLogsRange

type GetLogsRange struct {
	Response []*struct {
		ContractAddress string   "json:\"contract_address\" graphql:\"contract_address\""
		ChainID         int      "json:\"chain_id\" graphql:\"chain_id\""
		Topics          []string "json:\"topics\" graphql:\"topics\""
		Data            string   "json:\"data\" graphql:\"data\""
		BlockNumber     int      "json:\"block_number\" graphql:\"block_number\""
		TxHash          string   "json:\"tx_hash\" graphql:\"tx_hash\""
		TxIndex         int      "json:\"tx_index\" graphql:\"tx_index\""
		BlockHash       string   "json:\"block_hash\" graphql:\"block_hash\""
		Index           int      "json:\"index\" graphql:\"index\""
		Removed         bool     "json:\"removed\" graphql:\"removed\""
	} "json:\"response\" graphql:\"response\""
}

type Query

type Query struct {
	Logs              []*model.Log         "json:\"logs\" graphql:\"logs\""
	LogsRange         []*model.Log         "json:\"logsRange\" graphql:\"logsRange\""
	Receipts          []*model.Receipt     "json:\"receipts\" graphql:\"receipts\""
	ReceiptsRange     []*model.Receipt     "json:\"receiptsRange\" graphql:\"receiptsRange\""
	Transactions      []*model.Transaction "json:\"transactions\" graphql:\"transactions\""
	TransactionsRange []*model.Transaction "json:\"transactionsRange\" graphql:\"transactionsRange\""
	BlockTime         *int                 "json:\"blockTime\" graphql:\"blockTime\""
}

Directories

Path Synopsis
Package main generates a GQL client.
Package main generates a GQL client.

Jump to

Keyboard shortcuts

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