Documentation ¶
Index ¶
- type PluginContextContract
- func (pc *PluginContextContract) AccountData(addr string, name []byte) []byte
- func (pc *PluginContextContract) AddrSeq(addr string) uint64
- func (pc *PluginContextContract) ChainID() *big.Int
- func (pc *PluginContextContract) ContractAddress() string
- func (pc *PluginContextContract) ContractData(name []byte) []byte
- func (pc *PluginContextContract) Exec(Addr string, MethodName string, Args []interface{}) ([]interface{}, error)
- func (pc *PluginContextContract) From() string
- func (pc *PluginContextContract) Hash() string
- func (pc *PluginContextContract) IsContract(addr string) bool
- func (pc *PluginContextContract) IsGenerator(addr string) bool
- func (pc *PluginContextContract) LastTimestamp() uint64
- func (pc *PluginContextContract) MainToken() string
- func (pc *PluginContextContract) Master() string
- func (pc *PluginContextContract) NextSeq() uint32
- func (pc *PluginContextContract) PrevHash() string
- func (pc *PluginContextContract) SetAccountData(addr string, name []byte, value []byte)
- func (pc *PluginContextContract) SetContractData(name []byte, value []byte)
- func (pc *PluginContextContract) TargetHeight() uint32
- func (pc *PluginContextContract) Version() uint16
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluginContextContract ¶
type PluginContextContract struct {
// contains filtered or unexported fields
}
func NewPluginContextContract ¶
func NewPluginContextContract(cont types.Contract, cc *types.ContractContext) *PluginContextContract
func (*PluginContextContract) AccountData ¶
func (pc *PluginContextContract) AccountData(addr string, name []byte) []byte
AccountData returns the account data from the top snapshot
func (*PluginContextContract) AddrSeq ¶
func (pc *PluginContextContract) AddrSeq(addr string) uint64
Seq returns the sequence of the target account
func (*PluginContextContract) ChainID ¶
func (pc *PluginContextContract) ChainID() *big.Int
ChainID returns the id of the chain
func (*PluginContextContract) ContractAddress ¶
func (pc *PluginContextContract) ContractAddress() string
ChainID returns the id of the chain
func (*PluginContextContract) ContractData ¶
func (pc *PluginContextContract) ContractData(name []byte) []byte
ContractData returns the contract data from the top snapshot
func (*PluginContextContract) Exec ¶
func (pc *PluginContextContract) Exec(Addr string, MethodName string, Args []interface{}) ([]interface{}, error)
func (*PluginContextContract) From ¶
func (pc *PluginContextContract) From() string
From returns current signer address
func (*PluginContextContract) Hash ¶
func (pc *PluginContextContract) Hash() string
Hash returns the hash value of it
func (*PluginContextContract) IsContract ¶
func (pc *PluginContextContract) IsContract(addr string) bool
IsContract returns is the contract
func (*PluginContextContract) IsGenerator ¶
func (pc *PluginContextContract) IsGenerator(addr string) bool
IsGenerator returns the account is generator or not
func (*PluginContextContract) LastTimestamp ¶
func (pc *PluginContextContract) LastTimestamp() uint64
LastTimestamp returns the recorded prev timestamp when ContractContext generation
func (*PluginContextContract) MainToken ¶
func (pc *PluginContextContract) MainToken() string
MainToken returns the MainToken
func (*PluginContextContract) Master ¶
func (pc *PluginContextContract) Master() string
ChainID returns the id of the chain
func (*PluginContextContract) NextSeq ¶
func (pc *PluginContextContract) NextSeq() uint32
NextSeq returns the next squence number
func (*PluginContextContract) PrevHash ¶
func (pc *PluginContextContract) PrevHash() string
PrevHash returns the recorded prev hash when ContractContext generation
func (*PluginContextContract) SetAccountData ¶
func (pc *PluginContextContract) SetAccountData(addr string, name []byte, value []byte)
SetAccountData inserts the account data to the top snapshot
func (*PluginContextContract) SetContractData ¶
func (pc *PluginContextContract) SetContractData(name []byte, value []byte)
SetContractData inserts the contract data to the top snapshot
func (*PluginContextContract) TargetHeight ¶
func (pc *PluginContextContract) TargetHeight() uint32
TargetHeight returns the recorded target height when ContractContext generation
func (*PluginContextContract) Version ¶
func (pc *PluginContextContract) Version() uint16
Version returns the version of the chain