Skip to content

Commit

Permalink
Create Arbitrum/Optimism watchers in backfiller
Browse files Browse the repository at this point in the history
  • Loading branch information
Agustin Godnic committed Jul 25, 2023
1 parent f706369 commit cc7bb90
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions contract-watcher/cmd/backfiller/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func newWatcherForMainnet(cfg *config.BackfillerConfiguration, repo *storage.Rep
watcher = builder.CreateMoonbeamWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.MOONBEAM_MAINNET, logger, repo, metrics)
case config.CELO_MAINNET.ChainID.String():
watcher = builder.CreateCeloWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.CELO_MAINNET, logger, repo, metrics)
case config.ARBITRUM_MAINNET.ChainID.String():
watcher = builder.CreateArbitrumWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.ARBITRUM_MAINNET, logger, repo, metrics)
case config.OPTIMISM_MAINNET.ChainID.String():
watcher = builder.CreateOptimismWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.OPTIMISM_MAINNET, logger, repo, metrics)
default:
logger.Fatal("chain not supported")
}
Expand Down Expand Up @@ -119,6 +123,11 @@ func newWatcherForTestnet(cfg *config.BackfillerConfiguration, repo *storage.Rep
watcher = builder.CreateMoonbeamWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.MOONBEAM_TESTNET, logger, repo, metrics)
case config.CELO_TESTNET.ChainID.String():
watcher = builder.CreateCeloWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.CELO_TESTNET, logger, repo, metrics)
case config.ARBITRUM_TESTNET.ChainID.String():
watcher = builder.CreateArbitrumWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.ARBITRUM_TESTNET, logger, repo, metrics)
case config.OPTIMISM_TESTNET.ChainID.String():
watcher = builder.CreateOptimismWatcher(cfg.RateLimitPerSecond, cfg.ChainUrl, config.OPTIMISM_TESTNET, logger, repo, metrics)

default:
logger.Fatal("chain not supported")
}
Expand Down

0 comments on commit cc7bb90

Please sign in to comment.