native

package
v0.0.0-...-c8e9c26 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ADDRESS_HEIGHT    = []byte("addressHeight")
	TRANSFER_NAME     = "transfer"
	TOTAL_SUPPLY_NAME = []byte("totalSupply")
)
View Source
var (
	DECIMALS         = big.NewInt(9)
	ONG_TOTAL_SUPPLY = new(big.Int).Mul(big.NewInt(1000000000), (new(big.Int).Exp(big.NewInt(10), DECIMALS, nil)))
)
View Source
var (
	DECREMENT_INTERVAL = uint32(2000000)
	GENERATION_AMOUNT  = [17]uint32{80, 70, 60, 50, 40, 30, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}
	GL                 = uint32(len(GENERATION_AMOUNT))
	ONT_TOTAL_SUPPLY   = big.NewInt(1000000000)
)

Functions

func OngApprove

func OngApprove(native *NativeService) error

func OngInit

func OngInit(native *NativeService) error

func OngTransfer

func OngTransfer(native *NativeService) error

func OngTransferFrom

func OngTransferFrom(native *NativeService) error

func OntApprove

func OntApprove(native *NativeService) error

func OntInit

func OntInit(native *NativeService) error

func OntTransfer

func OntTransfer(native *NativeService) error

func OntTransferFrom

func OntTransferFrom(native *NativeService) error

func RegisterOngContract

func RegisterOngContract(native *NativeService)

func RegisterOntContract

func RegisterOntContract(native *NativeService)

Types

type Handler

type Handler func(native *NativeService) error

type NativeService

type NativeService struct {
	CloneCache    *storage.CloneCache
	ServiceMap    map[string]Handler
	Notifications []*event.NotifyEventInfo
	Input         []byte
	Tx            *types.Transaction
	Height        uint32
	ContextRef    context.ContextRef
}

func NewNativeService

func NewNativeService(dbCache scommon.StateStore, height uint32, tx *types.Transaction, ctxRef context.ContextRef) *NativeService

func (*NativeService) AppCall

func (native *NativeService) AppCall(address common.Address, method string, args []byte) error

func (*NativeService) Invoke

func (native *NativeService) Invoke() error

func (*NativeService) Register

func (native *NativeService) Register(methodName string, handler Handler)

type RegisterService

type RegisterService func(native *NativeService)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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