balancecontract

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BalanceOf

func BalanceOf(account interop.Hash160) int

func Burn

func Burn(from interop.Hash160, amount int, details []byte) bool

func Decimals

func Decimals() int

func Init

func Init(owner, addrNetmap, addrContainer interop.Hash160)

func Lock

func Lock(txID []byte, from, to interop.Hash160, amount, until int) bool

func Migrate added in v0.4.0

func Migrate(script []byte, manifest []byte) bool

func Mint

func Mint(to interop.Hash160, amount int, details []byte) bool

func NewEpoch

func NewEpoch(epochNum int) bool

func Symbol

func Symbol() string

func TotalSupply

func TotalSupply() int

func Transfer

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

func TransferX

func TransferX(from, to interop.Hash160, amount int, details []byte) bool

func Version

func Version() int

Types

type Account

type Account struct {
	// Active  balance
	Balance int
	// Until valid for lock accounts
	Until int
	// Parent field used in lock accounts, used to return assets back if
	// account wasn't burnt.
	Parent []byte
}

type Token

type Token struct {
	// Ticker symbol
	Symbol string
	// Amount of decimals
	Decimals int
	// Storage key for circulation value
	CirculationKey string
}

Token holds all token info.

func CreateToken

func CreateToken() Token

CreateToken initializes the Token Interface for the Smart Contract to operate with.

Jump to

Keyboard shortcuts

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