contract

package
v0.0.4-ea46d2c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2018 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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