Documentation
¶
Index ¶
- Constants
- func BytesEqual(a []byte, b []byte) bool
- func CommitteeMultiAddress(sc interop.Hash160) []byte
- func CommitteeMultiAddressViaStorage(ctx storage.Context, key interface{}) []byte
- func GetList(ctx storage.Context, key interface{}) [][]byte
- func HasUpdateAccess(ctx storage.Context) bool
- func InitVote(ctx storage.Context)
- func InnerRingInvoker(ir []IRNode) interop.PublicKey
- func InnerRingMultiAddress(sc interop.Hash160) []byte
- func InnerRingMultiAddressViaStorage(ctx storage.Context, key interface{}) []byte
- func InvokeID(args []interface{}, prefix []byte) []byte
- func RemoveVotes(ctx storage.Context, id []byte)
- func SetSerialized(ctx storage.Context, key interface{}, value interface{})
- func Vote(ctx storage.Context, id, from []byte) int
- type Ballot
- type IRNode
Constants ¶
const OwnerKey = "contractOwner"
Variables ¶
This section is empty.
Functions ¶
func BytesEqual ¶
BytesEqual compares two slice of bytes by wrapping them into strings, which is necessary with new util.Equal interop behaviour, see neo-go#1176.
func CommitteeMultiAddress ¶ added in v0.5.0
CommitteeMultiAddress returns multiaddress of committee public keys by invoking netmap contract.
func CommitteeMultiAddressViaStorage ¶ added in v0.5.0
CommitteeMultiAddressViaStorage returns multiaddress of committee public keys by invoking netmap contract, which scripthash stored in the contract storage by the key `key`.
func HasUpdateAccess ¶
HasUpdateAccess returns true if contract can be initialized, re-initialized or migrated.
func InnerRingInvoker ¶
InnerRingInvoker returns public key of inner ring node that invoked contract.
func InnerRingMultiAddress ¶ added in v0.5.0
InnerRingMultiAddress returns multiaddress of inner ring public keys by invoking netmap contract.
func InnerRingMultiAddressViaStorage ¶ added in v0.5.0
InnerRingMultiAddressViaStorage returns multiaddress of inner ring public keys by invoking netmap contract, which scripthash stored in the contract storage by the key `key`.
func RemoveVotes ¶
RemoveVotes clears ballots of the decision that has been accepted by inner ring nodes.
func SetSerialized ¶
SetSerialized serializes data and puts it into contract storage.
Types ¶
type IRNode ¶
func InnerRingList ¶
InnerRingList gets list of inner ring through calling "innerRingList" method of smart contract.
func InnerRingListViaStorage ¶
InnerRingList returns list of inner ring nodes through calling "innerRingList" method of smart contract.
Address of smart contract is received from storage by key.