environment

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 added in v2.2.0

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
	EvmLog      protocol.Logger
}

type Contract

type Contract struct {
	Address *evmutils.Int
	Code    []byte
	Hash    *evmutils.Int
	Version string

	IsCreate bool
	// 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
	BlobBaseFee *evmutils.Int
	BlobHashs   [][]byte
}

Source Files

  • block.go
  • context.go
  • contract.go
  • message.go
  • transaction.go

Jump to

Keyboard shortcuts

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