contract

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContractParameterTypeToByte

func ContractParameterTypeToByte(c []ContractParameterType) []byte

Types

type Contract

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

	//the Contract Parameter type list
	// describe the number of contract program parameters and the parameter type
	Parameters []ContractParameterType

	//The program hash as contract address
	ProgramHash Uint168

	//owner's pubkey hash indicate the owner of contract
	OwnerPubkeyHash Uint168
}

Contract include the program codes with parameters which can be executed on specific evnrioment

func (*Contract) Deserialize

func (c *Contract) Deserialize(r io.Reader) error

func (*Contract) Serialize

func (c *Contract) Serialize(w io.Writer) error

func (*Contract) ToArray

func (c *Contract) ToArray() []byte

type ContractParameterType

type ContractParameterType byte

parameter defined type.

const (
	Signature ContractParameterType = iota
	Boolean
	Integer
	Hash160
	Hash256
	ByteArray
)

func ByteToContractParameterType

func ByteToContractParameterType(b []byte) []ContractParameterType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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