* breaking: use event router, adsd telegram notifier, update indexer schema * fix: early ack on handler not found * fix: jetstream switch to new API, discard buffer on close * remove telegram dependency, rely on log alters instead, which indirectly connect to telegram via uptrace * feat (breaking): switch to self contained auto bootstrapper
44 lines
962 B
Go
44 lines
962 B
Go
package main
|
|
|
|
import (
|
|
"github.com/grassrootseconomics/eth-indexer/internal/handler"
|
|
"github.com/grassrootseconomics/eth-indexer/pkg/router"
|
|
)
|
|
|
|
func bootstrapRouter(handlerContainer *handler.Handler) *router.Router {
|
|
router := router.New(lo)
|
|
|
|
router.RegisterRoute(
|
|
"TRACKER.TOKEN_TRANSFER",
|
|
handlerContainer.IndexTransfer,
|
|
handlerContainer.AddToken,
|
|
)
|
|
router.RegisterRoute(
|
|
"TRACKER.TOKEN_MINT",
|
|
handlerContainer.IndexTokenMint,
|
|
handlerContainer.AddToken,
|
|
)
|
|
router.RegisterRoute(
|
|
"TRACKER.TOKEN_BURN",
|
|
handlerContainer.IndexTokenMint,
|
|
handlerContainer.AddToken,
|
|
)
|
|
router.RegisterRoute(
|
|
"TRACKER.POOL_SWAP",
|
|
handlerContainer.IndexPoolSwap,
|
|
handlerContainer.AddPool,
|
|
)
|
|
router.RegisterRoute(
|
|
"TRACKER.POOL_DEPOSIT",
|
|
handlerContainer.IndexPoolDeposit,
|
|
handlerContainer.AddPool,
|
|
)
|
|
router.RegisterRoute(
|
|
"TRACKER.FAUCET_GIVE",
|
|
handlerContainer.IndexFaucetGive,
|
|
handlerContainer.FaucetHealthCheck,
|
|
)
|
|
|
|
return router
|
|
}
|