data

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntBlockToGraphQLBlock added in v0.1.2

func EntBlockToGraphQLBlock(ctx context.Context, block *ent.Block) (*resolvers.XBlock, error)

EntBlockToGraphQLBlock converts an ent.Block to a resolvers.XBlock.

func EntChainToGraphQLChain added in v0.1.3

func EntChainToGraphQLChain(chain *ent.Chain) resolvers.Chain

func EntMsgToGraphQLXMsg added in v0.1.2

func EntMsgToGraphQLXMsg(msg *ent.Msg) (*resolvers.XMsg, error)

EntMsgToGraphQLXMsg converts an ent.Msg to a resolvers.XMsg.

func EntMsgToGraphQLXMsgWithEdges added in v0.1.4

func EntMsgToGraphQLXMsgWithEdges(ctx context.Context, msg *ent.Msg) (*resolvers.XMsg, error)

EntMsgToGraphQLXMsg converts an ent.Msg to a resolvers.XMsg.

func EntReceiptToGraphQLXReceipt added in v0.1.2

func EntReceiptToGraphQLXReceipt(ctx context.Context, receipt *ent.Receipt, block *ent.Block) (*resolvers.XReceipt, error)

EntReceiptToGraphQLXReceipt converts an ent.Receipt to a resolvers.XReceipt.

Types

type Provider

type Provider struct {
	EntClient *ent.Client
}

func (Provider) Search added in v0.1.4

func (p Provider) Search(ctx context.Context, query string) (*resolvers.SearchResult, bool, error)

This searches for matches for the following: - Block (finds matching block hash) - Message (finds matching tx hash) - Receipt (finds matching tx hash) TODO (Dan): This is a very naive search implementation. It should be improved. We also should search by address?

func (Provider) SupportedChains added in v0.1.3

func (p Provider) SupportedChains(ctx context.Context) ([]*resolvers.Chain, bool, error)

func (Provider) XBlock

func (p Provider) XBlock(ctx context.Context, sourceChainID uint64, height uint64) (*resolvers.XBlock, bool, error)

func (Provider) XBlockCount added in v0.1.2

func (p Provider) XBlockCount(ctx context.Context) (*hexutil.Big, bool, error)

func (Provider) XBlockRange added in v0.1.2

func (p Provider) XBlockRange(ctx context.Context, from uint64, to uint64) ([]*resolvers.XBlock, bool, error)

func (Provider) XMsg added in v0.1.3

func (p Provider) XMsg(ctx context.Context, sourceChainID, destChainID, offset uint64) (*resolvers.XMsg, bool, error)

func (Provider) XMsgCount added in v0.1.2

func (p Provider) XMsgCount(ctx context.Context) (*hexutil.Big, bool, error)

func (Provider) XMsgRange added in v0.1.3

func (p Provider) XMsgRange(ctx context.Context, from uint64, to uint64) ([]*resolvers.XMsg, bool, error)

func (Provider) XMsgs added in v0.1.4

func (p Provider) XMsgs(ctx context.Context, limit uint64, cursor *uint64) (*resolvers.XMsgResult, bool, error)

func (Provider) XReceipt added in v0.1.3

func (p Provider) XReceipt(ctx context.Context, sourceChainID, destChainID, offset uint64) (*resolvers.XReceipt, bool, error)

func (Provider) XReceiptCount added in v0.1.2

func (p Provider) XReceiptCount(ctx context.Context) (*hexutil.Big, bool, error)

Jump to

Keyboard shortcuts

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