Documentation
¶
Index ¶
- Constants
- func AlphabetAddress() []byte
- func BytesEqual(a []byte, b []byte) bool
- 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 InvokeID(args []interface{}, prefix []byte) []byte
- func Multiaddress(n []interop.PublicKey, committee bool) []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 AlphabetAddress ¶ added in v0.6.0
func AlphabetAddress() []byte
AlphabetAddress returns multi address of alphabet public keys.
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 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 Multiaddress ¶ added in v0.6.0
Multiaddress returns default multi signature account address for N keys. If committee set to true, then it is `M = N/2+1` committee account.
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 AlphabetNodes ¶ added in v0.6.0
func AlphabetNodes() []IRNode
AlphabetNodes return list of alphabet nodes from committee in side chain.
func InnerRingNodes ¶ added in v0.6.0
func InnerRingNodes() []IRNode
InnerRingNodes return list of inner ring nodes from state validator role in side chain.