Documentation ¶
Index ¶
- Constants
- func AddNotifications(native *native.NativeService, contract common.Address, state *State)
- func GenApproveKey(contract, from, to common.Address) []byte
- func GenBalanceKey(contract, addr common.Address) []byte
- func GenTotalSupplyKey(contract common.Address) []byte
- func GetBalanceValue(native *native.NativeService, flag byte) ([]byte, error)
- func GetToUInt64StorageItem(toBalance, value uint64) *cstates.StorageItem
- func InitTst()
- func RegisterTstContract(native *native.NativeService)
- func Transfer(native *native.NativeService, contract common.Address, state *State) (uint64, uint64, error)
- func TransferedFrom(native *native.NativeService, currentContract common.Address, ...) (uint64, uint64, error)
- func TstAllowance(native *native.NativeService) ([]byte, error)
- func TstApprove(native *native.NativeService) ([]byte, error)
- func TstBalanceOf(native *native.NativeService) ([]byte, error)
- func TstDecimals(native *native.NativeService) ([]byte, error)
- func TstInit(native *native.NativeService) ([]byte, error)
- func TstName(native *native.NativeService) ([]byte, error)
- func TstSymbol(native *native.NativeService) ([]byte, error)
- func TstTotalSupply(native *native.NativeService) ([]byte, error)
- func TstTransfer(native *native.NativeService) ([]byte, error)
- func TstTransferFrom(native *native.NativeService) ([]byte, error)
- type State
- type TransferFrom
- type Transfers
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 GenBalanceKey ¶
func GenTotalSupplyKey ¶
func GetBalanceValue ¶
func GetBalanceValue(native *native.NativeService, flag byte) ([]byte, error)
func GetToUInt64StorageItem ¶
func GetToUInt64StorageItem(toBalance, value uint64) *cstates.StorageItem
func RegisterTstContract ¶
func RegisterTstContract(native *native.NativeService)
func TransferedFrom ¶
func TransferedFrom(native *native.NativeService, currentContract common.Address, state *TransferFrom) (uint64, uint64, error)
func TstAllowance ¶
func TstAllowance(native *native.NativeService) ([]byte, error)
func TstApprove ¶
func TstApprove(native *native.NativeService) ([]byte, error)
func TstBalanceOf ¶
func TstBalanceOf(native *native.NativeService) ([]byte, error)
func TstDecimals ¶
func TstDecimals(native *native.NativeService) ([]byte, error)
func TstTotalSupply ¶
func TstTotalSupply(native *native.NativeService) ([]byte, error)
func TstTransfer ¶
func TstTransfer(native *native.NativeService) ([]byte, error)
func TstTransferFrom ¶
func TstTransferFrom(native *native.NativeService) ([]byte, error)
Types ¶
type State ¶
func (*State) Deserialization ¶
func (this *State) Deserialization(source *common.ZeroCopySource) error
func (*State) Serialization ¶
func (this *State) Serialization(sink *common.ZeroCopySink)
type TransferFrom ¶
type TransferFrom struct { Sender common.Address From common.Address To common.Address Value uint64 }
func (*TransferFrom) Deserialization ¶
func (this *TransferFrom) Deserialization(source *common.ZeroCopySource) error
func (*TransferFrom) Serialization ¶
func (this *TransferFrom) Serialization(sink *common.ZeroCopySink)
type Transfers ¶
type Transfers struct {
States []State
}
Transfers
func (*Transfers) Deserialization ¶
func (this *Transfers) Deserialization(source *common.ZeroCopySource) error
func (*Transfers) Serialization ¶
func (this *Transfers) Serialization(sink *common.ZeroCopySink)
Click to show internal directories.
Click to hide internal directories.