Documentation ¶
Index ¶
- Constants
- func AddTransferNotifications(native *native.NativeService, contract common.Address, state *TransferStateV2)
- 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, scaleDecimal9 bool) ([]byte, error)
- func GetToUInt64StorageItem(toBalance, value uint64) *cstates.StorageItem
- func InitOnt()
- func OntAllowance(native *native.NativeService) ([]byte, error)
- func OntAllowanceV2(native *native.NativeService) ([]byte, error)
- func OntApprove(native *native.NativeService) ([]byte, error)
- func OntApproveV2(native *native.NativeService) ([]byte, error)
- func OntBalanceOf(native *native.NativeService) ([]byte, error)
- func OntBalanceOfV2(native *native.NativeService) ([]byte, error)
- func OntDecimals(native *native.NativeService) ([]byte, error)
- func OntDecimalsV2(native *native.NativeService) ([]byte, error)
- func OntInit(native *native.NativeService) ([]byte, error)
- func OntName(native *native.NativeService) ([]byte, error)
- func OntSymbol(native *native.NativeService) ([]byte, error)
- func OntTotalSupply(native *native.NativeService) ([]byte, error)
- func OntTotalSupplyV2(native *native.NativeService) ([]byte, error)
- func OntTransfer(native *native.NativeService) ([]byte, error)
- func OntTransferFrom(native *native.NativeService) ([]byte, error)
- func OntTransferFromV2(native *native.NativeService) ([]byte, error)
- func OntTransferV2(native *native.NativeService) ([]byte, error)
- func RegisterOntContract(native *native.NativeService)
- func TotalAllowance(native *native.NativeService) ([]byte, error)
- func TotalAllowanceV2(native *native.NativeService) ([]byte, error)
- func Transfer(native *native.NativeService, contract common.Address, from, to common.Address, ...) (oldFrom, oldTo cstates.NativeTokenBalance, err error)
- func TransferedFrom(native *native.NativeService, currentContract common.Address, ...) (oldFrom cstates.NativeTokenBalance, oldTo cstates.NativeTokenBalance, ...)
- func UnboundOngToGovernance(native *native.NativeService) ([]byte, error)
- type TransferFrom
- type TransferFromStateV2
- type TransferState
- type TransferStateV2
- type TransferStates
- type TransferStatesV2
Constants ¶
View Source
const ( TRANSFER_FLAG byte = 1 APPROVE_FLAG byte = 2 )
View Source
const ( UNBOUND_TIME_OFFSET_KEY = "unboundTimeOffset" TOTAL_SUPPLY_KEY = "totalSupply" )
storage key
View Source
const ( INIT_NAME = "init" TRANSFER_NAME = "transfer" APPROVE_NAME = "approve" TRANSFERFROM_NAME = "transferFrom" NAME_NAME = "name" SYMBOL_NAME = "symbol" DECIMALS_NAME = "decimals" TOTAL_SUPPLY_NAME = "totalSupply" BALANCEOF_NAME = "balanceOf" ALLOWANCE_NAME = "allowance" TOTAL_ALLOWANCE_NAME = "totalAllowance" TRANSFER_V2_NAME = "transferV2" APPROVE_V2_NAME = "approveV2" TRANSFERFROM_V2_NAME = "transferFromV2" DECIMALS_V2_NAME = "decimalsV2" TOTAL_SUPPLY_V2_NAME = "totalSupplyV2" BALANCEOF_V2_NAME = "balanceOfV2" ALLOWANCE_V2_NAME = "allowanceV2" TOTAL_ALLOWANCE_V2_NAME = "totalAllowanceV2" UNBOUND_ONG_TO_GOVERNANCE = "unboundOngToGovernance" )
methods
Variables ¶
This section is empty.
Functions ¶
func AddTransferNotifications ¶ added in v1.14.1
func AddTransferNotifications(native *native.NativeService, contract common.Address, state *TransferStateV2)
func GenApproveKey ¶
func GenBalanceKey ¶
func GenTotalSupplyKey ¶
func GetBalanceValue ¶
func GetToUInt64StorageItem ¶
func GetToUInt64StorageItem(toBalance, value uint64) *cstates.StorageItem
func OntAllowance ¶
func OntAllowance(native *native.NativeService) ([]byte, error)
func OntAllowanceV2 ¶ added in v1.14.1
func OntAllowanceV2(native *native.NativeService) ([]byte, error)
func OntApprove ¶
func OntApprove(native *native.NativeService) ([]byte, error)
func OntApproveV2 ¶ added in v1.14.1
func OntApproveV2(native *native.NativeService) ([]byte, error)
func OntBalanceOf ¶
func OntBalanceOf(native *native.NativeService) ([]byte, error)
func OntBalanceOfV2 ¶ added in v1.14.1
func OntBalanceOfV2(native *native.NativeService) ([]byte, error)
func OntDecimals ¶
func OntDecimals(native *native.NativeService) ([]byte, error)
func OntDecimalsV2 ¶ added in v1.14.1
func OntDecimalsV2(native *native.NativeService) ([]byte, error)
func OntTotalSupply ¶
func OntTotalSupply(native *native.NativeService) ([]byte, error)
func OntTotalSupplyV2 ¶ added in v1.14.1
func OntTotalSupplyV2(native *native.NativeService) ([]byte, error)
func OntTransfer ¶
func OntTransfer(native *native.NativeService) ([]byte, error)
func OntTransferFrom ¶
func OntTransferFrom(native *native.NativeService) ([]byte, error)
func OntTransferFromV2 ¶ added in v1.14.1
func OntTransferFromV2(native *native.NativeService) ([]byte, error)
func OntTransferV2 ¶ added in v1.14.1
func OntTransferV2(native *native.NativeService) ([]byte, error)
func RegisterOntContract ¶
func RegisterOntContract(native *native.NativeService)
func TotalAllowance ¶ added in v1.10.0
func TotalAllowance(native *native.NativeService) ([]byte, error)
func TotalAllowanceV2 ¶ added in v1.14.1
func TotalAllowanceV2(native *native.NativeService) ([]byte, error)
func Transfer ¶
func Transfer(native *native.NativeService, contract common.Address, from, to common.Address, value cstates.NativeTokenBalance) (oldFrom, oldTo cstates.NativeTokenBalance, err error)
func TransferedFrom ¶
func TransferedFrom(native *native.NativeService, currentContract common.Address, state *TransferFromStateV2) (oldFrom cstates.NativeTokenBalance, oldTo cstates.NativeTokenBalance, err error)
func UnboundOngToGovernance ¶ added in v1.11.0
func UnboundOngToGovernance(native *native.NativeService) ([]byte, error)
Types ¶
type TransferFrom ¶
type TransferFrom struct { Sender common.Address TransferState }
func NewTransferFromState ¶ added in v1.14.1
func NewTransferFromState(sender, from, to common.Address, value uint64) *TransferFrom
func (*TransferFrom) Deserialization ¶ added in v1.0.3
func (this *TransferFrom) Deserialization(source *common.ZeroCopySource) error
func (*TransferFrom) Serialization ¶ added in v1.0.3
func (this *TransferFrom) Serialization(sink *common.ZeroCopySink)
func (*TransferFrom) ToV2 ¶ added in v1.14.1
func (self *TransferFrom) ToV2() *TransferFromStateV2
type TransferFromStateV2 ¶ added in v1.14.1
type TransferFromStateV2 struct { Sender common.Address TransferStateV2 }
func (*TransferFromStateV2) Deserialization ¶ added in v1.14.1
func (self *TransferFromStateV2) Deserialization(source *common.ZeroCopySource) error
func (*TransferFromStateV2) Serialization ¶ added in v1.14.1
func (self *TransferFromStateV2) Serialization(sink *common.ZeroCopySink)
type TransferState ¶ added in v1.14.1
type TransferState struct { From common.Address To common.Address Value uint64 // contains filtered or unexported fields }
func (*TransferState) Deserialization ¶ added in v1.14.1
func (this *TransferState) Deserialization(source *common.ZeroCopySource) error
func (*TransferState) Serialization ¶ added in v1.14.1
func (this *TransferState) Serialization(sink *common.ZeroCopySink)
func (*TransferState) ToV2 ¶ added in v1.14.1
func (this *TransferState) ToV2() *TransferStateV2
type TransferStateV2 ¶ added in v1.14.1
type TransferStateV2 struct { From common.Address To common.Address Value states.NativeTokenBalance }
func (*TransferStateV2) Deserialization ¶ added in v1.14.1
func (this *TransferStateV2) Deserialization(source *common.ZeroCopySource) error
func (*TransferStateV2) Serialization ¶ added in v1.14.1
func (this *TransferStateV2) Serialization(sink *common.ZeroCopySink)
type TransferStates ¶ added in v1.14.1
type TransferStates struct { States []TransferState // contains filtered or unexported fields }
TransferStates
func (*TransferStates) Deserialization ¶ added in v1.14.1
func (this *TransferStates) Deserialization(source *common.ZeroCopySource) error
func (*TransferStates) Serialization ¶ added in v1.14.1
func (this *TransferStates) Serialization(sink *common.ZeroCopySink)
func (*TransferStates) ToV2 ¶ added in v1.14.1
func (this *TransferStates) ToV2() *TransferStatesV2
type TransferStatesV2 ¶ added in v1.14.1
type TransferStatesV2 struct {
States []*TransferStateV2
}
func (*TransferStatesV2) Deserialization ¶ added in v1.14.1
func (this *TransferStatesV2) Deserialization(source *common.ZeroCopySource) error
func (*TransferStatesV2) Serialization ¶ added in v1.14.1
func (this *TransferStatesV2) Serialization(sink *common.ZeroCopySink)
Click to show internal directories.
Click to hide internal directories.