Versions in this module Expand all Collapse all v1 v1.1.1 Oct 29, 2019 Changes in this version + const NotSupport + func IsNormativeName(str string) bool + type APIs struct + Act ActionApi + Assert AssertApi + Auth AuthorizationApi + Call CallApi + Console ConsoleApi + Contract ContractApi + Crypto CryptoApi + Db DatabaseApi + MemDb BlockMemDbApi + Producer ProducerApi + Result ResultApi + Sys SystemApi + Types TypesApi + func NewAPIs(ctx *Context) *APIs + func (self *APIs) SetInterpreter(interpreter Interpreter) + type ActionApi struct + func (self *ActionApi) Contract() types.Address + func (self *ActionApi) Sender() types.Address + func (self *ActionApi) SetCtx(ctx *Context) + type AssertApi struct + func (self *AssertApi) Assert(test bool, msg string) + func (self *AssertApi) SetCtx(ctx *Context) + type AuthorizationApi struct + func (self *AuthorizationApi) IsAccount(address string) bool + func (self *AuthorizationApi) IsContract(address string) bool + func (self *AuthorizationApi) IsHexAddress(address string) bool + func (self *AuthorizationApi) RequireAuth(address string) bool + func (self *AuthorizationApi) SetCtx(ctx *Context) + type BlockContext struct + func NewBlockContext(state *state.StateDB, db, tmpDb database.IDatabase, number *big.Int, ...) *BlockContext + func (ctx *BlockContext) GetState() *state.StateDB + type BlockMemDbApi struct + func (self *BlockMemDbApi) Emplace(key []byte, val []byte) + func (self *BlockMemDbApi) Erase(key []byte) + func (self *BlockMemDbApi) Find(key []byte) []byte + func (self *BlockMemDbApi) Get(key []byte) []byte + func (self *BlockMemDbApi) Modify(key []byte, val []byte) + func (self *BlockMemDbApi) Set(key []byte, val []byte) + func (self *BlockMemDbApi) SetCtx(ctx *Context) + type CallApi struct + func (self *CallApi) Call(act *transaction.Action) + func (self *CallApi) InnerCall(act *transaction.Action) + func (self *CallApi) SetCtx(ctx *Context) + func (self *CallApi) SetInterpreter(interpreter Interpreter) + type ConsoleApi struct + func (self *ConsoleApi) Printf(str string) + func (self *ConsoleApi) SetCtx(ctx *Context) + type Context struct + func NewContext(sender types.Address, action *transaction.Action, blkCtx *BlockContext) *Context + func (ctx *Context) ActionResult() [][]byte + func (ctx *Context) AppendContract(addr types.Address) + func (ctx *Context) Code() []byte + func (ctx *Context) ContractAddress() types.Address + func (ctx *Context) Exec(in Interpreter) error + func (ctx *Context) ExecAsync(in Interpreter) error + func (ctx *Context) GetContracts() []types.Address + func (ctx *Context) InitForTest() + func (ctx *Context) InterpreterId() types.Hash + func (ctx *Context) InterpreterName() string + func (ctx *Context) Param() []byte + func (ctx *Context) ResultCh() chan error + func (ctx *Context) SetCreatorForTest(addr types.Address) + func (ctx *Context) TTL() time.Duration + func (self *Context) SetActionResult(data []byte) + type ContractApi struct + func (self *ContractApi) Create(creator string, code string) (addr types.Address) + func (self *ContractApi) Creator() types.Address + func (self *ContractApi) EmitEvent(topics []string, data [][]byte) + func (self *ContractApi) SetCtx(ctx *Context) + type CryptoApi struct + func (self *CryptoApi) Recover(msg []byte, sig []byte) (pubkey []byte, err error) + func (self *CryptoApi) SetCtx(ctx *Context) + func (self *CryptoApi) Sha1(val []byte) [20]byte + func (self *CryptoApi) Sha256(val []byte) [32]byte + func (self *CryptoApi) Sha512(val []byte) [64]byte + type DatabaseApi struct + func (self *DatabaseApi) Emplace(key []byte, val []byte) + func (self *DatabaseApi) Erase(key []byte) + func (self *DatabaseApi) Find(key []byte) []byte + func (self *DatabaseApi) Get(key []byte) []byte + func (self *DatabaseApi) Modify(key []byte, val []byte) + func (self *DatabaseApi) Set(key []byte, val []byte) + func (self *DatabaseApi) SetCtx(ctx *Context) + type Interpreter interface + Exec func(ctx *Context) error + ExecAsync func(ctx *Context) error + type Name struct + func StringToName(str string) (ret Name) + func (n Name) Str() string + type ProducerApi struct + func (self *ProducerApi) Producer() types.Address + func (self *ProducerApi) SetCtx(ctx *Context) + type ResultApi struct + func (self *ResultApi) SetActionResult(data []byte) + func (self *ResultApi) SetCtx(ctx *Context) + type SystemApi struct + func (self *SystemApi) BytesToInt(src []byte) uint64 + func (self *SystemApi) GetBlockMiner() types.Address + func (self *SystemApi) GetBlockNumber() *big.Int + func (self *SystemApi) IntToBytes(i uint64) []byte + func (self *SystemApi) SetCtx(ctx *Context) + type TypesApi struct + func (self *TypesApi) Name(str string) uint64 + func (self *TypesApi) SetCtx(ctx *Context) + type Visitor interface + Code func() []byte + InterpreterId func() types.Hash + InterpreterName func() string + Param func() []byte + TTL func() time.Duration