Documentation ¶
Index ¶
- Variables
- type AccountRepository
- type ChartRepository
- type ERC20BalanceRepository
- func (r *ERC20BalanceRepository) CreateMetadata(ctx context.Context, chainID int64, contractAddress string, symbol string, ...) (int, error)
- func (r *ERC20BalanceRepository) FindByAddress(ctx context.Context, req *http.Request, address string, chainID string) (paginate.Page, error)
- func (r *ERC20BalanceRepository) FindMetadata(ctx context.Context, chainID int64, contractAddress string) (*eventindexer.ERC20Metadata, error)
- func (r *ERC20BalanceRepository) IncreaseAndDecreaseBalancesInTx(ctx context.Context, increaseOpts eventindexer.UpdateERC20BalanceOpts, ...) (increasedBalance *eventindexer.ERC20Balance, ...)
- type EventRepository
- func (r *EventRepository) Delete(ctx context.Context, id int) error
- func (r *EventRepository) DeleteAllAfterBlockID(ctx context.Context, blockID uint64, srcChainID uint64) error
- func (r *EventRepository) FindByEventTypeAndBlockID(ctx context.Context, eventType string, blockID int64) (*eventindexer.Event, error)
- func (r *EventRepository) FindLatestBlockID(ctx context.Context, srcChainID uint64) (uint64, error)
- func (r *EventRepository) FindUniqueProposers(ctx context.Context) ([]eventindexer.UniqueProposersResponse, error)
- func (r *EventRepository) FindUniqueProvers(ctx context.Context) ([]eventindexer.UniqueProversResponse, error)
- func (r *EventRepository) FirstByAddressAndEventName(ctx context.Context, address string, event string) (*eventindexer.Event, error)
- func (r *EventRepository) GetAssignedBlocksByProverAddress(ctx context.Context, req *http.Request, address string) (paginate.Page, error)
- func (r *EventRepository) GetBlockProposedBy(ctx context.Context, blockID int) (*eventindexer.Event, error)
- func (r *EventRepository) GetBlockProvenBy(ctx context.Context, blockID int) ([]*eventindexer.Event, error)
- func (r *EventRepository) GetByAddressAndEventName(ctx context.Context, req *http.Request, address string, event string) (paginate.Page, error)
- func (r *EventRepository) GetCountByAddressAndEventName(ctx context.Context, address string, event string) (int, error)
- func (r *EventRepository) Save(ctx context.Context, opts eventindexer.SaveEventOpts) (*eventindexer.Event, error)
- type NFTBalanceRepository
- func (r *NFTBalanceRepository) FindByAddress(ctx context.Context, req *http.Request, address string, chainID string) (paginate.Page, error)
- func (r *NFTBalanceRepository) IncreaseAndDecreaseBalancesInTx(ctx context.Context, increaseOpts eventindexer.UpdateNFTBalanceOpts, ...) (increasedBalance *eventindexer.NFTBalance, ...)
- type TransactionRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
)
Functions ¶
This section is empty.
Types ¶
type AccountRepository ¶
type AccountRepository struct {
// contains filtered or unexported fields
}
func NewAccountRepository ¶
func NewAccountRepository(dbHandler db.DB) (*AccountRepository, error)
type ChartRepository ¶
type ChartRepository struct {
// contains filtered or unexported fields
}
func NewChartRepository ¶
func NewChartRepository(dbHandler db.DB) (*ChartRepository, error)
func (*ChartRepository) Find ¶
func (r *ChartRepository) Find( ctx context.Context, task string, start string, end string, feeTokenAddress string, tier string, ) (*eventindexer.ChartResponse, error)
type ERC20BalanceRepository ¶
type ERC20BalanceRepository struct {
// contains filtered or unexported fields
}
func NewERC20BalanceRepository ¶
func NewERC20BalanceRepository(dbHandler db.DB) (*ERC20BalanceRepository, error)
func (*ERC20BalanceRepository) CreateMetadata ¶
func (*ERC20BalanceRepository) FindByAddress ¶
func (*ERC20BalanceRepository) FindMetadata ¶
func (r *ERC20BalanceRepository) FindMetadata( ctx context.Context, chainID int64, contractAddress string, ) (*eventindexer.ERC20Metadata, error)
func (*ERC20BalanceRepository) IncreaseAndDecreaseBalancesInTx ¶
func (r *ERC20BalanceRepository) IncreaseAndDecreaseBalancesInTx( ctx context.Context, increaseOpts eventindexer.UpdateERC20BalanceOpts, decreaseOpts eventindexer.UpdateERC20BalanceOpts, ) (increasedBalance *eventindexer.ERC20Balance, decreasedBalance *eventindexer.ERC20Balance, err error)
type EventRepository ¶
type EventRepository struct {
// contains filtered or unexported fields
}
func NewEventRepository ¶
func NewEventRepository(dbHandler db.DB) (*EventRepository, error)
func (*EventRepository) Delete ¶
func (r *EventRepository) Delete( ctx context.Context, id int, ) error
func (*EventRepository) DeleteAllAfterBlockID ¶
func (r *EventRepository) DeleteAllAfterBlockID(ctx context.Context, blockID uint64, srcChainID uint64) error
DeleteAllAfterBlockID is used when a reorg is detected
func (*EventRepository) FindByEventTypeAndBlockID ¶
func (r *EventRepository) FindByEventTypeAndBlockID( ctx context.Context, eventType string, blockID int64) (*eventindexer.Event, error)
func (*EventRepository) FindLatestBlockID ¶
func (r *EventRepository) FindLatestBlockID( ctx context.Context, srcChainID uint64, ) (uint64, error)
GetLatestBlockID get latest block id
func (*EventRepository) FindUniqueProposers ¶
func (r *EventRepository) FindUniqueProposers( ctx context.Context, ) ([]eventindexer.UniqueProposersResponse, error)
func (*EventRepository) FindUniqueProvers ¶
func (r *EventRepository) FindUniqueProvers( ctx context.Context, ) ([]eventindexer.UniqueProversResponse, error)
func (*EventRepository) FirstByAddressAndEventName ¶
func (r *EventRepository) FirstByAddressAndEventName( ctx context.Context, address string, event string, ) (*eventindexer.Event, error)
func (*EventRepository) GetAssignedBlocksByProverAddress ¶
func (*EventRepository) GetBlockProposedBy ¶
func (r *EventRepository) GetBlockProposedBy(ctx context.Context, blockID int) (*eventindexer.Event, error)
func (*EventRepository) GetBlockProvenBy ¶
func (r *EventRepository) GetBlockProvenBy(ctx context.Context, blockID int) ([]*eventindexer.Event, error)
func (*EventRepository) GetByAddressAndEventName ¶
func (*EventRepository) GetCountByAddressAndEventName ¶
func (*EventRepository) Save ¶
func (r *EventRepository) Save(ctx context.Context, opts eventindexer.SaveEventOpts) (*eventindexer.Event, error)
type NFTBalanceRepository ¶
type NFTBalanceRepository struct {
// contains filtered or unexported fields
}
func NewNFTBalanceRepository ¶
func NewNFTBalanceRepository(dbHandler db.DB) (*NFTBalanceRepository, error)
func (*NFTBalanceRepository) FindByAddress ¶
func (*NFTBalanceRepository) IncreaseAndDecreaseBalancesInTx ¶
func (r *NFTBalanceRepository) IncreaseAndDecreaseBalancesInTx( ctx context.Context, increaseOpts eventindexer.UpdateNFTBalanceOpts, decreaseOpts eventindexer.UpdateNFTBalanceOpts, ) (increasedBalance *eventindexer.NFTBalance, decreasedBalance *eventindexer.NFTBalance, err error)
type TransactionRepository ¶
type TransactionRepository struct {
// contains filtered or unexported fields
}
func NewTransactionRepository ¶
func NewTransactionRepository(dbHandler db.DB) (*TransactionRepository, error)
Click to show internal directories.
Click to hide internal directories.