Documentation
¶
Index ¶
- Constants
- func AlphabetAddress() []byte
- func BurnTransferDetails(txDetails []byte) []byte
- func BytesEqual(a []byte, b []byte) bool
- func CommitteeAddress() []byte
- func ContainerFeeTransferDetails(cid []byte) []byte
- func FromKnownContract(ctx storage.Context, caller interop.Hash160, key string) bool
- func GetList(ctx storage.Context, key interface{}) [][]byte
- func HasUpdateAccess() bool
- func InitVote(ctx storage.Context)
- func InnerRingInvoker(ir []IRNode) interop.PublicKey
- func InvokeID(args []interface{}, prefix []byte) []byte
- func LockTransferDetails(txDetails []byte) []byte
- func MintTransferDetails(txDetails []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 UnlockTransferDetails(epoch int) []byte
- func Vote(ctx storage.Context, id, from []byte) int
- func WalletToScriptHash(wallet []byte) []byte
- type Ballot
- type IRNode
Constants ¶
const (
Version = major*1_000_000 + minor*1_000 + patch
)
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 BurnTransferDetails ¶ added in v0.7.0
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 CommitteeAddress ¶ added in v0.11.0
func CommitteeAddress() []byte
CommitteeAddress returns multi address of committee.
func ContainerFeeTransferDetails ¶ added in v0.7.0
func FromKnownContract ¶ added in v0.7.0
func HasUpdateAccess ¶
func HasUpdateAccess() bool
HasUpdateAccess returns true if contract can be updated.
func InnerRingInvoker ¶
InnerRingInvoker returns public key of inner ring node that invoked contract. Work around for environments without notary support.
func InvokeID ¶
InvokeID returns hashed value of prefix and args concatenation. Used to identify different ballots.
func LockTransferDetails ¶ added in v0.7.0
func MintTransferDetails ¶ added in v0.7.0
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.
func UnlockTransferDetails ¶ added in v0.7.0
func Vote ¶
Vote adds ballot for the decision with specific 'id' and returns amount on unique voters for that decision.
func WalletToScriptHash ¶ added in v0.7.0
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.
func InnerRingNodesFromNetmap ¶ added in v0.7.0
InnerRingNodesFromNetmap gets list of inner ring through calling "innerRingList" method of smart contract. Work around for environments without notary support.