payload

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: LGPL-3.0 Imports: 5 Imported by: 8

Documentation

Index

Constants

View Source
const BookkeeperPayloadVersion byte = 0x00

Variables

This section is empty.

Functions

This section is empty.

Types

type Bookkeeper

type Bookkeeper struct {
	PubKey keypair.PublicKey
	Action BookkeeperAction
	Cert   []byte
	Issuer keypair.PublicKey
}

Bookkeeper is an implementation of transaction payload for consensus bookkeeper list modification

func (*Bookkeeper) Deserialization

func (self *Bookkeeper) Deserialization(source *common.ZeroCopySource) error

func (*Bookkeeper) Serialization

func (self *Bookkeeper) Serialization(sink *common.ZeroCopySink)

type BookkeeperAction

type BookkeeperAction byte
const (
	BookkeeperAction_ADD BookkeeperAction = 0
	BookkeeperAction_SUB BookkeeperAction = 1
)

type DeployCode

type DeployCode struct {
	Name        string
	Version     string
	Author      string
	Email       string
	Description string
	// contains filtered or unexported fields
}

DeployCode is an implementation of transaction payload for deploy smartcontract

func CreateDeployCode

func CreateDeployCode(code []byte,
	vmType uint32,
	name []byte,
	version []byte,
	author []byte,
	email []byte,
	desc []byte) (*DeployCode, error)

func NewDeployCode

func NewDeployCode(code []byte, vmType VmType, name, version, author, email, description string) (*DeployCode, error)

func (*DeployCode) Address

func (dc *DeployCode) Address() common.Address

func (*DeployCode) Deserialization

func (dc *DeployCode) Deserialization(source *common.ZeroCopySource) error

note: DeployCode.Code has data reference of param source

func (*DeployCode) GetNeoCode

func (dc *DeployCode) GetNeoCode() ([]byte, error)

func (*DeployCode) GetRawCode

func (dc *DeployCode) GetRawCode() []byte

func (*DeployCode) GetWasmCode

func (dc *DeployCode) GetWasmCode() ([]byte, error)

func (*DeployCode) Serialization

func (dc *DeployCode) Serialization(sink *common.ZeroCopySink)

func (*DeployCode) ToArray

func (dc *DeployCode) ToArray() []byte

func (*DeployCode) VmType

func (dc *DeployCode) VmType() VmType

type InvokeCode

type InvokeCode struct {
	Code []byte
}

InvokeCode is an implementation of transaction payload for invoke smartcontract

func (*InvokeCode) Deserialization

func (self *InvokeCode) Deserialization(source *common.ZeroCopySource) error

note: InvokeCode.Code has data reference of param source

func (*InvokeCode) Serialization

func (self *InvokeCode) Serialization(sink *common.ZeroCopySink)

type VmType

type VmType byte
const (
	NEOVM_TYPE  VmType = 1
	WASMVM_TYPE VmType = 3
)

func VmTypeFromByte

func VmTypeFromByte(ty byte) (VmType, error)

Jump to

Keyboard shortcuts

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