Documentation ¶
Index ¶
- Constants
- type WaciInstance
- func (s *WaciInstance) CallContract() int32
- func (s *WaciInstance) CallContractLen() int32
- func (s *WaciInstance) DeleteState() int32
- func (s *WaciInstance) EmitEvent() int32
- func (s *WaciInstance) ErrorResult() int32
- func (s *WaciInstance) ExecuteDDL() int32
- func (s *WaciInstance) ExecuteQuery() int32
- func (s *WaciInstance) ExecuteQueryOne() int32
- func (s *WaciInstance) ExecuteQueryOneLen() int32
- func (s *WaciInstance) ExecuteUpdate() int32
- func (s *WaciInstance) GetBulletProofsResult() int32
- func (s *WaciInstance) GetBulletProofsResultLen() int32
- func (s *WaciInstance) GetPaillierResult() int32
- func (s *WaciInstance) GetPaillierResultLen() int32
- func (s *WaciInstance) GetState() int32
- func (s *WaciInstance) GetStateLen() int32
- func (s *WaciInstance) KvIterator() int32
- func (s *WaciInstance) KvIteratorClose() int32
- func (s *WaciInstance) KvIteratorHasNext() int32
- func (s *WaciInstance) KvIteratorNext() int32
- func (s *WaciInstance) KvIteratorNextLen() int32
- func (s *WaciInstance) KvPreIterator() int32
- func (s *WaciInstance) LogMessage() int32
- func (s *WaciInstance) LogMsg(vm *wasm.VirtualMachine) reflect.Value
- func (s *WaciInstance) PutState() int32
- func (s *WaciInstance) RSClose() int32
- func (s *WaciInstance) RSHasNext() int32
- func (s *WaciInstance) RSNext() int32
- func (s *WaciInstance) RSNextLen() int32
- func (s *WaciInstance) SuccessResult() int32
- func (s *WaciInstance) SysCall(vm *wasm.VirtualMachine) reflect.Value
Constants ¶
const WaciModuleName = "env"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WaciInstance ¶
type WaciInstance struct { TxSimContext protocol.TxSimContext ContractId *commonPb.Contract ContractResult *commonPb.ContractResult Log protocol.Logger Vm *wasm.VirtualMachine RequestBody []byte // sdk request param GetStateCache []byte // cache call method GetStateLen value result, one cache per transaction ChainId string Method string ContractEvent []*commonPb.ContractEvent SpecialTxType protocol.ExecOrderTxType }
func (*WaciInstance) CallContract ¶
func (s *WaciInstance) CallContract() int32
CallContractLen get cross contract call result from cache
func (*WaciInstance) CallContractLen ¶
func (s *WaciInstance) CallContractLen() int32
CallContractLen invoke cross contract calls, save result to cache and putout result length
func (*WaciInstance) DeleteState ¶
func (s *WaciInstance) DeleteState() int32
DeleteState delete state from chain
func (*WaciInstance) EmitEvent ¶
func (s *WaciInstance) EmitEvent() int32
EmitEvent emit event to chain
func (*WaciInstance) ErrorResult ¶
func (s *WaciInstance) ErrorResult() int32
ErrorResult record the results of contract execution error
func (*WaciInstance) ExecuteDDL ¶
func (s *WaciInstance) ExecuteDDL() int32
ExecuteDDL execute DDL sql, for init_contract or upgrade method. allow table create/alter/drop/truncate
allow: [CREATE TABLE tableName] [ALTER TABLE tableName]
[DROP TABLE tableName] [TRUNCATE TABLE tableName]
not allow: [CREATE DATABASE dbName] [CREATE TABLE dbName.tableName] [ALTER TABLE dbName.tableName]
[DROP DATABASE dbName] [DROP TABLE dbName.tableName] [TRUNCATE TABLE dbName.tableName]
You must have a primary key to create a table
func (*WaciInstance) ExecuteQuery ¶
func (s *WaciInstance) ExecuteQuery() int32
ExecuteQuery execute query sql, return result set index
func (*WaciInstance) ExecuteQueryOne ¶
func (s *WaciInstance) ExecuteQueryOne() int32
ExecuteQuery execute query sql, return result set index
func (*WaciInstance) ExecuteQueryOneLen ¶
func (s *WaciInstance) ExecuteQueryOneLen() int32
ExecuteQuery execute query sql, return result set index
func (*WaciInstance) ExecuteUpdate ¶
func (s *WaciInstance) ExecuteUpdate() int32
ExecuteUpdate execute update and insert sql, allow single row change as: update table set name = 'Tom' where uniqueKey='xxx'
func (*WaciInstance) GetBulletProofsResult ¶
func (s *WaciInstance) GetBulletProofsResult() int32
GetBulletProofsResult get bulletproofs operation result from chain
func (*WaciInstance) GetBulletProofsResultLen ¶
func (s *WaciInstance) GetBulletProofsResultLen() int32
GetBulletProofsResultLen get bulletproofs operation result length from chain
func (*WaciInstance) GetPaillierResult ¶
func (s *WaciInstance) GetPaillierResult() int32
GetPaillierResult get paillier operation result from chain
func (*WaciInstance) GetPaillierResultLen ¶
func (s *WaciInstance) GetPaillierResultLen() int32
GetPaillierResultLen get paillier operation result length from chain
func (*WaciInstance) GetState ¶
func (s *WaciInstance) GetState() int32
GetStateLen get state from chain
func (*WaciInstance) GetStateLen ¶
func (s *WaciInstance) GetStateLen() int32
GetStateLen get state length from chain
func (*WaciInstance) KvIterator ¶
func (s *WaciInstance) KvIterator() int32
KvIterator Select kv statement
func (*WaciInstance) KvIteratorClose ¶
func (s *WaciInstance) KvIteratorClose() int32
KvIteratorClose Close kv statement
func (*WaciInstance) KvIteratorHasNext ¶
func (s *WaciInstance) KvIteratorHasNext() int32
KvIteratorHasNext to determine whether db has next statement
func (*WaciInstance) KvIteratorNext ¶
func (s *WaciInstance) KvIteratorNext() int32
KvIteratorNext to get kv statement
func (*WaciInstance) KvIteratorNextLen ¶
func (s *WaciInstance) KvIteratorNextLen() int32
func (*WaciInstance) KvPreIterator ¶
func (s *WaciInstance) KvPreIterator() int32
func (*WaciInstance) LogMessage ¶
func (s *WaciInstance) LogMessage() int32
LogMessage print log to file
func (*WaciInstance) LogMsg ¶
func (s *WaciInstance) LogMsg(vm *wasm.VirtualMachine) reflect.Value
LogMessage print log to file
func (*WaciInstance) RSHasNext ¶
func (s *WaciInstance) RSHasNext() int32
ExecuteQuery execute query sql, return result set index
func (*WaciInstance) RSNext ¶
func (s *WaciInstance) RSNext() int32
RSNextLen get one row from result set
func (*WaciInstance) RSNextLen ¶
func (s *WaciInstance) RSNextLen() int32
RSNextLen get result set length from chain
func (*WaciInstance) SuccessResult ¶
func (s *WaciInstance) SuccessResult() int32
SuccessResult record the results of contract execution success
func (*WaciInstance) SysCall ¶
func (s *WaciInstance) SysCall(vm *wasm.VirtualMachine) reflect.Value
SysCall wasmer vm call chain entry