model

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 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 AddressChainRanking added in v0.0.107

type AddressChainRanking struct {
	ChainID   *int     `json:"chainID,omitempty"`
	VolumeUsd *float64 `json:"volumeUsd,omitempty"`
	Rank      *int     `json:"rank,omitempty"`
}

type AddressDailyCount added in v0.0.107

type AddressDailyCount struct {
	Date  *string `json:"date,omitempty"`
	Count *int    `json:"count,omitempty"`
}

type AddressData added in v0.0.107

type AddressData struct {
	BridgeVolume *float64               `json:"bridgeVolume,omitempty"`
	BridgeFees   *float64               `json:"bridgeFees,omitempty"`
	BridgeTxs    *int                   `json:"bridgeTxs,omitempty"`
	SwapVolume   *float64               `json:"swapVolume,omitempty"`
	SwapFees     *float64               `json:"swapFees,omitempty"`
	SwapTxs      *int                   `json:"swapTxs,omitempty"`
	Rank         *int                   `json:"rank,omitempty"`
	EarliestTx   *int                   `json:"earliestTx,omitempty"`
	ChainRanking []*AddressChainRanking `json:"chainRanking,omitempty"`
	DailyData    []*AddressDailyCount   `json:"dailyData,omitempty"`
}

type AddressRanking

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

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

type BlockHeight added in v0.0.180

type BlockHeight struct {
	ChainID     *int          `json:"chainID,omitempty"`
	Type        *ContractType `json:"type,omitempty"`
	BlockNumber *int          `json:"blockNumber,omitempty"`
}

type BridgeTransaction

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

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 BridgeTxType added in v0.0.149

type BridgeTxType string
const (
	BridgeTxTypeOrigin      BridgeTxType = "ORIGIN"
	BridgeTxTypeDestination BridgeTxType = "DESTINATION"
)

func (BridgeTxType) IsValid added in v0.0.149

func (e BridgeTxType) IsValid() bool

func (BridgeTxType) MarshalGQL added in v0.0.149

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

func (BridgeTxType) String added in v0.0.149

func (e BridgeTxType) String() string

func (*BridgeTxType) UnmarshalGQL added in v0.0.149

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

type BridgeType added in v0.0.176

type BridgeType string
const (
	BridgeTypeBridge BridgeType = "BRIDGE"
	BridgeTypeCctp   BridgeType = "CCTP"
	BridgeTypeRfq    BridgeType = "RFQ"
)

func (BridgeType) IsValid added in v0.0.176

func (e BridgeType) IsValid() bool

func (BridgeType) MarshalGQL added in v0.0.176

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

func (BridgeType) String added in v0.0.176

func (e BridgeType) String() string

func (*BridgeType) UnmarshalGQL added in v0.0.176

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

type BridgeWatcherTx added in v0.0.149

type BridgeWatcherTx struct {
	BridgeTx    *PartialInfo  `json:"bridgeTx,omitempty"`
	Pending     *bool         `json:"pending,omitempty"`
	Type        *BridgeTxType `json:"type,omitempty"`
	Kappa       *string       `json:"kappa,omitempty"`
	KappaStatus *KappaStatus  `json:"kappaStatus,omitempty"`
}

BridgeWatcherTx represents a single sided bridge transaction specifically for the bridge watcher.

type ContractQuery added in v0.0.180

type ContractQuery struct {
	ChainID int          `json:"chainID"`
	Type    ContractType `json:"type"`
}

type ContractType added in v0.0.180

type ContractType string
const (
	ContractTypeBridge ContractType = "BRIDGE"
	ContractTypeCctp   ContractType = "CCTP"
	ContractTypeRfq    ContractType = "RFQ"
)

func (ContractType) IsValid added in v0.0.180

func (e ContractType) IsValid() bool

func (ContractType) MarshalGQL added in v0.0.180

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

func (ContractType) String added in v0.0.180

func (e ContractType) String() string

func (*ContractType) UnmarshalGQL added in v0.0.180

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

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,omitempty"`
	Total *float64 `json:"total,omitempty"`
}

DateResult is a given statistic for a given date.

type DateResultByChain added in v0.0.81

type DateResultByChain struct {
	Date      *string  `json:"date,omitempty"`
	Ethereum  *float64 `json:"ethereum,omitempty"`
	Optimism  *float64 `json:"optimism,omitempty"`
	Cronos    *float64 `json:"cronos,omitempty"`
	Bsc       *float64 `json:"bsc,omitempty"`
	Polygon   *float64 `json:"polygon,omitempty"`
	Fantom    *float64 `json:"fantom,omitempty"`
	Boba      *float64 `json:"boba,omitempty"`
	Metis     *float64 `json:"metis,omitempty"`
	Moonbeam  *float64 `json:"moonbeam,omitempty"`
	Moonriver *float64 `json:"moonriver,omitempty"`
	Klaytn    *float64 `json:"klaytn,omitempty"`
	Arbitrum  *float64 `json:"arbitrum,omitempty"`
	Avalanche *float64 `json:"avalanche,omitempty"`
	Dfk       *float64 `json:"dfk,omitempty"`
	Aurora    *float64 `json:"aurora,omitempty"`
	Harmony   *float64 `json:"harmony,omitempty"`
	Canto     *float64 `json:"canto,omitempty"`
	Dogechain *float64 `json:"dogechain,omitempty"`
	Base      *float64 `json:"base,omitempty"`
	Blast     *float64 `json:"blast,omitempty"`
	Scroll    *float64 `json:"scroll,omitempty"`
	Total     *float64 `json:"total,omitempty"`
}

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,omitempty"`
	DateResults []*DateResult         `json:"dateResults,omitempty"`
	Type        *HistoricalResultType `json:"type,omitempty"`
}

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 KappaStatus added in v0.0.176

type KappaStatus string
const (
	KappaStatusExists  KappaStatus = "EXISTS"
	KappaStatusPending KappaStatus = "PENDING"
	KappaStatusUnknown KappaStatus = "UNKNOWN"
)

func (KappaStatus) IsValid added in v0.0.176

func (e KappaStatus) IsValid() bool

func (KappaStatus) MarshalGQL added in v0.0.176

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

func (KappaStatus) String added in v0.0.176

func (e KappaStatus) String() string

func (*KappaStatus) UnmarshalGQL added in v0.0.176

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

type Leaderboard added in v0.0.107

type Leaderboard struct {
	Address      *string  `json:"address,omitempty"`
	VolumeUsd    *float64 `json:"volumeUSD,omitempty"`
	Fees         *float64 `json:"fees,omitempty"`
	Txs          *int     `json:"txs,omitempty"`
	Rank         *int     `json:"rank,omitempty"`
	AvgVolumeUsd *float64 `json:"avgVolumeUSD,omitempty"`
}

type MessageBusTransaction added in v0.0.81

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

type MessageType added in v0.0.81

type MessageType interface {
	IsMessageType()
}

type PartialInfo

type PartialInfo struct {
	ChainID            *int     `json:"chainID,omitempty"`
	DestinationChainID *int     `json:"destinationChainID,omitempty"`
	Address            *string  `json:"address,omitempty"`
	TxnHash            *string  `json:"txnHash,omitempty"`
	Value              *string  `json:"value,omitempty"`
	FormattedValue     *float64 `json:"formattedValue,omitempty"`
	USDValue           *float64 `json:"USDValue,omitempty"`
	TokenAddress       *string  `json:"tokenAddress,omitempty"`
	TokenSymbol        *string  `json:"tokenSymbol,omitempty"`
	BlockNumber        *int     `json:"blockNumber,omitempty"`
	Time               *int     `json:"time,omitempty"`
	FormattedTime      *string  `json:"formattedTime,omitempty"`
	FormattedEventType *string  `json:"formattedEventType,omitempty"`
	EventType          *int     `json:"eventType,omitempty"`
}

PartialInfo is a transaction that occurred on one chain.

type PartialMessageBusInfo added in v0.0.81

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

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,omitempty"`
	TokenAddress *string `json:"tokenAddress,omitempty"`
	Count        *int    `json:"count,omitempty"`
}

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,omitempty"`
	Count   *int `json:"count,omitempty"`
}

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,omitempty"`
}

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,omitempty"`
	Total   *float64 `json:"total,omitempty"`
}

Jump to

Keyboard shortcuts

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