wwatcher

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MIWs = &collections.AddressCollection{
	common.HexToAddress("0x05576913eea5d79B83f28f0Cb0D12BE54Fdae8dC"),
	common.HexToAddress("0x115894b2859E58419D1eF4787A79a431CE2615C3"),
	common.HexToAddress("0x06b7558064992954fA982771742a4940ed44C3c1"),
	common.HexToAddress("0x39Cc9C86E67BAf2129b80Fe3414c397492eA8026"),
	common.HexToAddress("0x9a7DC5307940fa170F9093Ca548bDa0EDB602767"),
	common.HexToAddress("0x23423cc57E2B7b204291dADb78c6Cc95B7e4ef56"),
	common.HexToAddress("0x62D4377141e0a4A6EAaB3167E0fFA4bC037dB3A5"),
	common.HexToAddress("0xaD4d39612f84636CCfEB4C056d6BCE7e8Be703D6"),
	common.HexToAddress("0xf2439241881964006369c0e2377D45F3740f48a0"),
	common.HexToAddress("0xf1637ADEdEb89559c70481c3cB4f74eBAC80d829"),
	common.HexToAddress("0x74E7bdf51a338aDB142627d16fA9473E9a81870a"),
	common.HexToAddress("0xB719e142B085B47Ca19905F0c0c325C5f937ACFb"),
	common.HexToAddress("0xDcaE87821FA6CAEA05dBc2811126f4bc7fF73bd1"),
	common.HexToAddress("0xb503C8A636f268E10657dCfF0E21Fb6cdDF804f7"),
	common.HexToAddress("0xb855567a17c266c1d82a52bb093ef5b6a66deb01"),
	common.HexToAddress("0xD722a299D14a19b56CDdaEaE0E1d5a5786424570"),
	common.HexToAddress("0xE487Ed5ec80ccA6e8A44F6D6f3f712088df8Ad4F"),
	common.HexToAddress("0x3bc1b52d90FCd503031Ca39F718474f3B42b2200"),
	common.HexToAddress("0x15d41E0Fa9419b11916507BEd3E201FE82266C74"),
	common.HexToAddress("0xfE97f3ba5dA378Cd83F94B02DE8358045491D48f"),
	common.HexToAddress("0xF3936154fc93ecDA413de9f0A6E2cC20c56e9dcc"),
	common.HexToAddress("0x66EC5ebf30c230976CfdF808a17FbD0ADd302537"),
}

Functions

func GetENSForAddress

func GetENSForAddress(ctx context.Context, nodes *gbnode.NodeCollection, address common.Address, namesCache *NamesCache) string

GetENSForAddress returns the ENS name for an address or an empty string if not available.

func GetWalletsFromConfig

func GetWalletsFromConfig(walletsConfig []string, nodes *gbnode.NodeCollection) *models.Wallets

GetWalletsFromConfig returns a slice of wallets from the configuration file.

func InitWatcher

func InitWatcher()

func ReverseLookupAndValidate

func ReverseLookupAndValidate(ctx context.Context, address common.Address, nodes *gbnode.NodeCollection) string

func WalletShortAddress

func WalletShortAddress(address common.Address) string

Types

type NamesCache

type NamesCache struct {
	Names map[common.Address]string // ens.Name
	RWMu  *sync.RWMutex
}

NamesCache Collection represents the collections configured by the user.

func (*NamesCache) MarshalBinary

func (nc *NamesCache) MarshalBinary() ([]byte, error)

MarshalBinary encodes the Collection into a binary format.

func (*NamesCache) UnmarshalBinary

func (nc *NamesCache) UnmarshalBinary(data []byte) error

UnmarshalBinary decodes the Collection from a binary format.

type NotificationRecipients

type NotificationRecipients map[common.Address]*User
var Recipients NotificationRecipients = make(map[common.Address]*User)

func (*NotificationRecipients) Contains

func (nr *NotificationRecipients) Contains(address common.Address) bool

Contains returns true if the given string is in the slice.

type User

type User struct {
	Name            string           `mapstructure:"name"`
	WalletAddresses []common.Address `mapstructure:"wallets"`
	TgUsername      string           `mapstructure:"telegram"`
}

Wallet represents the wallets watched by the wwatcher.

Jump to

Keyboard shortcuts

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