environment

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EvmLog = logger.GetLogger(logger.MODULE_VM)

Functions

This section is empty.

Types

type Block

type Block struct {
	Coinbase   *evmutils.Int // create address
	Timestamp  *evmutils.Int // MillisSeconds
	Number     *evmutils.Int // block height
	Difficulty *evmutils.Int
	GasLimit   *evmutils.Int
}

type Config

type Config struct {
	AddrType int32 //0: eth type, 1 zxl type
	ChainId  string
}

type Context

type Context struct {
	Block       Block
	Contract    Contract
	Transaction Transaction
	Message     Message
	Parameters  map[string][]byte
	Cfg         Config
}

type Contract

type Contract struct {
	Address *evmutils.Int
	Code    []byte
	Hash    *evmutils.Int
	// contains filtered or unexported fields
}

func (*Contract) IsValidJump

func (c *Contract) IsValidJump(dest uint64) (bool, error)

type Message

type Message struct {
	Caller *evmutils.Int // caller address
	Value  *evmutils.Int
	Data   []byte // func & param
}

func (Message) DataSize

func (m Message) DataSize() uint64

type Transaction

type Transaction struct {
	TxHash   []byte
	Origin   *evmutils.Int
	GasPrice *evmutils.Int
	GasLimit *evmutils.Int
	BaseFee  *evmutils.Int
}

Jump to

Keyboard shortcuts

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