Documentation ¶
Index ¶
- Variables
- type EnginContextContract
- func (pc *EnginContextContract) AccountData(addr string, name []byte) []byte
- func (pc *EnginContextContract) AddrSeq(addr string) uint64
- func (pc *EnginContextContract) ChainID() *big.Int
- func (pc *EnginContextContract) ContractAddress() string
- func (pc *EnginContextContract) ContractData(name []byte) []byte
- func (pc *EnginContextContract) Exec(Addr string, MethodName string, Args []interface{}) ([]interface{}, error)
- func (pc *EnginContextContract) From() string
- func (pc *EnginContextContract) Hash() string
- func (pc *EnginContextContract) IsContract(addr string) bool
- func (pc *EnginContextContract) IsGenerator(addr string) bool
- func (pc *EnginContextContract) LastTimestamp() uint64
- func (pc *EnginContextContract) MainToken() string
- func (pc *EnginContextContract) Master() string
- func (pc *EnginContextContract) NextSeq() uint32
- func (pc *EnginContextContract) PrevHash() string
- func (pc *EnginContextContract) SetAccountData(addr string, name []byte, value []byte)
- func (pc *EnginContextContract) SetContractData(name []byte, value []byte)
- func (pc *EnginContextContract) TargetHeight() uint32
- func (pc *EnginContextContract) Version() uint16
Constants ¶
This section is empty.
Variables ¶
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