Documentation ¶
Index ¶
- Constants
- Variables
- func NewIPFilter(handler http.Handler)
- type Batch
- type Block
- type Database
- func (db Database) Ancient(kind string, number uint64) ([]byte, error)
- func (db Database) AncientSize(kind string) (uint64, error)
- func (db Database) Ancients() (uint64, error)
- func (db Database) AppendAncient(number uint64, hash, header, body, receipts, td []byte) error
- func (db Database) HasAncient(kind string, number uint64) (bool, error)
- func (db Database) NewBatch() ethdb.Batch
- func (db Database) NewIterator() ethdb.Iterator
- func (db Database) NewIteratorWithPrefix(prefix []byte) ethdb.Iterator
- func (db Database) NewIteratorWithStart(start []byte) ethdb.Iterator
- func (db Database) Sync() error
- func (db Database) TruncateAncients(items uint64) error
- type DebugAPI
- type Factory
- type GetAcceptedFrontReply
- type NetAPI
- type SnowmanAPI
- type StaticService
- type VM
- func (vm *VM) BuildBlock() (snowman.Block, error)
- func (vm *VM) CreateHandlers() map[string]*commonEng.HTTPHandler
- func (vm *VM) CreateStaticHandlers() map[string]*commonEng.HTTPHandler
- func (vm *VM) GetBlock(id ids.ID) (snowman.Block, error)
- func (vm *VM) Initialize(ctx *snow.Context, db database.Database, b []byte, ...) error
- func (vm *VM) LastAccepted() ids.ID
- func (vm *VM) ParseBlock(b []byte) (snowman.Block, error)
- func (vm *VM) SetPreference(blkID ids.ID)
- func (vm *VM) Shutdown() error
- type Web3API
Constants ¶
const ( GenesisTestAddr = "0x751a0b96e1042bee789452ecb20253fba40dbe85" GenesisTestKey = "0xabd71b35d559563fea757f0f5edbde286fb8c043105b15abb7cd57189306d7d1" )
test constants
Variables ¶
var (
ID = ids.NewID([32]byte{'e', 'v', 'm'})
)
ID this VM should be referenced by
Functions ¶
func NewIPFilter ¶ added in v0.2.1
func NewIPFilter(handler http.Handler)
Types ¶
type Block ¶
type Block struct {
// contains filtered or unexported fields
}
Block implements the snowman.Block interface
type Database ¶
Database implements ethdb.Database
func (Database) AncientSize ¶
AncientSize returns an error as we don't have a backing chain freezer.
func (Database) AppendAncient ¶
AppendAncient returns an error as we don't have a backing chain freezer.
func (Database) HasAncient ¶
HasAncient returns an error as we don't have a backing chain freezer.
func (Database) NewIterator ¶
NewIterator implements ethdb.Database
func (Database) NewIteratorWithPrefix ¶
NewIteratorWithPrefix implements ethdb.Database
func (Database) NewIteratorWithStart ¶
NewIteratorWithStart implements ethdb.Database
func (Database) TruncateAncients ¶
TruncateAncients returns an error as we don't have a backing chain freezer.
type DebugAPI ¶
type DebugAPI struct {
// contains filtered or unexported fields
}
DebugAPI introduces helper functions for debuging
func (*DebugAPI) GetGenesisBalance ¶
GetGenesisBalance returns the current funds in the genesis
func (*DebugAPI) IssueBlock ¶
IssueBlock to the chain
type GetAcceptedFrontReply ¶
type GetAcceptedFrontReply struct { Hash common.Hash `json:"hash"` Number *big.Int `json:"number"` }
GetAcceptedFrontReply defines the reply that will be sent from the GetAcceptedFront API call
type NetAPI ¶
type NetAPI struct {
// contains filtered or unexported fields
}
NetAPI offers network related API methods
func (*NetAPI) Listening ¶
Listening returns an indication if the node is listening for network connections.
type SnowmanAPI ¶
type SnowmanAPI struct {
// contains filtered or unexported fields
}
SnowmanAPI introduces snowman specific functionality to the evm
func (*SnowmanAPI) GetAcceptedFront ¶
func (api *SnowmanAPI) GetAcceptedFront(ctx context.Context) (*GetAcceptedFrontReply, error)
GetAcceptedFront returns the last accepted block's hash and height
type StaticService ¶
type StaticService struct{}
StaticService defines the static API services exposed by the evm
func (*StaticService) BuildGenesis ¶
func (*StaticService) BuildGenesis(_ context.Context, args *core.Genesis) (formatting.CB58, error)
BuildGenesis returns the UTXOs such that at least one address in [args.Addresses] is referenced in the UTXO.
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
VM implements the snowman.ChainVM interface
func (*VM) BuildBlock ¶
BuildBlock implements the snowman.ChainVM interface
func (*VM) CreateHandlers ¶
func (vm *VM) CreateHandlers() map[string]*commonEng.HTTPHandler
CreateHandlers makes new http handlers that can handle API calls
func (*VM) CreateStaticHandlers ¶
func (vm *VM) CreateStaticHandlers() map[string]*commonEng.HTTPHandler
CreateStaticHandlers makes new http handlers that can handle API calls
func (*VM) Initialize ¶
func (vm *VM) Initialize( ctx *snow.Context, db database.Database, b []byte, toEngine chan<- commonEng.Message, fxs []*commonEng.Fx, ) error
Initialize implements the snowman.ChainVM interface
func (*VM) LastAccepted ¶
LastAccepted returns the ID of the block that was last accepted
func (*VM) ParseBlock ¶
ParseBlock implements the snowman.ChainVM interface
func (*VM) SetPreference ¶
SetPreference sets what the current tail of the chain is
type Web3API ¶
type Web3API struct{}
Web3API offers helper API methods
func (*Web3API) ClientVersion ¶
ClientVersion returns the version of the vm running