program

package
v0.5.3-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Program

type Program struct {

	//the contract program code,which will be run on VM or specific envrionment
	Code []byte

	//the program code's parameter
	Parameter []byte
}

func (*Program) Deserialize

func (p *Program) Deserialize(w io.Reader) error

Deserialize the Program

func (*Program) Equal

func (p *Program) Equal(b *Program) bool

func (*Program) MarshalJson

func (p *Program) MarshalJson() ([]byte, error)

func (*Program) Serialize

func (p *Program) Serialize(w io.Writer) error

Serialize the Program

func (*Program) UnmarshalJson

func (p *Program) UnmarshalJson(data []byte) error

type ProgramBuilder

type ProgramBuilder struct {
	// contains filtered or unexported fields
}

func NewProgramBuilder

func NewProgramBuilder() *ProgramBuilder

func (*ProgramBuilder) AddCodes

func (pb *ProgramBuilder) AddCodes(codes []byte)

func (*ProgramBuilder) AddOp

func (pb *ProgramBuilder) AddOp(op vm.OpCode)

func (*ProgramBuilder) PushData

func (pb *ProgramBuilder) PushData(data []byte)

func (*ProgramBuilder) PushNumber

func (pb *ProgramBuilder) PushNumber(number *big.Int)

func (*ProgramBuilder) ToArray

func (pb *ProgramBuilder) ToArray() []byte

type ProgramInfo

type ProgramInfo struct {
	Code      string `json:"code"`
	Parameter string `json:"parameter"`
}

Jump to

Keyboard shortcuts

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