blockchainadapter

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blockchain

type Blockchain struct {
	// Upstream is the world state callback, which is common to all VMs
	Upstream vmi.BlockchainHook

	// AddressLength is the expected length of an address, in bytes
	AddressLength int
}

Blockchain is an adapter between K and the outside world This class is specific to only 1 generated interpreter

func (*Blockchain) AccountExists

func (b *Blockchain) AccountExists(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

AccountExists adapts between K model and elrond function

func (*Blockchain) ConvertKIntToAddress

func (b *Blockchain) ConvertKIntToAddress(addrAsK m.K) ([]byte, bool)

ConvertKIntToAddress takes a K Int and converts it to an address with the correct number of bytes, will pad left with zeroes, based on the configured address length

func (*Blockchain) GetBalance

func (b *Blockchain) GetBalance(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

GetBalance adapts between K model and elrond function

func (*Blockchain) GetBlockhash

func (b *Blockchain) GetBlockhash(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

GetBlockhash adapts between K model and elrond function

func (*Blockchain) GetCode

func (b *Blockchain) GetCode(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

GetCode adapts between K model and elrond function

func (*Blockchain) GetNonce

func (b *Blockchain) GetNonce(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

GetNonce adapts between K model and elrond function

func (*Blockchain) GetStorageData

func (b *Blockchain) GetStorageData(kaddr m.K, kindex m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

GetStorageData adapts between K model and elrond function

func (*Blockchain) IsCodeEmpty

func (b *Blockchain) IsCodeEmpty(c m.K, lbl m.KLabel, sort m.Sort, config m.K) (m.K, error)

IsCodeEmpty adapts between K model and elrond function

Jump to

Keyboard shortcuts

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