Versions in this module Expand all Collapse all v0 v0.6.1 Jan 21, 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]OpExec + func BigIntComp(bigint *big.Int, op OpCode) bool + func BigIntMultiComp(ints1 *big.Int, ints2 *big.Int, op OpCode) bool + func BigIntOp(bi *big.Int, op OpCode) *big.Int + func BigIntZip(ints1 *big.Int, ints2 *big.Int, op OpCode) *big.Int + func BoolZip(bi1 bool, bi2 bool, op OpCode) bool + func CheckBigInteger(value *big.Int) bool + func Concat(array1 []byte, array2 []byte) []byte + func Count(e *ExecutionEngine) int + func EvaluationStackCount(e *ExecutionEngine) int + func Hash(b []byte, e *ExecutionEngine) []byte + func LogStackTrace(e *ExecutionEngine, needStackCount int, desc string) error + func NewStackItem(data interface{}) types.StackItems + func PeekArray(e *ExecutionEngine) ([]types.StackItems, error) + func PeekBigInteger(e *ExecutionEngine) (*big.Int, error) + func PeekInt(e *ExecutionEngine) (int, error) + func PeekInteropInterface(e *ExecutionEngine) (interfaces.Interop, error) + func PeekNBigInt(i int, e *ExecutionEngine) (*big.Int, error) + func PeekNByteArray(i int, e *ExecutionEngine) ([]byte, error) + func PeekNStackItem(i int, e *ExecutionEngine) types.StackItems + func PeekStackItem(e *ExecutionEngine) types.StackItems + func PopArray(e *ExecutionEngine) ([]types.StackItems, error) + func PopBigInt(e *ExecutionEngine) (*big.Int, error) + func PopBoolean(e *ExecutionEngine) (bool, error) + func PopByteArray(e *ExecutionEngine) ([]byte, error) + func PopInt(e *ExecutionEngine) (int, error) + func PopInteropInterface(e *ExecutionEngine) (interfaces.Interop, error) + func PopStackItem(e *ExecutionEngine) types.StackItems + func Push(e *ExecutionEngine, element types.StackItems) + func PushData(e *ExecutionEngine, data interface{}) + func ToBigInt(data interface{}) *big.Int + func WithInOp(int1 *big.Int, int2 *big.Int, int3 *big.Int) bool + 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(engine *ExecutionEngine, code []byte) *ExecutionContext + func (ec *ExecutionContext) Clone() *ExecutionContext + func (ec *ExecutionContext) GetInstructionPointer() int + func (ec *ExecutionContext) NextInstruction() OpCode + func (ec *ExecutionContext) SetInstructionPointer(offset int64) + type ExecutionEngine struct + AltStack *RandomAccessStack + BlockHeight uint32 + Context *ExecutionContext + Contexts []*ExecutionContext + EvaluationStack *RandomAccessStack + OpCode OpCode + OpExec OpExec + State VMState + func NewExecutionEngine(BlockHeight uint32) *ExecutionEngine + func (this *ExecutionEngine) CurrentContext() *ExecutionContext + func (this *ExecutionEngine) Execute() error + func (this *ExecutionEngine) ExecuteCode() error + func (this *ExecutionEngine) ExecuteOp() (VMState, error) + func (this *ExecutionEngine) PopContext() + func (this *ExecutionEngine) PushContext(context *ExecutionContext) + func (this *ExecutionEngine) StepInto() error + func (this *ExecutionEngine) ValidateOp() 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 OpExec struct + Exec func(*ExecutionEngine) (VMState, error) + Name string + Opcode OpCode + Validator func(*ExecutionEngine) error + 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 RandomAccessStack struct + func NewRandAccessStack() *RandomAccessStack + func (r *RandomAccessStack) CopyTo(stack *RandomAccessStack) + func (r *RandomAccessStack) Count() int + func (r *RandomAccessStack) Insert(index int, t types.StackItems) + func (r *RandomAccessStack) Peek(index int) types.StackItems + func (r *RandomAccessStack) Pop() types.StackItems + func (r *RandomAccessStack) Push(t types.StackItems) + func (r *RandomAccessStack) Remove(index int) types.StackItems + func (r *RandomAccessStack) Set(index int, t types.StackItems) + func (r *RandomAccessStack) Swap(i, j int) + type VMState byte + const BREAK + const FAULT + const HALT + const INSUFFICIENT_RESOURCE + const NONE