smart_contract

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind

func Bind(user []byte, keys [][]byte) bool

Bind public key with user's account to use it in NeoFS requests.

func Cheque

func Cheque(id, user []byte, amount int, lockAcc []byte) bool

Cheque sends gas assets back to the user if they were successfully locked in NeoFS balance contract.

func Config

func Config(key []byte) interface{}

Config returns value of NeoFS configuration with provided key.

func Deposit

func Deposit(from interop.Hash160, amount int, rcv interop.Hash160) bool

Deposit gas assets to this script-hash address in NeoFS balance contract.

func Init

func Init(args [][]byte) bool

Init set up initial inner ring node keys.

func InitConfig

func InitConfig(args [][]byte) bool

InitConfig set up initial NeoFS key-value configuration.

func InnerRingCandidateAdd

func InnerRingCandidateAdd(key []byte) bool

InnerRingCandidateAdd adds key to the list of inner ring candidates.

func InnerRingCandidateRemove

func InnerRingCandidateRemove(key []byte) bool

InnerRingCandidateRemove removes key from the list of inner ring candidates.

func InnerRingCandidates

func InnerRingCandidates() []node

InnerRingCandidates returns array of inner ring candidate node keys.

func InnerRingList

func InnerRingList() []node

InnerRingList returns array of inner ring node keys.

func InnerRingUpdate

func InnerRingUpdate(chequeID []byte, args [][]byte) bool

InnerRingUpdate updates list of inner ring nodes with provided list of public keys.

func IsInnerRing

func IsInnerRing(key []byte) bool

IsInnerRing returns 'true' if key is inside of inner ring list.

func ListConfig

func ListConfig() []record

ListConfig returns array of all key-value pairs of NeoFS configuration.

func OnPayment

func OnPayment(from interop.Hash160, amount int, data interface{})

OnPayment is a callback for NEP-17 compatible native GAS contract.

func SetConfig

func SetConfig(id, key, val []byte) bool

SetConfig key-value pair as a NeoFS runtime configuration value.

func Unbind

func Unbind(user []byte, keys [][]byte) bool

Unbind public key from user's account

func Version

func Version() int

Version of contract.

func Withdraw

func Withdraw(user []byte, amount int) bool

Withdraw initialize gas asset withdraw from NeoFS balance.

Types

This section is empty.

Jump to

Keyboard shortcuts

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