Versions in this module Expand all Collapse all v0 v0.7.2 Apr 16, 2020 v0.7.1 Apr 9, 2020 Changes in this version + const MAX_ARRAY_SIZE + const MAX_BYTEARRAY_SIZE + const MAX_INVOCATION_STACK_SIZE + const MAX_SIZE_FOR_BIGINTEGER + const STACK_LIMIT + var OpExecList = [256]OpInfo + func BigIntOp(bi *big.Int, op OpCode) *big.Int + func BigIntZip(ints1 *big.Int, ints2 *big.Int, op OpCode) *big.Int + func Concat(array1 []byte, array2 []byte) []byte + func ToBigInt(data interface{}) *big.Int + type BigIntSorter []big.Int + func (c BigIntSorter) Len() int + func (c BigIntSorter) Less(i, j int) bool + func (c BigIntSorter) Swap(i, j int) + type ExecutionContext struct + Code []byte + InstructionPointer int + OpReader *utils.VmReader + func NewExecutionContext(code []byte, flag VmFeatureFlag) *ExecutionContext + func (ec *ExecutionContext) Clone() *ExecutionContext + func (ec *ExecutionContext) GetInstructionPointer() int + func (ec *ExecutionContext) NextInstruction() OpCode + func (ec *ExecutionContext) SetInstructionPointer(offset int64) error + func (self *ExecutionContext) ReadOpCode() (val OpCode, eof bool) + type Executor struct + AltStack *ValueStack + Callers []*ExecutionContext + Context *ExecutionContext + EvalStack *ValueStack + Features VmFeatureFlag + State VMState + func NewExecutor(code []byte, feature VmFeatureFlag) *Executor + func (self *Executor) Execute() error + func (self *Executor) ExecuteOp(opcode OpCode, context *ExecutionContext) (VMState, error) + func (self *Executor) PopContext() (*ExecutionContext, error) + func (self *Executor) PushContext(context *ExecutionContext) error + type OpCode byte + const ABS + const ADD + const AND + const APPCALL + const APPEND + const ARRAYSIZE + const BOOLAND + const BOOLOR + const CALL + const CAT + const CHECKMULTISIG + const CHECKSIG + const DCALL + const DEC + const DEPTH + const DIV + const DROP + const DUP + const DUPFROMALTSTACK + const EQUAL + const FROMALTSTACK + const GT + const GTE + const HASH160 + const HASH256 + const HASKEY + const INC + const INVERT + const JMP + const JMPIF + const JMPIFNOT + const KEYS + const LEFT + const LT + const LTE + const MAX + const MIN + const MOD + const MUL + const NEGATE + const NEWARRAY + const NEWMAP + const NEWSTRUCT + const NIP + const NOP + const NOT + const NUMEQUAL + const NUMNOTEQUAL + const NZ + const OR + const OVER + const PACK + const PICK + const PICKITEM + const PUSH0 + const PUSH1 + const PUSH10 + const PUSH11 + const PUSH12 + const PUSH13 + const PUSH14 + const PUSH15 + const PUSH16 + const PUSH2 + const PUSH3 + const PUSH4 + const PUSH5 + const PUSH6 + const PUSH7 + const PUSH8 + const PUSH9 + const PUSHBYTES1 + const PUSHBYTES75 + const PUSHDATA1 + const PUSHDATA2 + const PUSHDATA4 + const PUSHF + const PUSHM1 + const PUSHT + const REMOVE + const RET + const REVERSE + const RIGHT + const ROLL + const ROT + const SETITEM + const SHA1 + const SHA256 + const SHL + const SHR + const SIGN + const SIZE + const SUB + const SUBSTR + const SWAP + const SYSCALL + const TAILCALL + const THROW + const THROWIFNOT + const TOALTSTACK + const TUCK + const UNPACK + const VALUES + const VERIFY + const WITHIN + const XDROP + const XOR + const XSWAP + const XTUCK + type OpInfo struct + Name string + Opcode OpCode + type ParamsBuilder struct + func NewParamsBuilder(buffer *bytes.Buffer) *ParamsBuilder + func (p *ParamsBuilder) Emit(op OpCode) + func (p *ParamsBuilder) EmitPushBool(data bool) + func (p *ParamsBuilder) EmitPushByteArray(data []byte) + func (p *ParamsBuilder) EmitPushCall(address []byte) + func (p *ParamsBuilder) EmitPushInteger(data *big.Int) + func (p *ParamsBuilder) ToArray() []byte + type VMState byte + const BREAK + const FAULT + const HALT + const INSUFFICIENT_RESOURCE + const NONE + type ValueStack struct + func NewValueStack(limit int64) *ValueStack + func (self *ValueStack) CopyTo(stack *ValueStack) error + func (self *ValueStack) Count() int + func (self *ValueStack) Dump() string + func (self *ValueStack) Insert(index int64, t types.VmValue) error + func (self *ValueStack) Peek(index int64) (value types.VmValue, err error) + func (self *ValueStack) PeekAsBytes(index int64) ([]byte, error) + func (self *ValueStack) Pop() (value types.VmValue, err error) + func (self *ValueStack) PopAsArray() (*types.ArrayValue, error) + func (self *ValueStack) PopAsBool() (bool, error) + func (self *ValueStack) PopAsBytes() ([]byte, error) + func (self *ValueStack) PopAsInt64() (int64, error) + func (self *ValueStack) PopAsIntValue() (types.IntValue, error) + func (self *ValueStack) PopAsInteropValue() (types.InteropValue, error) + func (self *ValueStack) PopAsMap() (*types.MapValue, error) + func (self *ValueStack) PopAsStruct() (*types.StructValue, error) + func (self *ValueStack) PopPair() (left, right types.VmValue, err error) + func (self *ValueStack) PopPairAsBool() (left, right bool, err error) + func (self *ValueStack) PopPairAsBytes() (left, right []byte, err error) + func (self *ValueStack) PopPairAsInt64() (left, right int64, err error) + func (self *ValueStack) PopPairAsIntVal() (left, right types.IntValue, err error) + func (self *ValueStack) PopTriple() (left, middle, right types.VmValue, err error) + func (self *ValueStack) PopTripleAsBool() (left, middle, right bool, err error) + func (self *ValueStack) PopTripleAsBytes() (left, middle, right []byte, err error) + func (self *ValueStack) PopTripleAsIntVal() (left, middle, right types.IntValue, err error) + func (self *ValueStack) Push(t types.VmValue) error + func (self *ValueStack) PushAsArray(vals []types.VmValue) error + func (self *ValueStack) PushAsInteropValue(val interfaces.Interop) error + func (self *ValueStack) PushBool(val bool) error + func (self *ValueStack) PushBytes(val []byte) error + func (self *ValueStack) PushInt64(val int64) error + func (self *ValueStack) PushMany(vals ...types.VmValue) error + func (self *ValueStack) PushUint32(val uint32) error + func (self *ValueStack) PushUint64(val uint64) error + func (self *ValueStack) Remove(index int64) (value types.VmValue, err error) + func (self *ValueStack) Set(index int, t types.VmValue) error + func (self *ValueStack) Swap(i, j int64) error + type VmFeatureFlag struct + AllowReaderEOF bool + DisableHasKey bool