ont

package
v1.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: LGPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TRANSFER_FLAG byte = 1
	APPROVE_FLAG  byte = 2
)
View Source
const (
	UNBOUND_TIME_OFFSET = "unboundTimeOffset"
	TOTAL_SUPPLY_NAME   = "totalSupply"
	INIT_NAME           = "init"
	TRANSFER_NAME       = "transfer"
	APPROVE_NAME        = "approve"
	TRANSFERFROM_NAME   = "transferFrom"
	NAME_NAME           = "name"
	SYMBOL_NAME         = "symbol"
	DECIMALS_NAME       = "decimals"
	TOTALSUPPLY_NAME    = "totalSupply"
	BALANCEOF_NAME      = "balanceOf"
	ALLOWANCE_NAME      = "allowance"
)

Variables

This section is empty.

Functions

func AddNotifications

func AddNotifications(native *native.NativeService, contract common.Address, state *State)

func GenApproveKey

func GenApproveKey(contract, from, to common.Address) []byte

func GenBalanceKey

func GenBalanceKey(contract, addr common.Address) []byte

func GenTotalSupplyKey

func GenTotalSupplyKey(contract common.Address) []byte

func GetBalanceValue

func GetBalanceValue(native *native.NativeService, flag byte) ([]byte, error)

func GetToUInt64StorageItem

func GetToUInt64StorageItem(toBalance, value uint64) *cstates.StorageItem

func InitOnt

func InitOnt()

func OntAllowance

func OntAllowance(native *native.NativeService) ([]byte, error)

func OntApprove

func OntApprove(native *native.NativeService) ([]byte, error)

func OntBalanceOf

func OntBalanceOf(native *native.NativeService) ([]byte, error)

func OntDecimals

func OntDecimals(native *native.NativeService) ([]byte, error)

func OntInit

func OntInit(native *native.NativeService) ([]byte, error)

func OntName

func OntName(native *native.NativeService) ([]byte, error)

func OntSymbol

func OntSymbol(native *native.NativeService) ([]byte, error)

func OntTotalSupply

func OntTotalSupply(native *native.NativeService) ([]byte, error)

func OntTransfer

func OntTransfer(native *native.NativeService) ([]byte, error)

func OntTransferFrom

func OntTransferFrom(native *native.NativeService) ([]byte, error)

func RegisterOntContract

func RegisterOntContract(native *native.NativeService)

func Transfer

func Transfer(native *native.NativeService, contract common.Address, state *State) (uint64, uint64, error)

func TransferedFrom

func TransferedFrom(native *native.NativeService, currentContract common.Address, state *TransferFrom) (uint64, uint64, error)

Types

type State

type State struct {
	From  common.Address
	To    common.Address
	Value uint64
}

func (*State) Deserialization added in v1.0.3

func (this *State) Deserialization(source *common.ZeroCopySource) error

func (*State) Deserialize

func (this *State) Deserialize(r io.Reader) error

func (*State) Serialization added in v1.0.3

func (this *State) Serialization(sink *common.ZeroCopySink)

func (*State) Serialize

func (this *State) Serialize(w io.Writer) error

type TransferFrom

type TransferFrom struct {
	Sender common.Address
	From   common.Address
	To     common.Address
	Value  uint64
}

func (*TransferFrom) Deserialization added in v1.0.3

func (this *TransferFrom) Deserialization(source *common.ZeroCopySource) error

func (*TransferFrom) Deserialize

func (this *TransferFrom) Deserialize(r io.Reader) error

func (*TransferFrom) Serialization added in v1.0.3

func (this *TransferFrom) Serialization(sink *common.ZeroCopySink)

func (*TransferFrom) Serialize

func (this *TransferFrom) Serialize(w io.Writer) error

type Transfers

type Transfers struct {
	States []State
}

Transfers

func (*Transfers) Deserialization added in v1.0.3

func (this *Transfers) Deserialization(source *common.ZeroCopySource) error

func (*Transfers) Deserialize

func (this *Transfers) Deserialize(r io.Reader) error

func (*Transfers) Serialization added in v1.0.3

func (this *Transfers) Serialization(sink *common.ZeroCopySink)

func (*Transfers) Serialize

func (this *Transfers) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

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