model

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package model provides the GraphQL model for the explorer service.

Index

Constants

This section is empty.

Variables

View Source
var AllDirection = []Direction{
	DirectionIn,
	DirectionOut,
}

Functions

This section is empty.

Types

type AddressRanking

type AddressRanking struct {
	Address *string `json:"address"`
	Count   *int    `json:"count"`
}

AddressRanking gives the amount of transactions that occurred for a specific address across all chains.

type BridgeTransaction

type BridgeTransaction struct {
	FromInfo    *PartialInfo `json:"fromInfo"`
	ToInfo      *PartialInfo `json:"toInfo"`
	Kappa       *string      `json:"kappa"`
	Pending     *bool        `json:"pending"`
	SwapSuccess *bool        `json:"swapSuccess"`
}

BridgeTransaction represents an entire bridge transaction, including both to and from transactions. If a `from` transaction does not have a corresponding `to` transaction, `pending` will be true.

type DateResult

type DateResult struct {
	Date  *string  `json:"date"`
	Total *float64 `json:"total"`
}

DateResult is a given statistic for a given date.

type Direction

type Direction string
const (
	DirectionIn  Direction = "IN"
	DirectionOut Direction = "OUT"
)

func (Direction) IsValid

func (e Direction) IsValid() bool

func (Direction) MarshalGQL

func (e Direction) MarshalGQL(w io.Writer)

func (Direction) String

func (e Direction) String() string

func (*Direction) UnmarshalGQL

func (e *Direction) UnmarshalGQL(v interface{}) error

type Duration

type Duration string
const (
	DurationPastDay Duration = "PAST_DAY"
	DurationAllTime Duration = "ALL_TIME"
)

func (Duration) IsValid

func (e Duration) IsValid() bool

func (Duration) MarshalGQL

func (e Duration) MarshalGQL(w io.Writer)

func (Duration) String

func (e Duration) String() string

func (*Duration) UnmarshalGQL

func (e *Duration) UnmarshalGQL(v interface{}) error

type HistoricalResult

type HistoricalResult struct {
	Total       *float64              `json:"total"`
	DateResults []*DateResult         `json:"dateResults"`
	Type        *HistoricalResultType `json:"type"`
}

HistoricalResult is a given statistic for dates.

type HistoricalResultType

type HistoricalResultType string
const (
	HistoricalResultTypeBridgevolume HistoricalResultType = "BRIDGEVOLUME"
	HistoricalResultTypeTransactions HistoricalResultType = "TRANSACTIONS"
	HistoricalResultTypeAddresses    HistoricalResultType = "ADDRESSES"
)

func (HistoricalResultType) IsValid

func (e HistoricalResultType) IsValid() bool

func (HistoricalResultType) MarshalGQL

func (e HistoricalResultType) MarshalGQL(w io.Writer)

func (HistoricalResultType) String

func (e HistoricalResultType) String() string

func (*HistoricalResultType) UnmarshalGQL

func (e *HistoricalResultType) UnmarshalGQL(v interface{}) error

type PartialInfo

type PartialInfo struct {
	ChainID        *int     `json:"chainId"`
	Address        *string  `json:"address"`
	TxnHash        *string  `json:"txnHash"`
	Value          *string  `json:"value"`
	FormattedValue *float64 `json:"formattedValue"`
	USDValue       *float64 `json:"USDValue"`
	TokenAddress   *string  `json:"tokenAddress"`
	TokenSymbol    *string  `json:"tokenSymbol"`
	BlockNumber    *int     `json:"blockNumber"`
	Time           *int     `json:"time"`
}

PartialInfo is a transaction that occurred on one chain.

type StatisticType

type StatisticType string
const (
	StatisticTypeMean   StatisticType = "MEAN"
	StatisticTypeMedian StatisticType = "MEDIAN"
	StatisticTypeTotal  StatisticType = "TOTAL"
	StatisticTypeCount  StatisticType = "COUNT"
)

func (StatisticType) IsValid

func (e StatisticType) IsValid() bool

func (StatisticType) MarshalGQL

func (e StatisticType) MarshalGQL(w io.Writer)

func (StatisticType) String

func (e StatisticType) String() string

func (*StatisticType) UnmarshalGQL

func (e *StatisticType) UnmarshalGQL(v interface{}) error

type TokenCountResult

type TokenCountResult struct {
	ChainID      *int    `json:"chainId"`
	TokenAddress *string `json:"tokenAddress"`
	Count        *int    `json:"count"`
}

TokenCountResult gives the amount of transactions that occurred for a specific token, separated by chain ID.

type TransactionCountResult

type TransactionCountResult struct {
	ChainID *int `json:"chainId"`
	Count   *int `json:"count"`
}

TransactionCountResult gives the amount of transactions that occurred for a specific chain ID.

type ValueResult

type ValueResult struct {
	USDValue *string `json:"USDValue"`
}

ValueResult is a USDValue result.

Jump to

Keyboard shortcuts

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