Skip to content

Commit

Permalink
Add support for Base in the tx-tracker service
Browse files Browse the repository at this point in the history
  • Loading branch information
Agustin Godnic committed Jul 20, 2023
1 parent 3e5001e commit 65bf66c
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deploy/tx-tracker-backfiller/env/production.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=1
AVALANCHE_BASE_URL=https://api.avax.network/ext/bc/C/rpc
AVALANCHE_REQUESTS_PER_MINUTE=2

BASE_BASE_URL=https://base-mainnet.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=1

BSC_BASE_URL=https://bsc-dataseed2.defibit.io
BSC_REQUESTS_PER_MINUTE=2

Expand Down
3 changes: 3 additions & 0 deletions deploy/tx-tracker-backfiller/env/staging.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=1
AVALANCHE_BASE_URL=https://api.avax.network/ext/bc/C/rpc
AVALANCHE_REQUESTS_PER_MINUTE=1

BASE_BASE_URL=https://base-mainnet.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=1

BSC_BASE_URL=https://bsc-dataseed2.defibit.io
BSC_REQUESTS_PER_MINUTE=1

Expand Down
3 changes: 3 additions & 0 deletions deploy/tx-tracker-backfiller/env/test.env
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=2
AVALANCHE_BASE_URL=https://rpc.ankr.com/avalanche_fuji
AVALANCHE_REQUESTS_PER_MINUTE=2

BASE_BASE_URL=https://base-goerli.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=1

BSC_BASE_URL=https://data-seed-prebsc-1-s1.binance.org:8545
BSC_REQUESTS_PER_MINUTE=2

Expand Down
3 changes: 3 additions & 0 deletions deploy/tx-tracker/env/production.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=12
AVALANCHE_BASE_URL=https://api.avax.network/ext/bc/C/rpc
AVALANCHE_REQUESTS_PER_MINUTE=12

BASE_BASE_URL=https://base-mainnet.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=12

BSC_BASE_URL=https://bsc-dataseed2.defibit.io
BSC_REQUESTS_PER_MINUTE=12

Expand Down
3 changes: 3 additions & 0 deletions deploy/tx-tracker/env/staging.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=12
AVALANCHE_BASE_URL=https://api.avax.network/ext/bc/C/rpc
AVALANCHE_REQUESTS_PER_MINUTE=12

BASE_BASE_URL=https://base-mainnet.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=12

BSC_BASE_URL=https://bsc-dataseed2.defibit.io
BSC_REQUESTS_PER_MINUTE=12

Expand Down
3 changes: 3 additions & 0 deletions deploy/tx-tracker/env/test.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ ARBITRUM_REQUESTS_PER_MINUTE=12
AVALANCHE_BASE_URL=https://rpc.ankr.com/avalanche_fuji
AVALANCHE_REQUESTS_PER_MINUTE=12

BASE_BASE_URL=https://base-goerli.public.blastapi.io
BASE_REQUESTS_PER_MINUTE=12

BSC_BASE_URL=https://data-seed-prebsc-1-s1.binance.org:8545
BSC_REQUESTS_PER_MINUTE=12

Expand Down
3 changes: 3 additions & 0 deletions tx-tracker/chains/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func Initialize(cfg *config.RpcProviderSettings) {
rateLimitersByChain[sdk.ChainIDAlgorand] = convertToRateLimiter(cfg.AlgorandRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDAptos] = convertToRateLimiter(cfg.AptosRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDAvalanche] = convertToRateLimiter(cfg.AvalancheRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDBase] = convertToRateLimiter(cfg.BaseRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDBSC] = convertToRateLimiter(cfg.BscRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDCelo] = convertToRateLimiter(cfg.CeloRequestsPerMinute)
rateLimitersByChain[sdk.ChainIDEthereum] = convertToRateLimiter(cfg.EthereumRequestsPerMinute)
Expand All @@ -74,6 +75,7 @@ func Initialize(cfg *config.RpcProviderSettings) {
baseUrlsByChain[sdk.ChainIDAlgorand] = cfg.AlgorandBaseUrl
baseUrlsByChain[sdk.ChainIDAptos] = cfg.AptosBaseUrl
baseUrlsByChain[sdk.ChainIDAvalanche] = cfg.AvalancheBaseUrl
baseUrlsByChain[sdk.ChainIDBase] = cfg.BaseBaseUrl
baseUrlsByChain[sdk.ChainIDBSC] = cfg.BscBaseUrl
baseUrlsByChain[sdk.ChainIDCelo] = cfg.CeloBaseUrl
baseUrlsByChain[sdk.ChainIDEthereum] = cfg.EthereumBaseUrl
Expand Down Expand Up @@ -118,6 +120,7 @@ func FetchTx(
case sdk.ChainIDAcala,
sdk.ChainIDArbitrum,
sdk.ChainIDAvalanche,
sdk.ChainIDBase,
sdk.ChainIDBSC,
sdk.ChainIDCelo,
sdk.ChainIDEthereum,
Expand Down
2 changes: 2 additions & 0 deletions tx-tracker/config/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type RpcProviderSettings struct {
ArbitrumRequestsPerMinute uint16 `split_words:"true" required:"true"`
AvalancheBaseUrl string `split_words:"true" required:"true"`
AvalancheRequestsPerMinute uint16 `split_words:"true" required:"true"`
BaseBaseUrl string `split_words:"true" required:"true"`
BaseRequestsPerMinute uint16 `split_words:"true" required:"true"`
BscBaseUrl string `split_words:"true" required:"true"`
BscRequestsPerMinute uint16 `split_words:"true" required:"true"`
CeloBaseUrl string `split_words:"true" required:"true"`
Expand Down

0 comments on commit 65bf66c

Please sign in to comment.