emit

package
v0.78.4-pre Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 8 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppCall

func AppCall(w *io.BinWriter, scriptHash util.Uint160, tailCall bool)

AppCall emits an appcall, if tailCall is true, tailCall opcode will be emitted instead.

func AppCallWithOperation

func AppCallWithOperation(w *io.BinWriter, scriptHash util.Uint160, operation string)

AppCallWithOperation emits an appcall with the given operation.

func AppCallWithOperationAndArgs added in v0.75.0

func AppCallWithOperationAndArgs(w *io.BinWriter, scriptHash util.Uint160, operation string, args ...interface{})

AppCallWithOperationAndArgs emits an APPCALL with the given operation and arguments.

func AppCallWithOperationAndData

func AppCallWithOperationAndData(w *io.BinWriter, scriptHash util.Uint160, operation string, data []byte)

AppCallWithOperationAndData emits an appcall with the given operation and data.

func Array added in v0.75.0

func Array(w *io.BinWriter, es ...interface{})

Array emits array of elements to the given buffer.

func Bool

func Bool(w *io.BinWriter, ok bool)

Bool emits a bool type the given buffer.

func Bytes

func Bytes(w *io.BinWriter, b []byte)

Bytes emits a byte array to the given buffer.

func BytesToInt

func BytesToInt(data []byte) *big.Int

BytesToInt converts data in little-endian format to an integer.

func Call

func Call(w *io.BinWriter, op opcode.Opcode, label uint16)

Call emits a call Instruction with label to the given buffer.

func Instruction

func Instruction(w *io.BinWriter, op opcode.Opcode, b []byte)

Instruction emits a VM Instruction with data to the given buffer.

func Int

func Int(w *io.BinWriter, i int64)

Int emits a int type to the given buffer.

func IntToBytes

func IntToBytes(n *big.Int) []byte

IntToBytes converts integer to a slice in little-endian format.

func Jmp

func Jmp(w *io.BinWriter, op opcode.Opcode, label uint16)

Jmp emits a jump Instruction along with label to the given buffer.

func Opcode

func Opcode(w *io.BinWriter, op opcode.Opcode)

Opcode emits a single VM Instruction without arguments to the given buffer.

func String

func String(w *io.BinWriter, s string)

String emits a string to the given buffer.

func Syscall

func Syscall(w *io.BinWriter, api string)

Syscall emits the syscall API to the given buffer. Syscall API string cannot be 0.

Types

This section is empty.

Jump to

Keyboard shortcuts

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