Documentation ¶
Overview ¶
Package model provides the GraphQL model for the explorer service.
Index ¶
- Variables
- type AddressRanking
- type BridgeTransaction
- type DailyStatisticType
- type DateResult
- type DateResultByChain
- type Direction
- type Duration
- type HeroType
- type HistoricalResult
- type HistoricalResultType
- type MessageBusTransaction
- type MessageType
- type PartialInfo
- type PartialMessageBusInfo
- type PetType
- type Platform
- type StatisticType
- type TearType
- type TokenCountResult
- type TransactionCountResult
- type UnknownType
- type ValueResult
- type VolumeByChainID
Constants ¶
This section is empty.
Variables ¶
var AllDailyStatisticType = []DailyStatisticType{ DailyStatisticTypeVolume, DailyStatisticTypeTransactions, DailyStatisticTypeAddresses, DailyStatisticTypeFee, }
var AllDirection = []Direction{ DirectionIn, DirectionOut, }
var AllDuration = []Duration{ DurationPastDay, DurationPastMonth, DurationPast3Months, DurationPast6Months, DurationPastYear, DurationAllTime, }
var AllHistoricalResultType = []HistoricalResultType{ HistoricalResultTypeBridgevolume, HistoricalResultTypeTransactions, HistoricalResultTypeAddresses, }
var AllPlatform = []Platform{ PlatformAll, PlatformSwap, PlatformBridge, PlatformMessageBus, }
Functions ¶
This section is empty.
Types ¶
type AddressRanking ¶
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 ¶
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
func (Direction) MarshalGQL ¶
func (*Direction) UnmarshalGQL ¶
type HeroType ¶ added in v0.0.81
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
func (Platform) MarshalGQL ¶ added in v0.0.81
func (*Platform) UnmarshalGQL ¶ added in v0.0.81
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
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 ¶
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.