Documentation ¶
Overview ¶
Package management provides interface to ContractManagement native contract. It allows to get/deploy/update contracts as well as get/set deployment fee.
Index ¶
- Constants
- func Destroy()
- func GetMinimumDeploymentFee() int
- func SetMinimumDeploymentFee(value int)
- func Update(script, manifest []byte)
- func UpdateWithData(script, manifest []byte, data interface{})
- type ABI
- type Contract
- type Event
- type Group
- type Manifest
- type Method
- type Parameter
- type ParameterType
- type Permission
Constants ¶
const Hash = "\xfd\xa3\xfa\x43\x46\xea\x53\x2a\x25\x8f\xc4\x97\xdd\xad\xdb\x64\x37\xc9\xfd\xff"
Hash represents Management contract hash.
Variables ¶
This section is empty.
Functions ¶
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 Contract ¶
Contract represents deployed contract.
func DeployWithData ¶
DeployWithData represents `deploy` method of Management native contract.
func GetContract ¶
GetContract represents `getContract` method of Management native contract.
type Manifest ¶
type Manifest struct { Name string Groups []Group Features map[string]string 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 ¶
Permission represents contract permission.