Documentation ¶
Index ¶
- Variables
- func OngApprove(native *NativeService) error
- func OngInit(native *NativeService) error
- func OngTransfer(native *NativeService) error
- func OngTransferFrom(native *NativeService) error
- func OntApprove(native *NativeService) error
- func OntInit(native *NativeService) error
- func OntTransfer(native *NativeService) error
- func OntTransferFrom(native *NativeService) error
- func RegisterOngContract(native *NativeService)
- func RegisterOntContract(native *NativeService)
- type Handler
- type NativeService
- type RegisterService
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) )
View Source
var ( Contracts = map[common.Address]RegisterService{ genesis.OntContractAddress: RegisterOntContract, genesis.OngContractAddress: RegisterOngContract, } )
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) Invoke ¶
func (native *NativeService) Invoke() error
func (*NativeService) Register ¶
func (native *NativeService) Register(methodName string, handler Handler)
type RegisterService ¶
type RegisterService func(native *NativeService)
Click to show internal directories.
Click to hide internal directories.