waci

package
v0.0.0-...-c945bda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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) PutState

func (s *WaciInstance) PutState() int32

PutState put state to chain

func (*WaciInstance) RSClose

func (s *WaciInstance) RSClose() int32

RSClose close sql statement

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL