Documentation ¶
Index ¶
- type Blockchain
- func (b *Blockchain) AccountExists(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
- func (b *Blockchain) ConvertKIntToAddress(addrAsK m.KReference, ms *m.ModelState) ([]byte, bool)
- func (b *Blockchain) GetBalance(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
- func (b *Blockchain) GetBlockhash(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
- func (b *Blockchain) GetCode(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
- func (b *Blockchain) GetNonce(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
- func (b *Blockchain) GetStorageData(kaddr m.KReference, kindex m.KReference, lbl m.KLabel, sort m.Sort, ...) (m.KReference, error)
- func (b *Blockchain) IsCodeEmpty(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ...) (m.KReference, error)
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.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
AccountExists adapts between K model and elrond function
func (*Blockchain) ConvertKIntToAddress ¶
func (b *Blockchain) ConvertKIntToAddress(addrAsK m.KReference, ms *m.ModelState) ([]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.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
GetBalance adapts between K model and elrond function
func (*Blockchain) GetBlockhash ¶
func (b *Blockchain) GetBlockhash(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
GetBlockhash adapts between K model and elrond function
func (*Blockchain) GetCode ¶
func (b *Blockchain) GetCode(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
GetCode adapts between K model and elrond function
func (*Blockchain) GetNonce ¶
func (b *Blockchain) GetNonce(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
GetNonce adapts between K model and elrond function
func (*Blockchain) GetStorageData ¶
func (b *Blockchain) GetStorageData(kaddr m.KReference, kindex m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
GetStorageData adapts between K model and elrond function
func (*Blockchain) IsCodeEmpty ¶
func (b *Blockchain) IsCodeEmpty(c m.KReference, lbl m.KLabel, sort m.Sort, config m.KReference, ms *m.ModelState) (m.KReference, error)
IsCodeEmpty adapts between K model and elrond function