rollup

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexerServiceName = "RollupIndexerService"

	WaitHandleTime = 10
)

Variables

This section is empty.

Functions

func DataToBigInt

func DataToBigInt(vLog ethtypes.Log, index int64) *big.Int

func DataToString

func DataToString(vLog ethtypes.Log, index int64) string

func TopicToAddress

func TopicToAddress(vLog ethtypes.Log, index int64) common.Address

func TopicToHash

func TopicToHash(vLog ethtypes.Log, index int64) common.Hash

Types

type DepositEvent

type DepositEvent struct {
	Sender    common.Address
	ToAddress common.Address
	Amount    *big.Int
}

type IndexerService

type IndexerService struct {
	service.BaseService
	// contains filtered or unexported fields
}

IndexerService indexes transactions for json-rpc service.

func NewIndexerService

func NewIndexerService(
	ethCli *ethclient.Client,
	config *config.BitcoinConfig,
	db *gorm.DB,
	log log.Logger,
) *IndexerService

NewIndexerService returns a new service instance.

func (*IndexerService) OnStart

func (bis *IndexerService) OnStart() error

OnStart implements service.Service by subscribing for new blocks and indexing them by events.

type WithdrawEvent

type WithdrawEvent struct {
	FromAddress common.Address
	ToAddress   string
	Amount      *big.Int
}

Jump to

Keyboard shortcuts

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