types

package
v0.0.0-...-80ff8fe Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancellableContext

type CancellableContext interface {
	Cancel()
}

type Chain

type Chain interface {
	ChainReader
	ChainWriter
	ChainSubscriber
}

type ChainReader

type ChainReader interface {
	CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
	CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
	CurrentBlock() (*types.Block, error)
	GetBlockByNumber(number uint64) (*types.Block, error)
	EstimateGas(ctx context.Context, call ethereum.CallMsg) (uint64, error)
	FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
	HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
	PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
	PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
}

type ChainSubscriber

type ChainSubscriber interface {
	SubscribeFilterLogs(q ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
}

type ChainWriter

type ChainWriter interface {
	SendTransaction(ctx context.Context, tx *types.Transaction) error
}

type Context

type Context struct {
	context.Context
	// contains filtered or unexported fields
}

func NewContext

func NewContext(
	ctx context.Context, ethClient eth.Client, logger log.Logger, db ethdb.KeyValueStore,
) *Context

func UnwrapContext

func UnwrapContext(ctx context.Context) *Context

UnwrapContext unwraps the sdk context.

func (*Context) Chain

func (c *Context) Chain() eth.Client

func (*Context) DB

func (c *Context) DB() ethdb.KeyValueStore

func (*Context) Logger

func (c *Context) Logger() log.Logger

Directories

Path Synopsis
kms
aws
queue
mem
package mem provides an in-memory implementation of a queue data structure.
package mem provides an in-memory implementation of a queue data structure.
sqs
package sqs provides an aws sqs backed implementation of a queue data structure.
package sqs provides an aws sqs backed implementation of a queue data structure.

Jump to

Keyboard shortcuts

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