engincontext

package
v0.0.0-...-24e5678 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ENGIN_CONTRACT_PREFIX = byte(0x01)
)

Functions

This section is empty.

Types

type EnginContextContract

type EnginContextContract struct {
	// contains filtered or unexported fields
}

func NewEnginContextContract

func NewEnginContextContract(contAddr, marster common.Address, cc *types.ContractContext) *EnginContextContract

func (*EnginContextContract) AccountData

func (pc *EnginContextContract) AccountData(addr string, name []byte) []byte

AccountData returns the account data from the top snapshot

func (*EnginContextContract) AddrSeq

func (pc *EnginContextContract) AddrSeq(addr string) uint64

Seq returns the sequence of the target account

func (*EnginContextContract) ChainID

func (pc *EnginContextContract) ChainID() *big.Int

ChainID returns the id of the chain

func (*EnginContextContract) ContractAddress

func (pc *EnginContextContract) ContractAddress() string

ChainID returns the id of the chain

func (*EnginContextContract) ContractData

func (pc *EnginContextContract) ContractData(name []byte) []byte

ContractData returns the contract data from the top snapshot

func (*EnginContextContract) Exec

func (pc *EnginContextContract) Exec(Addr string, MethodName string, Args []interface{}) ([]interface{}, error)

func (*EnginContextContract) From

func (pc *EnginContextContract) From() string

From returns current signer address

func (*EnginContextContract) Hash

func (pc *EnginContextContract) Hash() string

Hash returns the hash value of it

func (*EnginContextContract) IsContract

func (pc *EnginContextContract) IsContract(addr string) bool

IsContract returns is the contract

func (*EnginContextContract) IsGenerator

func (pc *EnginContextContract) IsGenerator(addr string) bool

IsGenerator returns the account is generator or not

func (*EnginContextContract) LastTimestamp

func (pc *EnginContextContract) LastTimestamp() uint64

LastTimestamp returns the recorded prev timestamp when ContractContext generation

func (*EnginContextContract) MainToken

func (pc *EnginContextContract) MainToken() string

MainToken returns the MainToken

func (*EnginContextContract) Master

func (pc *EnginContextContract) Master() string

ChainID returns the id of the chain

func (*EnginContextContract) NextSeq

func (pc *EnginContextContract) NextSeq() uint32

NextSeq returns the next squence number

func (*EnginContextContract) PrevHash

func (pc *EnginContextContract) PrevHash() string

PrevHash returns the recorded prev hash when ContractContext generation

func (*EnginContextContract) SetAccountData

func (pc *EnginContextContract) SetAccountData(addr string, name []byte, value []byte)

SetAccountData inserts the account data to the top snapshot

func (*EnginContextContract) SetContractData

func (pc *EnginContextContract) SetContractData(name []byte, value []byte)

SetContractData inserts the contract data to the top snapshot

func (*EnginContextContract) TargetHeight

func (pc *EnginContextContract) TargetHeight() uint32

TargetHeight returns the recorded target height when ContractContext generation

func (*EnginContextContract) Version

func (pc *EnginContextContract) Version() uint16

Version returns the version of the chain

Jump to

Keyboard shortcuts

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