model

package
Version: v1.65.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 3 Imported by: 12

Documentation

Index

Constants

View Source
const (
	// WordBitSize 内存中存储的字,占用多少位
	WordBitSize = 256
	// WordByteSize 内存中存储的字,占用多少字节
	WordByteSize = WordBitSize / 8
)

Variables

View Source
var (
	// ErrOutOfGas                 out of gas
	ErrOutOfGas = errors.New("out of gas")
	// ErrCodeStoreOutOfGas        contract creation code storage out of gas
	ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas")
	// ErrDepth                    max call depth exceeded
	ErrDepth               = errors.New("max call depth exceeded")
	ErrInsufficientBalance = errors.New("insufficient balance for transfer")
	// ErrContractAddressCollision contract address collision
	ErrContractAddressCollision = errors.New("contract address collision")

	ErrContractNotExist = errors.New("contract not exist")

	ErrABINotExist = errors.New("ABI not exist")
	// ErrGasUintOverflow          gas uint64 overflow
	ErrGasUintOverflow = errors.New("gas uint64 overflow")
	// ErrAddrNotExists            address not exists
	ErrAddrNotExists = errors.New("address not exists")
	// ErrTransferBetweenContracts transferring between contracts not supports
	ErrTransferBetweenContracts = errors.New("transferring between contracts not supports")
	// ErrTransferBetweenEOA       transferring between external accounts not supports
	ErrTransferBetweenEOA = errors.New("transferring between external accounts not supports")
	// ErrNoCreator                contract has no creator information
	ErrNoCreator = errors.New("contract has no creator information")
	// ErrDestruct                 contract has been destructed
	ErrDestruct = errors.New("contract has been destructed")

	// ErrWriteProtection       evm: write protection
	ErrWriteProtection = errors.New("evm: write protection")
	// ErrReturnDataOutOfBounds evm: return data out of bounds
	ErrReturnDataOutOfBounds = errors.New("evm: return data out of bounds")
	// ErrExecutionReverted     evm: execution reverted
	ErrExecutionReverted = errors.New("evm: execution reverted")
	// ErrMaxCodeSizeExceeded   evm: max code size exceeded
	ErrMaxCodeSizeExceeded = errors.New("evm: max code size exceeded")

	// ErrNoCoinsAccount no coins account in executor!
	ErrNoCoinsAccount = errors.New("no coins account in executor")
	// ErrReturnStackExceeded return stack limit reached
	ErrReturnStackExceeded = errors.New("return stack limit reached")
	// ErrInvalidSubroutineEntry invalid subroutine entry
	ErrInvalidSubroutineEntry = errors.New("invalid subroutine entry")
	// ErrInvalidJump invalid jump destination
	ErrInvalidJump = errors.New("invalid jump destination")
	// ErrInvalidRetsub invalid retsub
	ErrInvalidRetsub = errors.New("invalid retsub")
	// 没有配置gas
	ErrNoGasConfigured = errors.New("ErrNoGasConfigured")
)

Functions

This section is empty.

Types

type ContractLog

type ContractLog struct {
	// Address 合约地址
	Address common.Address

	// TxHash 对应交易哈希
	TxHash common.Hash

	// Index 日志序号
	Index int

	// Topics 此合约提供的主题信息
	Topics []common.Hash

	// Data 日志数据
	Data []byte
	// 区块高度
	BlockNumber uint64 `json:"blockNumber"`
	// index of the transaction in the block
	TxIndex uint `json:"transactionIndex"`
	// hash of the block in which the transaction was included
	BlockHash common.Hash `json:"blockHash"`
}

ContractLog 合约在日志,对应EVM中的Log指令,可以生成指定的日志信息 目前这些日志只是在合约执行完成时进行打印,没有其它用途

func (*ContractLog) PrintLog

func (log *ContractLog) PrintLog()

PrintLog 合约日志打印格式

Jump to

Keyboard shortcuts

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