recorder

package
v0.0.0-...-ef390af Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ChainID   *big.Int
	ChainName string
	HMACKey   string
}

type Dependencies

type Dependencies struct {
	Client           map[string]client.ETHClient
	DB               *gorm.DB
	ERC721SwapAgent  map[string]erc721agent.SwapAgent
	ERC721Token      map[string]erc721token.IToken
	ERC1155SwapAgent map[string]erc1155agent.SwapAgent
	ERC1155Token     map[string]erc1155token.IToken
}

type IRecorder

type IRecorder interface {
	Block(height int64) (*corecommon.Block, error)
	ChainID() string
	Delete(tx *gorm.DB, height int64) error
	LatestBlockCached() *corecommon.Block
	Record(tx *gorm.DB, block *block.Log) error
}

type Recorder

type Recorder struct {
	// contains filtered or unexported fields
}

func NewRecorder

func NewRecorder(c *Config, d *Dependencies) *Recorder

func (*Recorder) Block

func (r *Recorder) Block(height int64) (*common.Block, error)

func (*Recorder) ChainID

func (r *Recorder) ChainID() string

func (*Recorder) ChainName

func (r *Recorder) ChainName() string

func (*Recorder) Delete

func (r *Recorder) Delete(tx *gorm.DB, height int64) error

func (*Recorder) LatestBlockCached

func (r *Recorder) LatestBlockCached() *common.Block

func (*Recorder) Record

func (r *Recorder) Record(tx *gorm.DB, b *block.Log) error

Jump to

Keyboard shortcuts

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