basic

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Spawn

func Spawn(env vmmSchema.Env) (vm vmmSchema.Vm, err error)

Types

type Token

type Token struct {
	DB schema.BasicDB
}

func (*Token) Add

func (b *Token) Add(accId string, amount *big.Int) error

func (*Token) Apply

func (b *Token) Apply(from string, meta vmmSchema.Meta) (res vmmSchema.Result)

func (*Token) CacheBalances

func (b *Token) CacheBalances() map[string]string

func (*Token) CacheChangeBalance

func (b *Token) CacheChangeBalance(updateAccounts ...string) map[string]string

func (*Token) CacheTotalSupply

func (b *Token) CacheTotalSupply() map[string]string

func (*Token) Checkpoint

func (b *Token) Checkpoint() (string, error)

func (*Token) Close

func (b *Token) Close() error

func (*Token) HandleBalanceOf

func (b *Token) HandleBalanceOf(from string, params map[string]string) (res vmmSchema.Result)

func (*Token) HandleTotalSupply

func (b *Token) HandleTotalSupply(from string) (res vmmSchema.Result)

func (*Token) HandleTransfer

func (b *Token) HandleTransfer(itemId, from string, params map[string]string) (res vmmSchema.Result)

func (*Token) Mint

func (b *Token) Mint(to string, amount *big.Int) (err error)

Core token operations

func (*Token) Restore

func (b *Token) Restore(data string) error

func (*Token) Sub

func (b *Token) Sub(accId string, amount *big.Int) error

func (*Token) Transfer

func (b *Token) Transfer(from, to string, amount *big.Int) (err error)

Jump to

Keyboard shortcuts

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