Documentation ¶
Index ¶
- Constants
- type Chain
- type Chainer
- type ChainsProvider
- type Long
- type PageInfo
- type Provider
- func (p Provider) XMsg(ctx context.Context, srcChainID, destChainID, offset uint64) (*XMsg, bool, error)
- func (p Provider) XMsgCount(ctx context.Context) (*hexutil.Big, bool, error)
- func (p Provider) XMsgs(ctx context.Context, first, last *int32, before *graphql.ID, after *graphql.ID, ...) (XMsgConnection, error)
- type RowQuerier
- type StatsProvider
- type StatsResult
- type Status
- type StatusErr
- type StreamStats
- type XBlock
- type XMsg
- type XMsgConnection
- type XMsgEdge
- type XMsgFilters
- type XReceipt
Constants ¶
const StatusParseErr = StatusErr("Invalid status")
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶ added in v0.1.7
type Chain struct { AddrURLFmt string BlockURLFmt string TxURLFmt string ID graphql.ID ChainID hexutil.Big DisplayID Long Name string LogoURL string }
Define the Go struct for the Chain type.
func EntChainToGraphQLChain ¶ added in v0.1.3
type ChainsProvider ¶ added in v0.1.7
type ChainsProvider struct {
// contains filtered or unexported fields
}
func NewChainsProvider ¶ added in v0.1.7
func NewChainsProvider(network netconf.ID) *ChainsProvider
NewChainsProvider creates a new ChainsProvider instance with the chains for the given network (e.g. "devnet", "testnet" or "mainnet").
func (*ChainsProvider) Chain ¶ added in v0.1.7
func (p *ChainsProvider) Chain(id string) (Chain, bool)
func (*ChainsProvider) ChainList ¶ added in v0.1.7
func (p *ChainsProvider) ChainList() []Chain
type Long ¶ added in v0.1.7
type Long uint64
Implements the graphql.Marshaler interface for the Long type using base-10 numbers.
func (Long) ImplementsGraphQLType ¶ added in v0.1.7
func (Long) MarshalJSON ¶ added in v0.1.7
func (*Long) UnmarshalGraphQL ¶ added in v0.1.7
type Provider ¶
type Provider struct { *ChainsProvider *StatsProvider // contains filtered or unexported fields }
func NewProvider ¶ added in v0.1.7
func (Provider) XMsgs ¶ added in v0.1.4
func (p Provider) XMsgs(ctx context.Context, first, last *int32, before *graphql.ID, after *graphql.ID, filters *XMsgFilters) (XMsgConnection, error)
type RowQuerier ¶ added in v0.1.7
type StatsProvider ¶ added in v0.1.7
type StatsProvider struct {
// contains filtered or unexported fields
}
StatsProvider provides stats data.
func NewStatsProvider ¶ added in v0.1.7
func (*StatsProvider) Stats ¶ added in v0.1.7
func (s *StatsProvider) Stats(ctx context.Context) StatsResult
func (*StatsProvider) TotalMsgs ¶ added in v0.1.7
func (s *StatsProvider) TotalMsgs() uint64
type StatsResult ¶ added in v0.1.7
type StatsResult struct { TotalMsgs Long TopStreams []StreamStats }
Define the Go struct for the StatsResult type.
type Status ¶ added in v0.1.7
type Status string
Define the Go struct for the Status enum type.
func MustParseStatus ¶ added in v0.1.7
func ParseStatus ¶ added in v0.1.7
type StreamStats ¶ added in v0.1.7
Define the Go struct for the StreamStats type.
type XBlock ¶ added in v0.1.7
type XBlock struct { Chainer ID graphql.ID ChainID hexutil.Big Height hexutil.Big Hash common.Hash Messages []XMsg Timestamp graphql.Time }
Define the Go struct for the XBlock type.
func EntBlockToGraphQLBlock ¶ added in v0.1.2
EntBlockToGraphQLBlock converts an ent.Block to a XBlock.
type XMsg ¶ added in v0.1.7
type XMsg struct { Chainer ID graphql.ID Block XBlock To common.Address Data hexutil.Bytes DestChainID hexutil.Big GasLimit hexutil.Big DisplayID string Offset hexutil.Big Receipt *XReceipt Sender common.Address SourceChainID hexutil.Big Status Status TxHash common.Hash }
Define the Go struct for the XMsg type.
func EntMsgToGraphQLXMsg ¶ added in v0.1.2
EntMsgToGraphQLXMsg converts an ent.Msg to a XMsg.
func EntMsgToGraphQLXMsgWithEdges ¶ added in v0.1.4
EntMsgToGraphQLXMsg converts an ent.Msg to a XMsg.
func (XMsg) SourceChain ¶ added in v0.1.7
type XMsgConnection ¶ added in v0.1.7
Define the Go struct for the XMsgConnection type.
type XMsgEdge ¶ added in v0.1.7
type XMsgEdge struct { Cursor graphql.ID Node XMsg }
Define the Go struct for the XMsgEdge type.
type XMsgFilters ¶ added in v0.1.7
type XReceipt ¶ added in v0.1.7
type XReceipt struct { Chainer ID graphql.ID GasUsed hexutil.Big Success bool Relayer common.Address SourceChainID hexutil.Big DestChainID hexutil.Big Offset hexutil.Big TxHash common.Hash Timestamp graphql.Time RevertReason *string }
Define the Go struct for the XReceipt type.
func EntReceiptToGraphQLXReceipt ¶ added in v0.1.2
func EntReceiptToGraphQLXReceipt(ctx context.Context, receipt *ent.Receipt, block *ent.Block) (*XReceipt, error)
EntReceiptToGraphQLXReceipt converts an ent.Receipt to a XReceipt.