dev

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBackend

func NewBackend(arbcore core.ArbCore, db *txdb.TxDB, l1 *L1Emulator, signer types.Signer) (*Backend, error)

func NewDevNode

func NewDevNode(dir string, config protocol.ChainParams) (*staker.Monitor, *Backend, *txdb.TxDB, common.Address)

func (*Backend) AddInboxMessage

func (b *Backend) AddInboxMessage(msg message.Message, sender common.Address) (common.Hash, error)

func (*Backend) ExportData

func (b *Backend) ExportData() ([]byte, error)

func (*Backend) PendingSnapshot

func (b *Backend) PendingSnapshot() (*snapshot.Snapshot, error)

Return nil if no pending snapshot is available

func (*Backend) PendingTransactionCount

func (b *Backend) PendingTransactionCount(_ context.Context, _ common.Address) *uint64

Return nil if no pending transaction count is available

func (*Backend) Reorg

func (b *Backend) Reorg(height uint64) error

func (*Backend) SendTransaction

func (b *Backend) SendTransaction(_ context.Context, tx *types.Transaction) error

func (*Backend) SubscribeNewTxsEvent

func (b *Backend) SubscribeNewTxsEvent(ch chan<- core2.NewTxsEvent) event.Subscription

type EVM

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

func NewEVM

func NewEVM(backend *Backend) *EVM

func (*EVM) IncreaseTime

func (s *EVM) IncreaseTime(amount int64) (string, error)

func (*EVM) Mine

func (s *EVM) Mine(timestamp *hexutil.Uint64) error

func (*EVM) Revert

func (s *EVM) Revert(snapId hexutil.Uint64) error

func (*EVM) Snapshot

func (s *EVM) Snapshot() (hexutil.Uint64, error)

type L1BlockInfo

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

type L1Emulator

type L1Emulator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewL1Emulator

func NewL1Emulator() *L1Emulator

func (*L1Emulator) BlockIdForHeight

func (b *L1Emulator) BlockIdForHeight(_ context.Context, height *common.TimeBlocks) (*common.BlockId, error)

func (*L1Emulator) GenerateBlock

func (b *L1Emulator) GenerateBlock() L1BlockInfo

func (*L1Emulator) IncreaseTime

func (b *L1Emulator) IncreaseTime(amount int64)

func (*L1Emulator) Latest

func (b *L1Emulator) Latest() L1BlockInfo

func (*L1Emulator) Reorg

func (b *L1Emulator) Reorg(height uint64)

func (*L1Emulator) SetTime

func (b *L1Emulator) SetTime(timestamp int64)

func (*L1Emulator) TimestampForBlockHash

func (b *L1Emulator) TimestampForBlockHash(_ context.Context, hash common.Hash) (*big.Int, error)

Jump to

Keyboard shortcuts

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