Documentation ¶
Index ¶
Constants ¶
View Source
const ( //KyberSwapAppName is the name of kyberswap KyberSwapAppName = "KyberSwap" //ThirdPartyAppName is the generic name for third party apps ThirdPartyAppName = "ThirdParty" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddrToAppName ¶
type AddrToAppName interface { UpdateMapAddrAppName(addr ethereum.Address, name string) error GetAddrToAppName() map[ethereum.Address]string }
AddrToAppName define a set of interface required to translate address to app name
type MapAddrAppName ¶
type MapAddrAppName struct {
// contains filtered or unexported fields
}
MapAddrAppName return the app name according to address
func NewMapAddrAppName ¶
func NewMapAddrAppName(options ...Option) *MapAddrAppName
NewMapAddrAppName return a new instance of MapAddrAppName
func (*MapAddrAppName) GetAddrToAppName ¶
func (apn *MapAddrAppName) GetAddrToAppName() map[ethereum.Address]string
GetAddrToAppName return a map of address to app name
func (*MapAddrAppName) UpdateMapAddrAppName ¶
func (apn *MapAddrAppName) UpdateMapAddrAppName(addr ethereum.Address, name string) error
UpdateMapAddrAppName update an address map to a name
type Option ¶
type Option func(m *MapAddrAppName)
Option sets the initialization behavior MappAddrAppName inSTANCE
func WithDataFile ¶
WithDataFile returns an option to read data in from a JSON file
Click to show internal directories.
Click to hide internal directories.