neo

package
v0.95.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 2 Imported by: 11

Documentation

Overview

Package neo provides interface to NeoToken native contract. NEO token is special, it's not just a regular NEP-17 contract, it also provides access to chain-specific settings and implements commmittee voting system.

Index

Constants

View Source
const Hash = "\xf5\x63\xea\x40\xbc\x28\x3d\x4d\x0e\x05\xc4\x8e\xa3\x05\xb3\xf2\xa0\x73\x40\xef"

Hash represents NEO contract hash.

Variables

This section is empty.

Functions

func BalanceOf

func BalanceOf(addr interop.Hash160) int

BalanceOf represents `balanceOf` method of NEO native contract.

func Decimals

func Decimals() int

Decimals represents `decimals` method of NEO native contract.

func GetCandidates

func GetCandidates() []interop.PublicKey

GetCandidates represents `getCandidates` method of NEO native contract.

func GetCommittee

func GetCommittee() []interop.PublicKey

GetCommittee represents `getCommittee` method of NEO native contract.

func GetGASPerBlock

func GetGASPerBlock() int

GetGASPerBlock represents `getGasPerBlock` method of NEO native contract.

func GetNextBlockValidators

func GetNextBlockValidators() []interop.PublicKey

GetNextBlockValidators represents `getNextBlockValidators` method of NEO native contract.

func GetRegisterPrice added in v0.94.0

func GetRegisterPrice() int

GetRegisterPrice represents `getRegisterPrice` method of NEO native contract.

func RegisterCandidate

func RegisterCandidate(pub interop.PublicKey) bool

RegisterCandidate represents `registerCandidate` method of NEO native contract.

func SetGASPerBlock

func SetGASPerBlock(amount int)

SetGASPerBlock represents `setGasPerBlock` method of NEO native contract.

func SetRegisterPrice added in v0.94.0

func SetRegisterPrice(amount int)

SetRegisterPrice represents `setRegisterPrice` method of NEO native contract.

func Symbol

func Symbol() string

Symbol represents `symbol` method of NEO native contract.

func TotalSupply

func TotalSupply() int

TotalSupply represents `totalSupply` method of NEO native contract.

func Transfer

func Transfer(from, to interop.Hash160, amount int, data interface{}) bool

Transfer represents `transfer` method of NEO native contract.

func UnclaimedGAS

func UnclaimedGAS(addr interop.Hash160, end int) int

UnclaimedGAS represents `unclaimedGas` method of NEO native contract.

func UnregisterCandidate

func UnregisterCandidate(pub interop.PublicKey) bool

UnregisterCandidate represents `unregisterCandidate` method of NEO native contract.

func Vote

func Vote(addr interop.Hash160, pub interop.PublicKey) bool

Vote represents `vote` method of NEO native contract.

Types

type AccountState added in v0.95.1

type AccountState struct {
	Balance int
	Height  int
	VoteTo  interop.PublicKey
}

AccountState contains info about NEO holder.

func GetAccountState added in v0.95.1

func GetAccountState(addr interop.Hash160) *AccountState

GetAccountState represents `getAccountState` method of NEO native contract.

Jump to

Keyboard shortcuts

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