repo

package
v0.3.1-0...-ee1233d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

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(db eventindexer.DB) (*AccountRepository, error)

func (*AccountRepository) Save

func (r *AccountRepository) Save(
	ctx context.Context,
	address common.Address,
	transactedAt time.Time,
) error

type BlockRepository

type BlockRepository struct {
	// contains filtered or unexported fields
}

func NewBlockRepository

func NewBlockRepository(db eventindexer.DB) (*BlockRepository, error)

func (*BlockRepository) Save

func (r *BlockRepository) Save(
	ctx context.Context,
	block *types.Block,
	chainID *big.Int,
) error

type ChartRepository

type ChartRepository struct {
	// contains filtered or unexported fields
}

func NewChartRepository

func NewChartRepository(db eventindexer.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 EventRepository

type EventRepository struct {
	// contains filtered or unexported fields
}

func NewEventRepository

func NewEventRepository(db eventindexer.DB) (*EventRepository, error)

func (*EventRepository) Delete

func (r *EventRepository) Delete(
	ctx context.Context,
	id int,
) error

func (*EventRepository) FindByEventTypeAndBlockID

func (r *EventRepository) FindByEventTypeAndBlockID(
	ctx context.Context,
	eventType string,
	blockID int64) (*eventindexer.Event, error)

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 (r *EventRepository) GetAssignedBlocksByProverAddress(
	ctx context.Context,
	req *http.Request,
	address string,
) (paginate.Page, error)

func (*EventRepository) GetByAddressAndEventName

func (r *EventRepository) GetByAddressAndEventName(
	ctx context.Context,
	req *http.Request,
	address string,
	event string,
) (paginate.Page, error)

func (*EventRepository) GetCountByAddressAndEventName

func (r *EventRepository) GetCountByAddressAndEventName(
	ctx context.Context,
	address string,
	event string,
) (int, error)

func (*EventRepository) Save

type NFTBalanceRepository

type NFTBalanceRepository struct {
	// contains filtered or unexported fields
}

func NewNFTBalanceRepository

func NewNFTBalanceRepository(db eventindexer.DB) (*NFTBalanceRepository, error)

func (*NFTBalanceRepository) FindByAddress

func (r *NFTBalanceRepository) FindByAddress(ctx context.Context,
	req *http.Request,
	address string,
	chainID string,
) (paginate.Page, error)

func (*NFTBalanceRepository) IncreaseBalance

func (*NFTBalanceRepository) SubtractBalance

type ProcessedBlockRepository

type ProcessedBlockRepository struct {
	// contains filtered or unexported fields
}

func NewProcessedBlockRepository

func NewProcessedBlockRepository(db eventindexer.DB) (*ProcessedBlockRepository, error)

func (*ProcessedBlockRepository) GetLatestBlockProcessed

func (r *ProcessedBlockRepository) GetLatestBlockProcessed(chainID *big.Int) (*eventindexer.ProcessedBlock, error)

func (*ProcessedBlockRepository) Save

type StatRepository

type StatRepository struct {
	// contains filtered or unexported fields
}

func NewStatRepository

func NewStatRepository(db eventindexer.DB) (*StatRepository, error)

func (*StatRepository) Find

func (r *StatRepository) Find(
	ctx context.Context,
	statType string,
	feeTokenAddress *string,
) (*eventindexer.Stat, error)

func (*StatRepository) FindAll

func (r *StatRepository) FindAll(
	ctx context.Context,
) ([]*eventindexer.Stat, error)

FindAll finds each type of unique stat and merges them together

func (*StatRepository) Save

type TransactionRepository

type TransactionRepository struct {
	// contains filtered or unexported fields
}

func NewTransactionRepository

func NewTransactionRepository(db eventindexer.DB) (*TransactionRepository, error)

func (*TransactionRepository) Save

func (r *TransactionRepository) Save(
	ctx context.Context,
	tx *types.Transaction,
	sender common.Address,
	blockID *big.Int,
	transactedAt time.Time,
	contractAddress common.Address,
) error

Jump to

Keyboard shortcuts

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