syscon

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: GPL-3.0, LGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatorOrSelf

func CreatorOrSelf(stateDb StateDB, toAddress *common.Address) common.Address

func GetGasLimit

func GetGasLimit(stateDb StateDB, toAddress *common.Address) (gasLmt uint64)

func GetMaxGasPrice

func GetMaxGasPrice(stateDb StateDB, toAddress *common.Address) (price *big.Int)

func GetModel

func GetModel(stateDb StateDB, toAddress *common.Address) uint64

func GetRealGas

func GetRealGas(stateDb StateDB, msg Message) uint64

func IsCallContract

func IsCallContract(stateDb StateDB, msg Message) bool

func ValidatePayByContract

func ValidatePayByContract(stateDb StateDB, fromAddress common.Address, msg Message) (err error, maxPrice *big.Int, limit uint64)

Types

type Message

type Message interface {
	To() *common.Address
	Gas() uint64
	GasPrice() *big.Int
	DataLen() int
}

Message represents a message sent to a contract.

type StateDB

type StateDB interface {
	GetState(common.Address, common.Hash) common.Hash
	SetState(addr common.Address, key, value common.Hash)
	HasCode(addr common.Address) bool
}

StateDB 从状态db获取状态

Jump to

Keyboard shortcuts

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