evm

package
v1.16.64 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: GPL-3.0, BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VM

type VM struct {
	IsPlugin bool
}

VM implements the Snowman ChainVM interface for the C-Chain

func (*VM) BuildBlock

func (vm *VM) BuildBlock(ctx context.Context) (block.Block, error)

BuildBlock builds a new block

func (*VM) Connected added in v1.16.39

func (vm *VM) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion interface{}) error

Connected is called when a new node is connected

func (*VM) Disconnected added in v1.16.39

func (vm *VM) Disconnected(ctx context.Context, nodeID ids.NodeID) error

Disconnected is called when a node is disconnected

func (*VM) GetBlock

func (vm *VM) GetBlock(ctx context.Context, blkID ids.ID) (block.Block, error)

GetBlock returns a block by its ID

func (*VM) GetBlockIDAtHeight added in v0.15.4

func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error)

GetBlockIDAtHeight returns the block ID at a specific height

func (*VM) HealthCheck added in v0.15.4

func (vm *VM) HealthCheck(ctx context.Context) (interface{}, error)

HealthCheck returns health status of the VM

func (*VM) Initialize

func (vm *VM) Initialize(
	ctx context.Context,
	chainCtx interface{},
	db interface{},
	genesisBytes []byte,
	upgradeBytes []byte,
	configBytes []byte,
	msgChan interface{},
	fxs []interface{},
	appSender interface{},
) error

Initialize implements the snowman.ChainVM interface

func (*VM) LastAccepted

func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error)

LastAccepted returns the ID of the last accepted block

func (*VM) NewHTTPHandler added in v0.15.5

func (vm *VM) NewHTTPHandler(ctx context.Context) (interface{}, error)

NewHTTPHandler returns the HTTP handlers for the VM

func (*VM) ParseBlock

func (vm *VM) ParseBlock(ctx context.Context, b []byte) (block.Block, error)

ParseBlock parses a block from bytes

func (*VM) SetPreference

func (vm *VM) SetPreference(ctx context.Context, blkID ids.ID) error

SetPreference sets the preferred block

func (*VM) SetState added in v0.15.4

func (vm *VM) SetState(ctx context.Context, state uint32) error

SetState sets the VM state

func (*VM) Shutdown

func (vm *VM) Shutdown(ctx context.Context) error

Shutdown shuts down the VM

func (*VM) Version added in v0.15.4

func (vm *VM) Version(ctx context.Context) (string, error)

Version returns the VM version

func (*VM) WaitForEvent added in v0.15.5

func (vm *VM) WaitForEvent(ctx context.Context) (interface{}, error)

WaitForEvent blocks until an event occurs that should trigger block building

Jump to

Keyboard shortcuts

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