bridge

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainContext

type ChainContext struct {
	Chain consensus.ChainHeaderReader
	Child consensus.Engine
}

func (ChainContext) Engine

func (c ChainContext) Engine() consensus.Engine

func (ChainContext) GetHeader

func (c ChainContext) GetHeader(hash common.Hash, number uint64) *types.Header

type EventRecord

type EventRecord struct {
	ID       uint64         `json:"id" yaml:"id"`
	Contract common.Address `json:"contract" yaml:"contract"`
	Data     hexutil.Bytes  `json:"data" yaml:"data"`
	TxHash   common.Hash    `json:"tx_hash" yaml:"tx_hash"`
	LogIndex uint64         `json:"log_index" yaml:"log_index"`
	ChainID  string         `json:"child_chain_id" yaml:"child_chain_id"`
}

EventRecord represents state record

type EventRecordWithTime

type EventRecordWithTime struct {
	EventRecord
	Time time.Time `json:"record_time" yaml:"record_time"`
}

func (*EventRecordWithTime) BuildEventRecord

func (e *EventRecordWithTime) BuildEventRecord() *EventRecord

func (*EventRecordWithTime) String

func (e *EventRecordWithTime) String(gasUsed uint64) string

String returns the string representation of EventRecord

type GenesisContract

type GenesisContract interface {
	CommitState(event *EventRecordWithTime, state *state.StateDB, header *types.Header, chCtx ChainContext) (uint64, error)
	LastStateId(snapshotNumber uint64) (*big.Int, error)
}

type StateSyncData

type StateSyncData struct {
	ID       uint64
	Contract common.Address
	Data     string
	TxHash   common.Hash
}

StateSyncData represents state received from Root Blockchain

type StateSyncEvent

type StateSyncEvent struct {
	Data *StateSyncData
}

StateSyncEvent represents state sync events

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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