model

package
v0.0.100 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 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 DailyStatisticType added in v0.0.81

type DailyStatisticType string
const (
	DailyStatisticTypeVolume       DailyStatisticType = "VOLUME"
	DailyStatisticTypeTransactions DailyStatisticType = "TRANSACTIONS"
	DailyStatisticTypeAddresses    DailyStatisticType = "ADDRESSES"
	DailyStatisticTypeFee          DailyStatisticType = "FEE"
)

func (DailyStatisticType) IsValid added in v0.0.81

func (e DailyStatisticType) IsValid() bool

func (DailyStatisticType) MarshalGQL added in v0.0.81

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

func (DailyStatisticType) String added in v0.0.81

func (e DailyStatisticType) String() string

func (*DailyStatisticType) UnmarshalGQL added in v0.0.81

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

type DateResult

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

DateResult is a given statistic for a given date.

type DateResultByChain added in v0.0.81

type DateResultByChain struct {
	Date      *string  `json:"date"`
	Ethereum  *float64 `json:"ethereum"`
	Optimism  *float64 `json:"optimism"`
	Cronos    *float64 `json:"cronos"`
	Bsc       *float64 `json:"bsc"`
	Polygon   *float64 `json:"polygon"`
	Fantom    *float64 `json:"fantom"`
	Boba      *float64 `json:"boba"`
	Metis     *float64 `json:"metis"`
	Moonbeam  *float64 `json:"moonbeam"`
	Moonriver *float64 `json:"moonriver"`
	Klaytn    *float64 `json:"klaytn"`
	Arbitrum  *float64 `json:"arbitrum"`
	Avalanche *float64 `json:"avalanche"`
	Dfk       *float64 `json:"dfk"`
	Aurora    *float64 `json:"aurora"`
	Harmony   *float64 `json:"harmony"`
	Canto     *float64 `json:"canto"`
	Dogechain *float64 `json:"dogechain"`
	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"
	DurationPastMonth   Duration = "PAST_MONTH"
	DurationPast3Months Duration = "PAST_3_MONTHS"
	DurationPast6Months Duration = "PAST_6_MONTHS"
	DurationPastYear    Duration = "PAST_YEAR"
	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 HeroType added in v0.0.81

type HeroType struct {
	Recipient string `json:"recipient"`
	HeroID    string `json:"heroID"`
}

func (HeroType) IsMessageType added in v0.0.81

func (HeroType) IsMessageType()

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 MessageBusTransaction added in v0.0.81

type MessageBusTransaction struct {
	FromInfo  *PartialMessageBusInfo `json:"fromInfo"`
	ToInfo    *PartialMessageBusInfo `json:"toInfo"`
	Pending   *bool                  `json:"pending"`
	MessageID *string                `json:"messageID"`
}

type MessageType added in v0.0.81

type MessageType interface {
	IsMessageType()
}

type PartialInfo

type PartialInfo struct {
	ChainID            *int     `json:"chainID"`
	DestinationChainID *int     `json:"destinationChainID"`
	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"`
	FormattedTime      *string  `json:"formattedTime"`
}

PartialInfo is a transaction that occurred on one chain.

type PartialMessageBusInfo added in v0.0.81

type PartialMessageBusInfo struct {
	ChainID              *int        `json:"chainID"`
	ChainName            *string     `json:"chainName"`
	DestinationChainID   *int        `json:"destinationChainID"`
	DestinationChainName *string     `json:"destinationChainName"`
	ContractAddress      *string     `json:"contractAddress"`
	TxnHash              *string     `json:"txnHash"`
	Message              *string     `json:"message"`
	MessageType          MessageType `json:"messageType"`
	BlockNumber          *int        `json:"blockNumber"`
	Time                 *int        `json:"time"`
	FormattedTime        *string     `json:"formattedTime"`
	RevertedReason       *string     `json:"revertedReason"`
}

type PetType added in v0.0.81

type PetType struct {
	Recipient string `json:"recipient"`
	PetID     string `json:"petID"`
	Name      string `json:"name"`
}

func (PetType) IsMessageType added in v0.0.81

func (PetType) IsMessageType()

type Platform added in v0.0.81

type Platform string
const (
	PlatformAll        Platform = "ALL"
	PlatformSwap       Platform = "SWAP"
	PlatformBridge     Platform = "BRIDGE"
	PlatformMessageBus Platform = "MESSAGE_BUS"
)

func (Platform) IsValid added in v0.0.81

func (e Platform) IsValid() bool

func (Platform) MarshalGQL added in v0.0.81

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

func (Platform) String added in v0.0.81

func (e Platform) String() string

func (*Platform) UnmarshalGQL added in v0.0.81

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

type StatisticType

type StatisticType string
const (
	StatisticTypeMeanVolumeUsd     StatisticType = "MEAN_VOLUME_USD"
	StatisticTypeMedianVolumeUsd   StatisticType = "MEDIAN_VOLUME_USD"
	StatisticTypeTotalVolumeUsd    StatisticType = "TOTAL_VOLUME_USD"
	StatisticTypeMeanFeeUsd        StatisticType = "MEAN_FEE_USD"
	StatisticTypeMedianFeeUsd      StatisticType = "MEDIAN_FEE_USD"
	StatisticTypeTotalFeeUsd       StatisticType = "TOTAL_FEE_USD"
	StatisticTypeCountTransactions StatisticType = "COUNT_TRANSACTIONS"
	StatisticTypeCountAddresses    StatisticType = "COUNT_ADDRESSES"
)

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 TearType added in v0.0.81

type TearType struct {
	Recipient string `json:"recipient"`
	Amount    string `json:"amount"`
}

func (TearType) IsMessageType added in v0.0.81

func (TearType) IsMessageType()

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 UnknownType added in v0.0.81

type UnknownType struct {
	Known bool `json:"known"`
}

func (UnknownType) IsMessageType added in v0.0.81

func (UnknownType) IsMessageType()

type ValueResult

type ValueResult struct {
	Value *string `json:"value"`
}

ValueResult is a value result of either USD or numeric value.

type VolumeByChainID added in v0.0.81

type VolumeByChainID struct {
	ChainID *int     `json:"chainID"`
	Total   *float64 `json:"total"`
}

Jump to

Keyboard shortcuts

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