Versions in this module Expand all Collapse all v0 v0.0.3 Jul 5, 2024 v0.0.2 Jun 10, 2024 Changes in this version + const MysqlConfKeyReorgVersion + type AddressIndexedLog struct + BlockNumber uint64 + ContractID uint64 + Epoch uint64 + Extra []byte + ID uint64 + LogIndex uint64 + Topic0 string + Topic1 string + Topic2 string + Topic3 string + func (AddressIndexedLog) TableName() string + type AddressIndexedLogFilter struct + ContractId uint64 + func (filter *AddressIndexedLogFilter) Find(db *gorm.DB) ([]*AddressIndexedLog, error) + type AddressIndexedLogStore struct + func NewAddressIndexedLogStore(db *gorm.DB, cs *ContractStore, partitions uint32) *AddressIndexedLogStore + func (ls *AddressIndexedLogStore) AddAddressIndexedLogs(dbTx *gorm.DB, data *store.EpochData, bigContractIds map[uint64]bool) error + func (ls *AddressIndexedLogStore) CreatePartitionedTables() (int, error) + func (ls *AddressIndexedLogStore) DeleteAddressIndexedLogs(dbTx *gorm.DB, epochFrom, epochTo uint64) error + func (ls *AddressIndexedLogStore) GetAddressIndexedLogs(filter AddressIndexedLogFilter, contract string) ([]*AddressIndexedLog, error) + func (ls *AddressIndexedLogStore) GetPartitionedTableName(contract string) string + type Config struct + AddressIndexedLogEnabled bool + AddressIndexedLogPartitions uint32 + ConnMaxLifetime time.Duration + Database string + Dsn string + Enabled bool + Host string + MaxBnRangedArchiveLogPartitions uint32 + MaxIdleConns int + MaxOpenConns int + Password string + Username string + func MustNewConfigFromViper() *Config + func MustNewEthStoreConfigFromViper() *Config + func (config *Config) MustOpenOrCreate(option StoreOption) *MysqlStore + type Contract struct + Address string + ID uint64 + LatestUpdatedEpoch uint64 + LogCount int + func (Contract) TableName() string + type ContractStore struct + func NewContractStore(db *gorm.DB, cacheSize ...int) *ContractStore + func (ContractStore) IsRecordNotFound(err error) bool + func (bs ContractStore) Close() error + func (cs *ContractStore) AddContract(contracts map[string]bool) (int, error) + func (cs *ContractStore) AddContractByEpochData(slice ...*store.EpochData) (int, error) + func (cs *ContractStore) AddContractIfAbsent(address string) (uint64, bool, error) + func (cs *ContractStore) GetContractAddressById(id uint64) (string, bool, error) + func (cs *ContractStore) GetContractById(cid uint64) (*Contract, bool, error) + func (cs *ContractStore) GetContractIdByAddress(address string) (uint64, bool, error) + func (cs *ContractStore) GetUpdatedContractsSinceEpoch(epoch uint64) ([]*Contract, error) + func (cs *ContractStore) UpdateContractStats(dbTx *gorm.DB, cid uint64, countDelta int, latestUpdatedEpoch uint64) error + type LogFilter struct + BlockFrom uint64 + BlockTo uint64 + TableName string + Topics []store.VariadicValue + func (filter *LogFilter) Find(db *gorm.DB) ([]int, error) + type MysqlStore struct + func (MysqlStore) IsRecordNotFound(err error) bool + func (bs MysqlStore) Close() error + func (bs MysqlStore) GetBlockByBlockNumber(ctx context.Context, blockNumber uint64) (*store.Block, error) + func (bs MysqlStore) GetBlockByEpoch(ctx context.Context, epochNumber uint64) (*store.Block, error) + func (bs MysqlStore) GetBlockByHash(ctx context.Context, blockHash types.Hash) (*store.Block, error) + func (bs MysqlStore) GetBlockSummaryByBlockNumber(ctx context.Context, blockNumber uint64) (*store.BlockSummary, error) + func (bs MysqlStore) GetBlockSummaryByEpoch(ctx context.Context, epochNumber uint64) (*store.BlockSummary, error) + func (bs MysqlStore) GetBlockSummaryByHash(ctx context.Context, blockHash types.Hash) (*store.BlockSummary, error) + func (bs MysqlStore) GetBlocksByEpoch(ctx context.Context, epochNumber uint64) ([]types.Hash, error) + func (cs MysqlStore) GetReorgVersion() (int, error) + func (cs MysqlStore) LoadConfig(confNames ...string) (map[string]interface{}, error) + func (cs MysqlStore) LoadRateLimitConfigs() *rate.Config + func (cs MysqlStore) StoreConfig(confName string, confVal interface{}) error + func (e2bms MysqlStore) BlockRange(epoch uint64) (citypes.RangeUint64, bool, error) + func (e2bms MysqlStore) MaxEpoch() (uint64, bool, error) + func (e2bms MysqlStore) PivotHash(epoch uint64) (string, bool, error) + func (ms *MysqlStore) GetLogs(ctx context.Context, storeFilter store.LogFilter) ([]*store.Log, error) + func (ms *MysqlStore) Popn(epochUntil uint64) error + func (ms *MysqlStore) Prune() + func (ms *MysqlStore) Push(data *store.EpochData) error + func (ms *MysqlStore) Pushn(dataSlice []*store.EpochData) error + func (ts MysqlStore) GetReceipt(ctx context.Context, txHash types.Hash) (*store.TransactionReceipt, error) + func (ts MysqlStore) GetTransaction(ctx context.Context, txHash types.Hash) (*store.Transaction, error) + type RateLimit struct + CreatedAt time.Time + ID uint32 + LimitKey string + LimitType int + SID uint32 + UpdatedAt time.Time + func (RateLimit) TableName() string + type RateLimitStore struct + func NewRateLimitStore(db *gorm.DB) *RateLimitStore + func (RateLimitStore) IsRecordNotFound(err error) bool + func (bs RateLimitStore) Close() error + func (rls *RateLimitStore) LoadRateLimitKeyset(filter *rate.KeysetFilter) (res []*rate.KeyInfo, err error) + type StoreOption struct + Disabler store.StoreDisabler + type User struct + ApiKey string + Description string + ID uint32 + Name string + NodeUrl string + func (User) TableName() string + type UserStore struct + func (UserStore) IsRecordNotFound(err error) bool + func (bs UserStore) Close() error + func (us *UserStore) GetUserByKey(key string) (*User, bool, error)