Documentation ¶
Index ¶
- type CosVM
- type CosVMNative
- func (w *CosVMNative) ContractCall(owner, contract, method string, paramsData []byte, coins uint64)
- func (w *CosVMNative) ContractCalledByUser() bool
- func (w *CosVMNative) ContractTransferToContract(owner, contract string, amount uint64)
- func (w *CosVMNative) ContractTransferToUser(to string, amount uint64)
- func (w *CosVMNative) ContractTransferToUserVest(to string, amount uint64)
- func (w *CosVMNative) CosAbort()
- func (w *CosVMNative) CosAssert(condition bool, msg string)
- func (w *CosVMNative) CurrentBlockNumber() uint64
- func (w *CosVMNative) CurrentBlockProducer() string
- func (w *CosVMNative) CurrentTimestamp() uint64
- func (w *CosVMNative) GetBlockProducers() string
- func (w *CosVMNative) GetContractBalance(contract string, name string) uint64
- func (w *CosVMNative) GetCopyrightAdmin() (name string)
- func (w *CosVMNative) GetReputationAdmin() (name string)
- func (w *CosVMNative) GetUserBalance(name string) uint64
- func (w *CosVMNative) PrintInt64(value int64)
- func (w *CosVMNative) PrintString(str string)
- func (w *CosVMNative) PrintUint64(value uint64)
- func (w *CosVMNative) ReadCallingContractName() string
- func (w *CosVMNative) ReadCallingContractOwner() string
- func (w *CosVMNative) ReadContractCaller() string
- func (w *CosVMNative) ReadContractMethod() string
- func (w *CosVMNative) ReadContractName() string
- func (w *CosVMNative) ReadContractOpParams() string
- func (w *CosVMNative) ReadContractOwner() string
- func (w *CosVMNative) ReadContractSenderValue() uint64
- func (w *CosVMNative) RequiredAuth(name string)
- func (w *CosVMNative) SetCopyrightAdmin(name string)
- func (w *CosVMNative) SetReputationAdmin(name string)
- func (w *CosVMNative) SetUserCopyright(postId uint64, value uint32, memo string)
- func (w *CosVMNative) SetUserFreeze(name string, value uint32, memo string)
- func (w *CosVMNative) SetUserReputation(name string, value uint32, memo string)
- func (w *CosVMNative) TableDeleteRecord(tableName string, primary []byte)
- func (w *CosVMNative) TableGetRecord(tableName string, primary []byte) []byte
- func (w *CosVMNative) TableGetRecordEx(ownerName, contractName, tableName string, primary []byte) []byte
- func (w *CosVMNative) TableNewRecord(tableName string, record []byte)
- func (w *CosVMNative) TableUpdateRecord(tableName string, primary []byte, record []byte)
- func (w *CosVMNative) UserExist(name string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CosVM ¶
func NewCosVM ¶
func NewCosVM(ctx *vmcontext.Context, db iservices.IDatabaseRW, props *prototype.DynamicProperties, logger *logrus.Logger) *CosVM
type CosVMNative ¶
type CosVMNative struct {
// contains filtered or unexported fields
}
func NewCosVMNative ¶
func NewCosVMNative(vm *CosVM) *CosVMNative
func (*CosVMNative) ContractCall ¶
func (w *CosVMNative) ContractCall(owner, contract, method string, paramsData []byte, coins uint64)
func (*CosVMNative) ContractCalledByUser ¶
func (w *CosVMNative) ContractCalledByUser() bool
func (*CosVMNative) ContractTransferToContract ¶
func (w *CosVMNative) ContractTransferToContract(owner, contract string, amount uint64)
func (*CosVMNative) ContractTransferToUser ¶
func (w *CosVMNative) ContractTransferToUser(to string, amount uint64)
func (*CosVMNative) ContractTransferToUserVest ¶ added in v1.0.4
func (w *CosVMNative) ContractTransferToUserVest(to string, amount uint64)
func (*CosVMNative) CosAbort ¶
func (w *CosVMNative) CosAbort()
func (*CosVMNative) CosAssert ¶
func (w *CosVMNative) CosAssert(condition bool, msg string)
func (*CosVMNative) CurrentBlockNumber ¶
func (w *CosVMNative) CurrentBlockNumber() uint64
func (*CosVMNative) CurrentBlockProducer ¶
func (w *CosVMNative) CurrentBlockProducer() string
func (*CosVMNative) CurrentTimestamp ¶
func (w *CosVMNative) CurrentTimestamp() uint64
func (*CosVMNative) GetBlockProducers ¶
func (w *CosVMNative) GetBlockProducers() string
func (*CosVMNative) GetContractBalance ¶
func (w *CosVMNative) GetContractBalance(contract string, name string) uint64
func (*CosVMNative) GetCopyrightAdmin ¶
func (w *CosVMNative) GetCopyrightAdmin() (name string)
func (*CosVMNative) GetReputationAdmin ¶
func (w *CosVMNative) GetReputationAdmin() (name string)
func (*CosVMNative) GetUserBalance ¶
func (w *CosVMNative) GetUserBalance(name string) uint64
func (*CosVMNative) PrintInt64 ¶
func (w *CosVMNative) PrintInt64(value int64)
func (*CosVMNative) PrintString ¶
func (w *CosVMNative) PrintString(str string)
func (*CosVMNative) PrintUint64 ¶
func (w *CosVMNative) PrintUint64(value uint64)
func (*CosVMNative) ReadCallingContractName ¶
func (w *CosVMNative) ReadCallingContractName() string
func (*CosVMNative) ReadCallingContractOwner ¶
func (w *CosVMNative) ReadCallingContractOwner() string
func (*CosVMNative) ReadContractCaller ¶
func (w *CosVMNative) ReadContractCaller() string
func (*CosVMNative) ReadContractMethod ¶
func (w *CosVMNative) ReadContractMethod() string
func (*CosVMNative) ReadContractName ¶
func (w *CosVMNative) ReadContractName() string
func (*CosVMNative) ReadContractOpParams ¶
func (w *CosVMNative) ReadContractOpParams() string
func (*CosVMNative) ReadContractOwner ¶
func (w *CosVMNative) ReadContractOwner() string
func (*CosVMNative) ReadContractSenderValue ¶
func (w *CosVMNative) ReadContractSenderValue() uint64
func (*CosVMNative) RequiredAuth ¶
func (w *CosVMNative) RequiredAuth(name string)
func (*CosVMNative) SetCopyrightAdmin ¶
func (w *CosVMNative) SetCopyrightAdmin(name string)
func (*CosVMNative) SetReputationAdmin ¶
func (w *CosVMNative) SetReputationAdmin(name string)
func (*CosVMNative) SetUserCopyright ¶
func (w *CosVMNative) SetUserCopyright(postId uint64, value uint32, memo string)
func (*CosVMNative) SetUserFreeze ¶
func (w *CosVMNative) SetUserFreeze(name string, value uint32, memo string)
func (*CosVMNative) SetUserReputation ¶
func (w *CosVMNative) SetUserReputation(name string, value uint32, memo string)
func (*CosVMNative) TableDeleteRecord ¶
func (w *CosVMNative) TableDeleteRecord(tableName string, primary []byte)
func (*CosVMNative) TableGetRecord ¶
func (w *CosVMNative) TableGetRecord(tableName string, primary []byte) []byte
func (*CosVMNative) TableGetRecordEx ¶
func (w *CosVMNative) TableGetRecordEx(ownerName, contractName, tableName string, primary []byte) []byte
func (*CosVMNative) TableNewRecord ¶
func (w *CosVMNative) TableNewRecord(tableName string, record []byte)
func (*CosVMNative) TableUpdateRecord ¶
func (w *CosVMNative) TableUpdateRecord(tableName string, primary []byte, record []byte)
func (*CosVMNative) UserExist ¶
func (w *CosVMNative) UserExist(name string) bool
Click to show internal directories.
Click to hide internal directories.