management

package
v0.94.0-pre Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 2 Imported by: 40

Documentation

Index

Constants

View Source
const Hash = "\x43\x0e\x9f\x6f\xb3\x13\xa8\xd3\xa2\xb7\x61\x3b\x67\x83\x09\xd1\xd7\xd7\x01\xa5"

Hash represents Management contract hash.

Variables

This section is empty.

Functions

func Destroy

func Destroy()

Destroy represents `destroy` method of Management native contract.

func GetMinimumDeploymentFee

func GetMinimumDeploymentFee() int

GetMinimumDeploymentFee represents `getMinimumDeploymentFee` method of Management native contract.

func SetMinimumDeploymentFee

func SetMinimumDeploymentFee(value int)

SetMinimumDeploymentFee represents `setMinimumDeploymentFee` method of Management native contract.

func Update

func Update(script, manifest []byte)

Update represents `update` method of Management native contract.

func UpdateWithData

func UpdateWithData(script, manifest []byte, data interface{})

UpdateWithData represents `update` method of Management native contract.

Types

type ABI

type ABI struct {
	Methods []Method
	Events  []Event
}

ABI represents contract's ABI.

type Contract

type Contract struct {
	ID            int
	UpdateCounter int
	Hash          interop.Hash160
	NEF           []byte
	Manifest      Manifest
}

Contract represents deployed contract.

func Deploy

func Deploy(script, manifest []byte) *Contract

Deploy represents `deploy` method of Management native contract.

func DeployWithData

func DeployWithData(script, manifest []byte, data interface{}) *Contract

DeployWithData represents `deploy` method of Management native contract.

func GetContract

func GetContract(addr interop.Hash160) *Contract

GetContract represents `getContract` method of Management native contract.

type Event

type Event struct {
	Name   string
	Params []Parameter
}

Event represents contract event.

type Group

type Group struct {
	PublicKey interop.PublicKey
	Signature interop.Signature
}

Group represents manifest group.

type Manifest

type Manifest struct {
	Name               string
	Groups             []Group
	SupportedStandards []string
	ABI                ABI
	Permissions        []Permission
	Trusts             []interop.Hash160
	Extra              interface{}
}

Manifest represents contract's manifest.

type Method

type Method struct {
	Name       string
	Params     []Parameter
	ReturnType ParameterType
	Offset     int
	Safe       bool
}

Method represents contract method.

type Parameter

type Parameter struct {
	Name string
	Type ParameterType
}

Parameter represents method parameter.

type ParameterType

type ParameterType byte

ParameterType represents smartcontract parameter type.

const (
	AnyType              ParameterType = 0x00
	BoolType             ParameterType = 0x10
	IntegerType          ParameterType = 0x11
	ByteArrayType        ParameterType = 0x12
	StringType           ParameterType = 0x13
	Hash160Type          ParameterType = 0x14
	Hash256Type          ParameterType = 0x15
	PublicKeyType        ParameterType = 0x16
	SignatureType        ParameterType = 0x17
	ArrayType            ParameterType = 0x20
	MapType              ParameterType = 0x22
	InteropInterfaceType ParameterType = 0x30
	VoidType             ParameterType = 0xff
)

Various parameter types.

type Permission

type Permission struct {
	Contract interop.Hash160
	Methods  []string
}

Permission represents contract permission.

Jump to

Keyboard shortcuts

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