Versions in this module Expand all Collapse all v0 v0.1.3 Feb 21, 2024 Changes in this version + const BLOCKS_TO_SCAN_AT_ONCE + const DefaultMaxWeb3ClientRetries + const LOG_TOPIC_ERC1155_TRANSFER_BATCH + const LOG_TOPIC_ERC1155_TRANSFER_SINGLE + const LOG_TOPIC_ERC20_TRANSFER + const LOG_TOPIC_FARCASTER_ADDKEY + const LOG_TOPIC_FARCASTER_REGISTER + const LOG_TOPIC_FARCASTER_REMOVEKEY + const MAX_NEW_HOLDER_CANDIDATES_PER_ITERATION + const MAX_SCAN_BLOCKS_PER_ITERATION + const MAX_SCAN_LOGS_PER_ITERATION + const NULL_ADDRESS + const TimeLayout + var DefaultNetworkEndpoint = &NetworkEndpoint + var ErrClientNotSet = fmt.Errorf("client not set") + var ErrConnectingToWeb3Client = fmt.Errorf("client not set") + var ErrGettingTotalSupply = fmt.Errorf("error getting total supply") + var ErrInitializingContract = fmt.Errorf("error initializing token contract") + var ErrParsingTokenLogs = fmt.Errorf("error parsing token logs") + var ErrScanningTokenLogs = fmt.Errorf("error scanning token logs") + var ErrTooManyRequests = fmt.Errorf("web3 endpoint returns too many requests") + func GetChainIDByURI(ctx context.Context, uri string) (uint64, error) + func RangeOfLogs(ctx context.Context, client *ethclient.Client, addr common.Address, ...) ([]types.Log, uint64, bool, error) + type ERC20HolderProvider struct + func (p *ERC20HolderProvider) Address(_ []byte) common.Address + func (p *ERC20HolderProvider) BalanceAt(ctx context.Context, addr common.Address, _ []byte, blockNumber uint64) (*big.Int, error) + func (p *ERC20HolderProvider) BalanceOf(addr common.Address, _ []byte) (*big.Int, error) + func (p *ERC20HolderProvider) BlockRootHash(ctx context.Context, blockNumber uint64) ([]byte, error) + func (p *ERC20HolderProvider) BlockTimestamp(ctx context.Context, blockNumber uint64) (string, error) + func (p *ERC20HolderProvider) CensusKeys(data map[common.Address]*big.Int) (map[common.Address]*big.Int, error) + func (p *ERC20HolderProvider) ChainID() uint64 + func (p *ERC20HolderProvider) Close() error + func (p *ERC20HolderProvider) CreationBlock(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC20HolderProvider) Decimals(_ []byte) (uint64, error) + func (p *ERC20HolderProvider) HoldersBalances(ctx context.Context, _ []byte, fromBlock uint64) (map[common.Address]*big.Int, uint64, uint64, bool, *big.Int, error) + func (p *ERC20HolderProvider) IconURI(_ []byte) (string, error) + func (p *ERC20HolderProvider) Init(iconf any) error + func (p *ERC20HolderProvider) IsExternal() bool + func (p *ERC20HolderProvider) IsSynced(_ []byte) bool + func (p *ERC20HolderProvider) LatestBlockNumber(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC20HolderProvider) Name(_ []byte) (string, error) + func (p *ERC20HolderProvider) SetLastBalances(_ context.Context, _ []byte, _ map[common.Address]*big.Int, _ uint64) error + func (p *ERC20HolderProvider) SetLastBlockNumber(blockNumber uint64) + func (p *ERC20HolderProvider) SetRef(iref any) error + func (p *ERC20HolderProvider) Symbol(_ []byte) (string, error) + func (p *ERC20HolderProvider) TotalSupply(_ []byte) (*big.Int, error) + func (p *ERC20HolderProvider) Type() uint64 + func (p *ERC20HolderProvider) TypeName() string + type ERC721HolderProvider struct + func (p *ERC721HolderProvider) Address(_ []byte) common.Address + func (p *ERC721HolderProvider) BalanceAt(ctx context.Context, addr common.Address, _ []byte, blockNumber uint64) (*big.Int, error) + func (p *ERC721HolderProvider) BalanceOf(addr common.Address, _ []byte) (*big.Int, error) + func (p *ERC721HolderProvider) BlockRootHash(ctx context.Context, blockNumber uint64) ([]byte, error) + func (p *ERC721HolderProvider) BlockTimestamp(ctx context.Context, blockNumber uint64) (string, error) + func (p *ERC721HolderProvider) CensusKeys(data map[common.Address]*big.Int) (map[common.Address]*big.Int, error) + func (p *ERC721HolderProvider) ChainID() uint64 + func (p *ERC721HolderProvider) Close() error + func (p *ERC721HolderProvider) CreationBlock(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC721HolderProvider) Decimals(_ []byte) (uint64, error) + func (p *ERC721HolderProvider) HoldersBalances(ctx context.Context, _ []byte, fromBlock uint64) (map[common.Address]*big.Int, uint64, uint64, bool, *big.Int, error) + func (p *ERC721HolderProvider) IconURI(_ []byte) (string, error) + func (p *ERC721HolderProvider) Init(iconf any) error + func (p *ERC721HolderProvider) IsExternal() bool + func (p *ERC721HolderProvider) IsSynced(_ []byte) bool + func (p *ERC721HolderProvider) LatestBlockNumber(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC721HolderProvider) Name(_ []byte) (string, error) + func (p *ERC721HolderProvider) SetLastBalances(_ context.Context, _ []byte, _ map[common.Address]*big.Int, _ uint64) error + func (p *ERC721HolderProvider) SetLastBlockNumber(blockNumber uint64) + func (p *ERC721HolderProvider) SetRef(iref any) error + func (p *ERC721HolderProvider) Symbol(_ []byte) (string, error) + func (p *ERC721HolderProvider) TotalSupply(_ []byte) (*big.Int, error) + func (p *ERC721HolderProvider) Type() uint64 + func (p *ERC721HolderProvider) TypeName() string + type ERC777HolderProvider struct + func (p *ERC777HolderProvider) Address(_ []byte) common.Address + func (p *ERC777HolderProvider) BalanceAt(ctx context.Context, addr common.Address, _ []byte, blockNumber uint64) (*big.Int, error) + func (p *ERC777HolderProvider) BalanceOf(addr common.Address, _ []byte) (*big.Int, error) + func (p *ERC777HolderProvider) BlockRootHash(ctx context.Context, blockNumber uint64) ([]byte, error) + func (p *ERC777HolderProvider) BlockTimestamp(ctx context.Context, blockNumber uint64) (string, error) + func (p *ERC777HolderProvider) CensusKeys(data map[common.Address]*big.Int) (map[common.Address]*big.Int, error) + func (p *ERC777HolderProvider) ChainID() uint64 + func (p *ERC777HolderProvider) Close() error + func (p *ERC777HolderProvider) CreationBlock(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC777HolderProvider) Decimals(_ []byte) (uint64, error) + func (p *ERC777HolderProvider) HoldersBalances(ctx context.Context, _ []byte, fromBlock uint64) (map[common.Address]*big.Int, uint64, uint64, bool, *big.Int, error) + func (p *ERC777HolderProvider) IconURI(_ []byte) (string, error) + func (p *ERC777HolderProvider) Init(iconf any) error + func (p *ERC777HolderProvider) IsExternal() bool + func (p *ERC777HolderProvider) IsSynced(_ []byte) bool + func (p *ERC777HolderProvider) LatestBlockNumber(ctx context.Context, _ []byte) (uint64, error) + func (p *ERC777HolderProvider) Name(_ []byte) (string, error) + func (p *ERC777HolderProvider) SetLastBalances(_ context.Context, _ []byte, _ map[common.Address]*big.Int, _ uint64) error + func (p *ERC777HolderProvider) SetLastBlockNumber(blockNumber uint64) + func (p *ERC777HolderProvider) SetRef(iref any) error + func (p *ERC777HolderProvider) Symbol(_ []byte) (string, error) + func (p *ERC777HolderProvider) TotalSupply(_ []byte) (*big.Int, error) + func (p *ERC777HolderProvider) Type() uint64 + func (p *ERC777HolderProvider) TypeName() string + type NetworkEndpoint struct + ChainID uint64 + Name string + ShortName string + URIs []string + func TestNetworkEndpoint() (*NetworkEndpoint, error) + func (n *NetworkEndpoint) GetClient(maxRetries int) (*ethclient.Client, error) + type NetworkEndpoints map[uint64]*NetworkEndpoint + func InitNetworkEndpoints(providersURIs []string) (NetworkEndpoints, error) + func (nps NetworkEndpoints) ChainAddress(chainID uint64, hexAddress string) (string, bool) + func (nps NetworkEndpoints) ChainIDByShortName(shortName string) (uint64, bool) + func (nps NetworkEndpoints) CurrentBlockNumbers(ctx context.Context) (map[uint64]uint64, error) + func (nps NetworkEndpoints) EndpointByChainID(chainID uint64) (*NetworkEndpoint, bool) + func (nps NetworkEndpoints) String() string + func (nps NetworkEndpoints) URIsByChainID(chainID uint64) ([]string, bool) + type Web3ProviderConfig struct + DB *db.Database + Endpoints NetworkEndpoints + type Web3ProviderRef struct + ChainID uint64 + HexAddress string