Notification

package
v0.0.0-...-556a089 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetRootChangedNotifications = make(map[string]AssetRootChanged)
View Source
var AssetSubChangedNotifications = make(map[string]AssetSubChanged)
View Source
var DNSChangedNotifications = make(map[string]DNSChanged)
View Source
var MarketAskAddedNotifications = make(map[string]MarketAskAdded)
View Source
var MarketAskChangedNotifications = make(map[string]MarketAskChanged)
View Source
var MarketAskRemovedNotifications = make(map[string]MarketAskRemove)
View Source
var MarketSellAddedNotifications = make(map[string]MarketSellAdded)
View Source
var MarketSellChangedNotifications = make(map[string]MarketSellChanged)
View Source
var MarketSellRemovedNotifications = make(map[string]MarketSellRemoved)
View Source
var MarketSoldByAskNotifications = make(map[string]MarketSoldByAsk)
View Source
var MarketSoldBySellNotifications = make(map[string]MarketSoldBySell)
View Source
var OwnershipAddNotifications = make(map[string]OwnershipAdd)
View Source
var OwnershipExtendNotifications = make(map[string]OwnershipExtend)
View Source
var OwnershipRemoveNotifications = make(map[string]OwnershipRemove)
View Source
var OwnershipTakeoverNotifications = make(map[string]OwnershipTakeover)
View Source
var OwnershipTransferFromNotifications = make(map[string]OwnershipTransferFrom)
View Source
var OwnershipTransferNotifications = make(map[string]OwnershipTransfer)
View Source
var OwnershipUpdateNotifications = make(map[string]OwnershipUpdate)
View Source
var PaidNotifications = make(map[string]Paid)

Functions

func NotifyAssetRootChanged

func NotifyAssetRootChanged(
	hash Bas_Ethereum.Hash,
	isOpen bool,
	isCustomized bool,
	isRare bool,
	customizedPrice big.Int)

func NotifyAssetSubChanged

func NotifyAssetSubChanged(
	hash Bas_Ethereum.Hash,
	rootHash Bas_Ethereum.Hash)

func NotifyDNSChanged

func NotifyDNSChanged(
	hash Bas_Ethereum.Hash,
	IPv4 [4]byte,
	IPv6 [16]byte,
	Bca []byte,
	OpData []byte,
	AliasName string)

func NotifyMarketAskAdded

func NotifyMarketAskAdded(
	hash Bas_Ethereum.Hash,
	buyer common.Address,
	price big.Int,
	protectiveTime big.Int,
	commitBlock uint64)

func NotifyMarketAskChanged

func NotifyMarketAskChanged(
	hash Bas_Ethereum.Hash,
	buyer common.Address,
	price big.Int,
	protectiveTime big.Int)

func NotifyMarketAskRemove

func NotifyMarketAskRemove(
	hash Bas_Ethereum.Hash,
	buyer common.Address)

func NotifyMarketSellAdded

func NotifyMarketSellAdded(
	hash Bas_Ethereum.Hash,
	seller common.Address,
	price big.Int,
	commitBlock uint64)

func NotifyMarketSellChanged

func NotifyMarketSellChanged(
	hash Bas_Ethereum.Hash,
	seller common.Address,
	price big.Int)

func NotifyMarketSellRemoved

func NotifyMarketSellRemoved(
	hash Bas_Ethereum.Hash,
	seller common.Address)

func NotifyMarketSoldByAsk

func NotifyMarketSoldByAsk(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	price big.Int,
	commitBlock uint64)

func NotifyMarketSoldBySell

func NotifyMarketSoldBySell(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	price big.Int,
	commitBlock uint64)

func NotifyOwnershipAdd

func NotifyOwnershipAdd(
	hash Bas_Ethereum.Hash,
	owner common.Address,
	expire big.Int,
	commitBlock uint64)

func NotifyOwnershipExtend

func NotifyOwnershipExtend(
	hash Bas_Ethereum.Hash,
	extend big.Int)

func NotifyOwnershipRemove

func NotifyOwnershipRemove(
	hash Bas_Ethereum.Hash)

func NotifyOwnershipTakeover

func NotifyOwnershipTakeover(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address)

func NotifyOwnershipTransfer

func NotifyOwnershipTransfer(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address)

func NotifyOwnershipTransferFrom

func NotifyOwnershipTransferFrom(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	by common.Address)

func NotifyOwnershipUpdate

func NotifyOwnershipUpdate(
	hash Bas_Ethereum.Hash,
	owner common.Address,
	expire big.Int,
	commitBlock uint64)

func NotifyPaid

func NotifyPaid(
	payer common.Address,
	name []byte,
	option string,
	amount big.Int,
	commitBlock uint64)

Types

type AssetRootChanged

type AssetRootChanged func(
	hash Bas_Ethereum.Hash,
	isOpen bool,
	isCustomized bool,
	isRare bool,
	customizedPrice big.Int)

there we do not specify which variable is changed, rather offer a whole record

type AssetSubChanged

type AssetSubChanged func(
	hash Bas_Ethereum.Hash,
	rootHash Bas_Ethereum.Hash)

type DNSChanged

type DNSChanged func(
	hash Bas_Ethereum.Hash,
	IPv4 [4]byte,
	IPv6 [16]byte,
	Bca []byte,
	OpData []byte,
	AliasName string)

type MarketAskAdded

type MarketAskAdded func(
	hash Bas_Ethereum.Hash,
	buyer common.Address,
	price big.Int,
	protectiveTime big.Int,
	commitBlock uint64)

type MarketAskChanged

type MarketAskChanged func(
	hash Bas_Ethereum.Hash,
	buyer common.Address,
	price big.Int,
	protectiveTime big.Int)

type MarketAskRemove

type MarketAskRemove func(
	hash Bas_Ethereum.Hash,
	buyer common.Address)

type MarketSellAdded

type MarketSellAdded func(
	hash Bas_Ethereum.Hash,
	seller common.Address,
	price big.Int,
	commitBlock uint64)

type MarketSellChanged

type MarketSellChanged func(
	hash Bas_Ethereum.Hash,
	seller common.Address,
	price big.Int)

type MarketSellRemoved

type MarketSellRemoved func(
	hash Bas_Ethereum.Hash,
	seller common.Address)

type MarketSoldByAsk

type MarketSoldByAsk func(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	price big.Int,
	commitBlock uint64)

type MarketSoldBySell

type MarketSoldBySell func(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	price big.Int,
	commitBlock uint64)

type OwnershipAdd

type OwnershipAdd func(
	hash Bas_Ethereum.Hash,
	owner common.Address,
	expire big.Int,
	commitBlock uint64)

type OwnershipExtend

type OwnershipExtend func(
	hash Bas_Ethereum.Hash,
	extend big.Int)

extend is time in seconds added to current time (when hash expired) or expire time (hash not expired)

type OwnershipRemove

type OwnershipRemove func(
	hash Bas_Ethereum.Hash)

type OwnershipTakeover

type OwnershipTakeover func(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address)

takeover, transfer, transferFrom are similar functions, meaning transfer hash from old owner to new owner

type OwnershipTransfer

type OwnershipTransfer func(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address)

type OwnershipTransferFrom

type OwnershipTransferFrom func(
	hash Bas_Ethereum.Hash,
	oldOwner common.Address,
	newOwner common.Address,
	by common.Address)

by is the approved logic contract address, not very useful to backend server

type OwnershipUpdate

type OwnershipUpdate func(
	hash Bas_Ethereum.Hash,
	owner common.Address,
	expire big.Int,
	commitBlock uint64)

please check if hash exists, and act accordingly, if hash exists, you should drop any record of old owner and insert this record, and keep the smallest commitBlockNumber if not zero. if hash does not exist, simple add record is ok

type Paid func(
	payer common.Address,
	name []byte,
	option string,
	amount big.Int,
	commitBlock uint64)

Jump to

Keyboard shortcuts

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