Documentation
¶
Overview ¶
nil processor takes any request and dos nothing, i.e. produces empty state update it is useful for testing
Index ¶
- Constants
- func GetProcessor() vmtypes.Processor
- type BalanceObject
- type ConfigObject
- type ParamsObject
- type RequestObject
- func (o *RequestObject) GetInt(keyId int32) int64
- func (o *RequestObject) GetObjectId(keyId int32, typeId int32) int32
- func (o *RequestObject) GetString(keyId int32) string
- func (o *RequestObject) Send(ctx interfaces.HostInterface)
- func (o *RequestObject) SetInt(keyId int32, value int64)
- func (o *RequestObject) SetString(keyId int32, value string)
- type RequestsArray
- func (a *RequestsArray) GetInt(keyId int32) int64
- func (a *RequestsArray) GetLength() int32
- func (a *RequestsArray) GetObjectId(keyId int32, typeId int32) int32
- func (a *RequestsArray) GetString(keyId int32) string
- func (a *RequestsArray) SetInt(keyId int32, value int64)
- func (a *RequestsArray) SetString(keyId int32, value string)
- type RootObject
- type StateArray
- func (a *StateArray) GetInt(keyId int32) int64
- func (a *StateArray) GetLength() int32
- func (a *StateArray) GetObjectId(keyId int32, typeId int32) int32
- func (a *StateArray) GetString(keyId int32) string
- func (a *StateArray) SetInt(keyId int32, value int64)
- func (a *StateArray) SetString(keyId int32, value string)
- type StateMap
- func (m *StateMap) GetInt(keyId int32) int64
- func (m *StateMap) GetLength() int32
- func (m *StateMap) GetObjectId(keyId int32, typeId int32) int32
- func (m *StateMap) GetString(keyId int32) string
- func (m *StateMap) SetInt(keyId int32, value int64)
- func (m *StateMap) SetString(keyId int32, value string)
- type StateObject
- type TransferObject
- func (o *TransferObject) GetInt(keyId int32) int64
- func (o *TransferObject) GetObjectId(keyId int32, typeId int32) int32
- func (o *TransferObject) GetString(keyId int32) string
- func (o *TransferObject) Send(ctx interfaces.HostInterface)
- func (o *TransferObject) SetInt(keyId int32, value int64)
- func (o *TransferObject) SetString(keyId int32, value string)
- type TransfersArray
- func (a *TransfersArray) GetInt(keyId int32) int64
- func (a *TransfersArray) GetLength() int32
- func (a *TransfersArray) GetObjectId(keyId int32, typeId int32) int32
- func (a *TransfersArray) GetString(keyId int32) string
- func (a *TransfersArray) SetInt(keyId int32, value int64)
- func (a *TransfersArray) SetString(keyId int32, value string)
Constants ¶
View Source
const ( KeyBalance = interfaces.KeyUserDefined KeyConfig = KeyBalance - 1 KeyOwner = KeyConfig - 1 KeyParams = KeyOwner - 1 KeyRandom = KeyParams - 1 KeyReqAddress = KeyRandom - 1 KeyReqBalance = KeyReqAddress - 1 KeyReqCode = KeyReqBalance - 1 KeyReqDelay = KeyReqCode - 1 KeyReqHash = KeyReqDelay - 1 KeyRequests = KeyReqHash - 1 KeyScAddress = KeyRequests - 1 KeySender = KeyScAddress - 1 KeyState = KeySender - 1 KeyTimestamp = KeyState - 1 KeyTransfers = KeyTimestamp - 1 KeyXferAddress = KeyTransfers - 1 KeyXferAmount = KeyXferAddress - 1 KeyXferColor = KeyXferAmount - 1 )
View Source
const ( ProgramHash = "BDREf2rz36AvboHYWfWXgEUG5K8iynLDZAZwKnPBmKM9" RequestNop = sctransaction.RequestCode(uint16(1)) RequestInc = sctransaction.RequestCode(uint16(2)) RequestIncRepeat1 = sctransaction.RequestCode(uint16(3)) RequestIncRepeatMany = sctransaction.RequestCode(uint16(4)) RequestPlaceBet = sctransaction.RequestCode(uint16(5)) RequestLockBets = sctransaction.RequestCode(uint16(6)) RequestPayWinners = sctransaction.RequestCode(uint16(7)) RequestPlayPeriod = sctransaction.RequestCode(uint16(8) | sctransaction.RequestCodeProtected) RequestTokenMint = sctransaction.RequestCode(uint16(9)) )
Variables ¶
This section is empty.
Functions ¶
func GetProcessor ¶
Types ¶
type BalanceObject ¶
type BalanceObject struct {
// contains filtered or unexported fields
}
func NewBalanceObject ¶
func NewBalanceObject(h *wasmVMPocProcessor, reqOnly bool) *BalanceObject
func (*BalanceObject) GetInt ¶
func (o *BalanceObject) GetInt(keyId int32) int64
func (*BalanceObject) GetObjectId ¶
func (o *BalanceObject) GetObjectId(keyId int32, typeId int32) int32
func (*BalanceObject) GetString ¶
func (o *BalanceObject) GetString(keyId int32) string
func (*BalanceObject) SetInt ¶
func (o *BalanceObject) SetInt(keyId int32, value int64)
func (*BalanceObject) SetString ¶
func (o *BalanceObject) SetString(keyId int32, value string)
type ConfigObject ¶
type ConfigObject struct {
// contains filtered or unexported fields
}
func NewConfigObject ¶
func NewConfigObject(h *wasmVMPocProcessor) *ConfigObject
func (*ConfigObject) GetInt ¶
func (o *ConfigObject) GetInt(keyId int32) int64
func (*ConfigObject) GetObjectId ¶
func (o *ConfigObject) GetObjectId(keyId int32, typeId int32) int32
func (*ConfigObject) GetString ¶
func (o *ConfigObject) GetString(keyId int32) string
func (*ConfigObject) SetInt ¶
func (o *ConfigObject) SetInt(keyId int32, value int64)
func (*ConfigObject) SetString ¶
func (o *ConfigObject) SetString(keyId int32, value string)
type ParamsObject ¶
type ParamsObject struct {
// contains filtered or unexported fields
}
func NewParamsObject ¶
func NewParamsObject(h *wasmVMPocProcessor) *ParamsObject
func (*ParamsObject) GetInt ¶
func (o *ParamsObject) GetInt(keyId int32) int64
func (*ParamsObject) GetObjectId ¶
func (o *ParamsObject) GetObjectId(keyId int32, typeId int32) int32
func (*ParamsObject) GetString ¶
func (o *ParamsObject) GetString(keyId int32) string
func (*ParamsObject) SetInt ¶
func (o *ParamsObject) SetInt(keyId int32, value int64)
func (*ParamsObject) SetString ¶
func (o *ParamsObject) SetString(keyId int32, value string)
type RequestObject ¶
type RequestObject struct {
// contains filtered or unexported fields
}
func NewRequestObject ¶
func NewRequestObject(h *wasmVMPocProcessor) *RequestObject
func (*RequestObject) GetInt ¶
func (o *RequestObject) GetInt(keyId int32) int64
func (*RequestObject) GetObjectId ¶
func (o *RequestObject) GetObjectId(keyId int32, typeId int32) int32
func (*RequestObject) GetString ¶
func (o *RequestObject) GetString(keyId int32) string
func (*RequestObject) Send ¶
func (o *RequestObject) Send(ctx interfaces.HostInterface)
func (*RequestObject) SetInt ¶
func (o *RequestObject) SetInt(keyId int32, value int64)
func (*RequestObject) SetString ¶
func (o *RequestObject) SetString(keyId int32, value string)
type RequestsArray ¶
type RequestsArray struct {
// contains filtered or unexported fields
}
func NewRequestsArray ¶
func NewRequestsArray(h *wasmVMPocProcessor) *RequestsArray
func (*RequestsArray) GetInt ¶
func (a *RequestsArray) GetInt(keyId int32) int64
func (*RequestsArray) GetLength ¶
func (a *RequestsArray) GetLength() int32
func (*RequestsArray) GetObjectId ¶
func (a *RequestsArray) GetObjectId(keyId int32, typeId int32) int32
func (*RequestsArray) GetString ¶
func (a *RequestsArray) GetString(keyId int32) string
func (*RequestsArray) SetInt ¶
func (a *RequestsArray) SetInt(keyId int32, value int64)
func (*RequestsArray) SetString ¶
func (a *RequestsArray) SetString(keyId int32, value string)
type RootObject ¶
type RootObject struct {
// contains filtered or unexported fields
}
func NewRootObject ¶
func NewRootObject(h *wasmVMPocProcessor, ctx vmtypes.Sandbox) *RootObject
func (*RootObject) GetInt ¶
func (o *RootObject) GetInt(keyId int32) int64
func (*RootObject) GetObjectId ¶
func (o *RootObject) GetObjectId(keyId int32, typeId int32) int32
func (*RootObject) GetString ¶
func (o *RootObject) GetString(keyId int32) string
func (*RootObject) SetInt ¶
func (o *RootObject) SetInt(keyId int32, value int64)
func (*RootObject) SetString ¶
func (o *RootObject) SetString(keyId int32, value string)
type StateArray ¶
type StateArray struct {
// contains filtered or unexported fields
}
func NewStateArray ¶
func NewStateArray(h *wasmVMPocProcessor, items *kv.MustArray, typeId int32) *StateArray
func (*StateArray) GetInt ¶
func (a *StateArray) GetInt(keyId int32) int64
func (*StateArray) GetLength ¶
func (a *StateArray) GetLength() int32
func (*StateArray) GetObjectId ¶
func (a *StateArray) GetObjectId(keyId int32, typeId int32) int32
func (*StateArray) GetString ¶
func (a *StateArray) GetString(keyId int32) string
func (*StateArray) SetInt ¶
func (a *StateArray) SetInt(keyId int32, value int64)
func (*StateArray) SetString ¶
func (a *StateArray) SetString(keyId int32, value string)
type StateMap ¶
type StateMap struct {
// contains filtered or unexported fields
}
func NewStateMap ¶
func NewStateMap(h *wasmVMPocProcessor, items *kv.MustDictionary) *StateMap
type StateObject ¶
type StateObject struct {
// contains filtered or unexported fields
}
func NewStateObject ¶
func NewStateObject(h *wasmVMPocProcessor) *StateObject
func (*StateObject) GetInt ¶
func (o *StateObject) GetInt(keyId int32) int64
func (*StateObject) GetObjectId ¶
func (o *StateObject) GetObjectId(keyId int32, typeId int32) int32
func (*StateObject) GetString ¶
func (o *StateObject) GetString(keyId int32) string
func (*StateObject) SetInt ¶
func (o *StateObject) SetInt(keyId int32, value int64)
func (*StateObject) SetString ¶
func (o *StateObject) SetString(keyId int32, value string)
type TransferObject ¶
type TransferObject struct {
// contains filtered or unexported fields
}
func NewTransferObject ¶
func NewTransferObject(h *wasmVMPocProcessor) *TransferObject
func (*TransferObject) GetInt ¶
func (o *TransferObject) GetInt(keyId int32) int64
func (*TransferObject) GetObjectId ¶
func (o *TransferObject) GetObjectId(keyId int32, typeId int32) int32
func (*TransferObject) GetString ¶
func (o *TransferObject) GetString(keyId int32) string
func (*TransferObject) Send ¶
func (o *TransferObject) Send(ctx interfaces.HostInterface)
func (*TransferObject) SetInt ¶
func (o *TransferObject) SetInt(keyId int32, value int64)
func (*TransferObject) SetString ¶
func (o *TransferObject) SetString(keyId int32, value string)
type TransfersArray ¶
type TransfersArray struct {
// contains filtered or unexported fields
}
func NewTransfersArray ¶
func NewTransfersArray(h *wasmVMPocProcessor) *TransfersArray
func (*TransfersArray) GetInt ¶
func (a *TransfersArray) GetInt(keyId int32) int64
func (*TransfersArray) GetLength ¶
func (a *TransfersArray) GetLength() int32
func (*TransfersArray) GetObjectId ¶
func (a *TransfersArray) GetObjectId(keyId int32, typeId int32) int32
func (*TransfersArray) GetString ¶
func (a *TransfersArray) GetString(keyId int32) string
func (*TransfersArray) SetInt ¶
func (a *TransfersArray) SetInt(keyId int32, value int64)
func (*TransfersArray) SetString ¶
func (a *TransfersArray) SetString(keyId int32, value string)
Click to show internal directories.
Click to hide internal directories.