Documentation ¶
Index ¶
- func GetBlockTimestampsParallel(ctx context.Context, client blockchain.EthClient, ...) (map[uint64]uint64, error)
- func GetEvoEvents(tx state.Tx, contract string, blockTime uint64) (uint64, []model.MintedWithExternalURI, error)
- func UpdateContract(tx state.Tx, contract string, evoEvents []model.MintedWithExternalURI, ...) error
- type Updater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBlockTimestampsParallel ¶
func GetBlockTimestampsParallel( ctx context.Context, client blockchain.EthClient, startingBlock, lastBlock uint64, ) (map[uint64]uint64, error)
GetBlockTimestampsParallel returns a map of block numbers to timestamps in parallel. This can increase the speed of this code 2-3x TODO we should see if we can get further improvements if instead of making calls in parallel we made one call in a batch for all block numbers in a range. possibly this could execute faster because it is only one request
func GetEvoEvents ¶
func UpdateContract ¶
func UpdateContract(tx state.Tx, contract string, evoEvents []model.MintedWithExternalURI, transferEvents []model.ERC721Transfer, block uint64, evoBlock uint64, ) error
Types ¶
type Updater ¶
type Updater interface { GetModelTransferEvents( ctx context.Context, startingBlock, lastBlock uint64, contracts []string, ) (map[uint64]map[string][]model.ERC721Transfer, error) UpdateState( ctx context.Context, tx state.Tx, contracts []string, newContracts map[common.Address]uint64, modelTransferEvents map[uint64]map[string][]model.ERC721Transfer, startingBlock uint64, lastBlockData model.Block, ) error }
Click to show internal directories.
Click to hide internal directories.