From dad3bfc252bcaeb37dfa22bef1bb147654aec4b8 Mon Sep 17 00:00:00 2001 From: Nicolas Alencar <55406040+nicoalencar@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:59:52 -0300 Subject: [PATCH 1/4] Fix null blocks from RPC --- docker-compose-dev.yml | 7 ++++--- src/data_sources/events/web3.ts | 29 +++++++++++++++++++---------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 296f46e5..db574b77 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -352,9 +352,9 @@ services: SCHEMA: 'events_linea' FEAT_ZEROEX_EXCHANGE_PROXY: "false" SETTLER_DEPLOYMENT_BLOCK: 6917652 - MAX_BLOCKS_TO_SEARCH: 800 - MAX_BLOCKS_TO_PULL: 100 - MAX_BLOCKS_REORG: 500 + MAX_BLOCKS_TO_SEARCH: 125 + MAX_BLOCKS_TO_PULL: 25 + MAX_BLOCKS_REORG: 125 SECONDS_BETWEEN_RUNS: 1 RESCRAPE_BLOCKS: 10 FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" @@ -363,6 +363,7 @@ services: FEAT_ERC20_TRANSFER_ALL: "true" FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" TOKENS_FROM_TRANSFERS_START_BLOCK: "1" + FEAT_SOCKET_BRIDGE_EVENT: "true" SOCKET_BRIDGE_CONTRACT_ADDRESS: "0x3a23f943181408eac424116af7b7790c94cb97a5" SOCKET_BRIDGE_EVENT_START_BLOCK: "6917652" networks: diff --git a/src/data_sources/events/web3.ts b/src/data_sources/events/web3.ts index c51d7418..14316263 100644 --- a/src/data_sources/events/web3.ts +++ b/src/data_sources/events/web3.ts @@ -253,17 +253,26 @@ export class Web3Source { } public async getBlockInfoAsync(blockNumber: number): Promise { - try { - logger.debug(`Fetching block ${blockNumber}`); - - const block = (await this._web3Wrapper.getBlockIfExistsAsync(blockNumber)) as BlockWithoutTransactionData; - - if (block == null) { - throw new Error(`Block ${blockNumber} returned null`); + while (true) { + try { + logger.debug(`Fetching block ${blockNumber}`); + + const block = (await this._web3Wrapper.getBlockIfExistsAsync(blockNumber)) as BlockWithoutTransactionData; + + if (block == null) { + logger.warn(`Block ${blockNumber} returned null, likely because the RPC node is not fully synced. Retrying...`); + await new Promise((resolve) => setTimeout(resolve, 1000)); + continue; + } + return block; + } catch (err) { + if (err instanceof Error) { + logger.error(`Error while fetching block ${blockNumber}: ${err.message}. Retrying...`); + } else { + logger.error(`Unknown error while fetching block ${blockNumber}. Retrying...`); + } + await new Promise((resolve) => setTimeout(resolve, 1000)); } - return block; - } catch (err) { - throw new Error(`Encountered error while fetching block ${blockNumber}: ${err}`); } } From 2230e556de26d6c3510c4708a8dd0dda33c3ca55 Mon Sep 17 00:00:00 2001 From: Nicolas Alencar <55406040+nicoalencar@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:40:11 -0300 Subject: [PATCH 2/4] Add retry constant for RPC --- docker-compose-dev.yml | 701 ++++++++++++++++---------------- src/config.ts | 25 +- src/constants.ts | 1 + src/data_sources/events/web3.ts | 16 +- 4 files changed, 376 insertions(+), 367 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index db574b77..696d763a 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,342 +1,342 @@ version: '3' services: - event-pipeline-ethereum: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' - CHAIN_ID: '1' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events' - # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" - # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - EP_DEPLOYMENT_BLOCK: 10247094 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 1000 - MAX_TX_TO_PULL: 1000 - BLOCK_FINALITY_THRESHOLD: 0 - SECONDS_BETWEEN_RUNS: 1 - # FEAT_TRANSFORMED_ERC20_EVENT: "true" - # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" - # UNISWAP_V2_VIP_SWAP_SOURCES: "UniswapV2,SushiSwap" - # UNISWAP_V2_VIP_SWAP_START_BLOCK: 10917104 - # FEAT_UNISWAP_V3_VIP_SWAP_EVENT: "true" - # UNISWAP_V3_VIP_SWAP_START_BLOCK: 12553659 - # FEAT_UNISWAP_V3_SWAP_EVENT: "true" - # UNISWAP_V3_SWAP_START_BLOCK: 16670838 - # FEAT_LIMIT_ORDERS: "true" - # V4_NATIVE_FILL_START_BLOCK: "11591021" - # FEAT_PLP_SWAP_EVENT: "true" - # PLP_VIP_START_BLOCK: 11377457 - # FEAT_OTC_ORDERS: "true" - # OTC_ORDERS_FEATURE_START_BLOCK: 13143075 - # FEAT_CANCEL_EVENTS: "true" - # FEAT_STAKING: "true" - # STAKING_DEPLOYMENT_BLOCK: 8952581 - # FEAT_RFQ_EVENT: "true" - # FEAT_V3_NATIVE_FILL: "true" - # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - # FLASHWALLET_ADDRESS: "0x22f9dcf4647084d6c31b2765f6910cd85c178c18" - # FLASHWALLET_DEPLOYMENT_BLOCK: 12231666 - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 14258205 - # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" - # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "UniswapV2:0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f:10000835,SushiSwap:0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac:10794229" - # FEAT_UNISWAP_V2_SYNC_EVENT: "true" - # UNISWAP_V2_SYNC_START_BLOCK: 10000835 - # FEAT_ONCHAIN_GOVERNANCE: "true" - # ONCHAIN_GOVERNANCE_START_BLOCK: 16990159 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' + # event-pipeline-ethereum: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' + # CHAIN_ID: '1' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events' + # # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" + # # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # EP_DEPLOYMENT_BLOCK: 10247094 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 1000 + # MAX_TX_TO_PULL: 1000 + # BLOCK_FINALITY_THRESHOLD: 0 + # SECONDS_BETWEEN_RUNS: 1 + # # FEAT_TRANSFORMED_ERC20_EVENT: "true" + # # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" + # # UNISWAP_V2_VIP_SWAP_SOURCES: "UniswapV2,SushiSwap" + # # UNISWAP_V2_VIP_SWAP_START_BLOCK: 10917104 + # # FEAT_UNISWAP_V3_VIP_SWAP_EVENT: "true" + # # UNISWAP_V3_VIP_SWAP_START_BLOCK: 12553659 + # # FEAT_UNISWAP_V3_SWAP_EVENT: "true" + # # UNISWAP_V3_SWAP_START_BLOCK: 16670838 + # # FEAT_LIMIT_ORDERS: "true" + # # V4_NATIVE_FILL_START_BLOCK: "11591021" + # # FEAT_PLP_SWAP_EVENT: "true" + # # PLP_VIP_START_BLOCK: 11377457 + # # FEAT_OTC_ORDERS: "true" + # # OTC_ORDERS_FEATURE_START_BLOCK: 13143075 + # # FEAT_CANCEL_EVENTS: "true" + # # FEAT_STAKING: "true" + # # STAKING_DEPLOYMENT_BLOCK: 8952581 + # # FEAT_RFQ_EVENT: "true" + # # FEAT_V3_NATIVE_FILL: "true" + # # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + # # FLASHWALLET_ADDRESS: "0x22f9dcf4647084d6c31b2765f6910cd85c178c18" + # # FLASHWALLET_DEPLOYMENT_BLOCK: 12231666 + # # FEAT_NFT: "true" + # # NFT_FEATURE_START_BLOCK: 14258205 + # # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" + # # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "UniswapV2:0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f:10000835,SushiSwap:0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac:10794229" + # # FEAT_UNISWAP_V2_SYNC_EVENT: "true" + # # UNISWAP_V2_SYNC_START_BLOCK: 10000835 + # # FEAT_ONCHAIN_GOVERNANCE: "true" + # # ONCHAIN_GOVERNANCE_START_BLOCK: 16990159 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' - event-pipeline-bsc: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_BSC}' - CHAIN_ID: '56' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_bsc' - MAX_BLOCKS_REORG: 50 - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - EP_DEPLOYMENT_BLOCK: 5375047 - MAX_BLOCKS_TO_SEARCH: 2000 - MAX_BLOCKS_TO_PULL: 5000 - SECONDS_BETWEEN_RUNS: 1 - # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" - # UNISWAP_V2_VIP_SWAP_SOURCES: "PancakeSwap,BakerySwap,SushiSwap,CafeSwap,SwapLiquidity,ApeSwapFinance,CheeseSwap,Swap" - # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" - # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "PancakeSwap:0xbcfccbde45ce874adcb698cc183debcf17952812:586851,PancakeSwap!v2:0xca143ce32fe78f1f7019d7d551a6402fc5350c73:6809737,BakerySwap:0x01bf7c66c6bd861915cdaae475042d3c4bae16a7:470617,SushiSwap:0xc35dadb65012ec5796536bd9864ed8773abc74c4:5205069,CafeSwap:0x3e708fdbe3ada63fc94f8f61811196f1302137ad:5865260,SwapLiquidity:0x553990f2cba90272390f62c5bdb1681ffc899675:784352,ApeSwapFinance:0x0841bd0b734e4f5853f0dd8d7ea041c241fb0da6:4855901,CheeseSwap:0xdd538e4fd1b69b7863e1f741213276a6cf1efb3b:1569172" - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 15860129 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c' + # event-pipeline-bsc: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_BSC}' + # CHAIN_ID: '56' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_bsc' + # MAX_BLOCKS_REORG: 50 + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # EP_DEPLOYMENT_BLOCK: 5375047 + # MAX_BLOCKS_TO_SEARCH: 2000 + # MAX_BLOCKS_TO_PULL: 5000 + # SECONDS_BETWEEN_RUNS: 1 + # # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" + # # UNISWAP_V2_VIP_SWAP_SOURCES: "PancakeSwap,BakerySwap,SushiSwap,CafeSwap,SwapLiquidity,ApeSwapFinance,CheeseSwap,Swap" + # # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" + # # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "PancakeSwap:0xbcfccbde45ce874adcb698cc183debcf17952812:586851,PancakeSwap!v2:0xca143ce32fe78f1f7019d7d551a6402fc5350c73:6809737,BakerySwap:0x01bf7c66c6bd861915cdaae475042d3c4bae16a7:470617,SushiSwap:0xc35dadb65012ec5796536bd9864ed8773abc74c4:5205069,CafeSwap:0x3e708fdbe3ada63fc94f8f61811196f1302137ad:5865260,SwapLiquidity:0x553990f2cba90272390f62c5bdb1681ffc899675:784352,ApeSwapFinance:0x0841bd0b734e4f5853f0dd8d7ea041c241fb0da6:4855901,CheeseSwap:0xdd538e4fd1b69b7863e1f741213276a6cf1efb3b:1569172" + # # FEAT_NFT: "true" + # # NFT_FEATURE_START_BLOCK: 15860129 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c' - event-pipeline-polygon: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_POLYGON}' - CHAIN_ID: '137' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_polygon' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - ENABLE_PROMETHEUS_METRICS: "true" - EP_DEPLOYMENT_BLOCK: 14391480 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 1000 - MINUTES_BETWEEN_RUNS: 1 - # FEAT_SLINGSHOT_TRADE_EVENT: "true" - # SLINGSHOT_DEPLOYMENT_BLOCK: 14500000 - # FEAT_LIMIT_ORDERS: "true" - # V4_NATIVE_FILL_START_BLOCK: "17587182" - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 25697854 - # FEAT_OTC_ORDERS: "true" - # OTC_ORDERS_FEATURE_START_BLOCK: 26479109 - # FEAT_META_TRANSACTION_EXECUTED_EVENT: "true" - # META_TRANSACTION_EXECUTED_START_BLOCK: 39406300 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' + # event-pipeline-polygon: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_POLYGON}' + # CHAIN_ID: '137' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_polygon' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # ENABLE_PROMETHEUS_METRICS: "true" + # EP_DEPLOYMENT_BLOCK: 14391480 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 1000 + # MINUTES_BETWEEN_RUNS: 1 + # # FEAT_SLINGSHOT_TRADE_EVENT: "true" + # # SLINGSHOT_DEPLOYMENT_BLOCK: 14500000 + # # FEAT_LIMIT_ORDERS: "true" + # # V4_NATIVE_FILL_START_BLOCK: "17587182" + # # FEAT_NFT: "true" + # # NFT_FEATURE_START_BLOCK: 25697854 + # # FEAT_OTC_ORDERS: "true" + # # OTC_ORDERS_FEATURE_START_BLOCK: 26479109 + # # FEAT_META_TRANSACTION_EXECUTED_EVENT: "true" + # # META_TRANSACTION_EXECUTED_START_BLOCK: 39406300 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' - event-pipeline-avalanche: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_AVALANCHE}' - CHAIN_ID: '43114' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_avalanche' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - ENABLE_PROMETHEUS_METRICS: "true" - EP_DEPLOYMENT_BLOCK: 3601700 - MAX_BLOCKS_TO_SEARCH: 5000 - MAX_BLOCKS_TO_PULL: 2000 - MINUTES_BETWEEN_RUNS: 1 - FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - FLASHWALLET_ADDRESS: "0xdb6f1920a889355780af7570773609bd8cb1f498" - FLASHWALLET_DEPLOYMENT_BLOCK: 11805869 - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 11816835 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' + # event-pipeline-avalanche: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_AVALANCHE}' + # CHAIN_ID: '43114' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_avalanche' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # ENABLE_PROMETHEUS_METRICS: "true" + # EP_DEPLOYMENT_BLOCK: 3601700 + # MAX_BLOCKS_TO_SEARCH: 5000 + # MAX_BLOCKS_TO_PULL: 2000 + # MINUTES_BETWEEN_RUNS: 1 + # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + # FLASHWALLET_ADDRESS: "0xdb6f1920a889355780af7570773609bd8cb1f498" + # FLASHWALLET_DEPLOYMENT_BLOCK: 11805869 + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 11816835 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' - event-pipeline-fantom: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_FANTOM}' - CHAIN_ID: '250' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_fantom' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - EP_ADDRESS: "0xDEF189DeAEF76E379df891899eb5A00a94cBC250" - ENABLE_PROMETHEUS_METRICS: "true" - EP_DEPLOYMENT_BLOCK: 18855765 - MAX_BLOCKS_TO_SEARCH: 2000 - MAX_BLOCKS_TO_PULL: 1000 - SECONDS_BETWEEN_RUNS: 60 - FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - FLASHWALLET_ADDRESS: "0xb4d961671cadfed687e040b076eee29840c142e5" - FLASHWALLET_DEPLOYMENT_BLOCK: 18855797 - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 32817445 - FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83' + # event-pipeline-fantom: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_FANTOM}' + # CHAIN_ID: '250' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_fantom' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # EP_ADDRESS: "0xDEF189DeAEF76E379df891899eb5A00a94cBC250" + # ENABLE_PROMETHEUS_METRICS: "true" + # EP_DEPLOYMENT_BLOCK: 18855765 + # MAX_BLOCKS_TO_SEARCH: 2000 + # MAX_BLOCKS_TO_PULL: 1000 + # SECONDS_BETWEEN_RUNS: 60 + # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + # FLASHWALLET_ADDRESS: "0xb4d961671cadfed687e040b076eee29840c142e5" + # FLASHWALLET_DEPLOYMENT_BLOCK: 18855797 + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 32817445 + # FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83' - event-pipeline-celo: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_CELO}' - CHAIN_ID: '42220' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_celo' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - ENABLE_PROMETHEUS_METRICS: "true" - EP_DEPLOYMENT_BLOCK: 9350111 - MAX_BLOCKS_TO_SEARCH: 5000 - MAX_BLOCKS_TO_PULL: 2000 - MINUTES_BETWEEN_RUNS: 1 - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 11820000 + # event-pipeline-celo: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_CELO}' + # CHAIN_ID: '42220' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_celo' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # ENABLE_PROMETHEUS_METRICS: "true" + # EP_DEPLOYMENT_BLOCK: 9350111 + # MAX_BLOCKS_TO_SEARCH: 5000 + # MAX_BLOCKS_TO_PULL: 2000 + # MINUTES_BETWEEN_RUNS: 1 + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 11820000 - event-pipeline-optimism: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_OPTIMISM}' - CHAIN_ID: '10' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_optimism' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - EP_DEPLOYMENT_BLOCK: 1691335 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 1000 - SECONDS_BETWEEN_RUNS: 30 - EP_ADDRESS: "0xdef1abe32c034e558cdd535791643c58a13acc10" - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 4214981 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: "0x4200000000000000000000000000000000000006" + # event-pipeline-optimism: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_OPTIMISM}' + # CHAIN_ID: '10' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_optimism' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # EP_DEPLOYMENT_BLOCK: 1691335 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 1000 + # SECONDS_BETWEEN_RUNS: 30 + # EP_ADDRESS: "0xdef1abe32c034e558cdd535791643c58a13acc10" + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 4214981 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: "0x4200000000000000000000000000000000000006" - event-pipeline-arbitrum: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_ARBITRUM}' - CHAIN_ID: '42161' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_arbitrum' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - EP_DEPLOYMENT_BLOCK: 4050733 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 1000 - SECONDS_BETWEEN_RUNS: 30 - EP_ADDRESS: "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 4050733 - FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' + # event-pipeline-arbitrum: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_ARBITRUM}' + # CHAIN_ID: '42161' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_arbitrum' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # EP_DEPLOYMENT_BLOCK: 4050733 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 1000 + # SECONDS_BETWEEN_RUNS: 30 + # EP_ADDRESS: "0xdef1c0ded9bec7f1a1670819833240f027b25eff" + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 4050733 + # FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' - event-pipeline-base: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_BASE}' - CHAIN_ID: '8453' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events_base' - EP_DEPLOYMENT_BLOCK: 1410394 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 100 - SECONDS_BETWEEN_RUNS: 1 - FEAT_NFT: "true" - NFT_FEATURE_START_BLOCK: 1410394 - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4200000000000000000000000000000000000006' + # event-pipeline-base: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_BASE}' + # CHAIN_ID: '8453' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events_base' + # EP_DEPLOYMENT_BLOCK: 1410394 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 100 + # SECONDS_BETWEEN_RUNS: 1 + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 1410394 + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4200000000000000000000000000000000000006' - event-pipeline-scroll: - build: - context: . - dockerfile: Dockerfile.dev - platform: linux/amd64 - restart: always - environment: - SCRAPER_MODE: 'BLOCKS' - EVM_RPC_URL: '${RPC_URL_SCROLL}' - CHAIN_ID: '534352' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' - SCHEMA: 'events_scroll' - FEAT_ZEROEX_EXCHANGE_PROXY: "false" - SETTLER_DEPLOYMENT_BLOCK: 7474150 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 100 - SECONDS_BETWEEN_RUNS: 1 - RESCRAPE_BLOCKS: 10 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x5300000000000000000000000000000000000004' - FEAT_TOKENS_FROM_TRANSFERS: "true" - FEAT_ERC20_TRANSFER_ALL: "true" - FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" - FEAT_SETTLER_RFQ_ORDER_EVENT: "true" - networks: - - 0x-data-migrations_default + # event-pipeline-scroll: + # build: + # context: . + # dockerfile: Dockerfile.dev + # platform: linux/amd64 + # restart: always + # environment: + # SCRAPER_MODE: 'BLOCKS' + # EVM_RPC_URL: '${RPC_URL_SCROLL}' + # CHAIN_ID: '534352' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' + # SCHEMA: 'events_scroll' + # FEAT_ZEROEX_EXCHANGE_PROXY: "false" + # SETTLER_DEPLOYMENT_BLOCK: 7474150 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 100 + # SECONDS_BETWEEN_RUNS: 1 + # RESCRAPE_BLOCKS: 10 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x5300000000000000000000000000000000000004' + # FEAT_TOKENS_FROM_TRANSFERS: "true" + # FEAT_ERC20_TRANSFER_ALL: "true" + # FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" + # FEAT_SETTLER_RFQ_ORDER_EVENT: "true" + # networks: + # - 0x-data-migrations_default - event-pipeline-blast: - build: - context: . - dockerfile: Dockerfile.dev - platform: linux/amd64 - restart: always - environment: - SCRAPER_MODE: 'EVENTS' - EVM_RPC_URL: '${RPC_URL_BLAST}' - CHAIN_ID: '81457' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' - SCHEMA: 'events_blast' - FEAT_ZEROEX_EXCHANGE_PROXY: "false" - SETTLER_DEPLOYMENT_BLOCK: 6124420 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 100 - SECONDS_BETWEEN_RUNS: 1 - RESCRAPE_BLOCKS: 10 - FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4300000000000000000000000000000000000004' - FEAT_TOKENS_FROM_TRANSFERS: "true" - FEAT_ERC20_TRANSFER_ALL: "true" - FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" - TOKENS_FROM_TRANSFERS_START_BLOCK: "1" - SOCKET_BRIDGE_CONTRACT_ADDRESS: "0x3a23f943181408eac424116af7b7790c94cb97a5" - SOCKET_BRIDGE_EVENT_START_BLOCK: "6124420" - networks: - - 0x-data-migrations_default + # event-pipeline-blast: + # build: + # context: . + # dockerfile: Dockerfile.dev + # platform: linux/amd64 + # restart: always + # environment: + # SCRAPER_MODE: 'EVENTS' + # EVM_RPC_URL: '${RPC_URL_BLAST}' + # CHAIN_ID: '81457' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' + # SCHEMA: 'events_blast' + # FEAT_ZEROEX_EXCHANGE_PROXY: "false" + # SETTLER_DEPLOYMENT_BLOCK: 6124420 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 100 + # SECONDS_BETWEEN_RUNS: 1 + # RESCRAPE_BLOCKS: 10 + # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4300000000000000000000000000000000000004' + # FEAT_TOKENS_FROM_TRANSFERS: "true" + # FEAT_ERC20_TRANSFER_ALL: "true" + # FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" + # TOKENS_FROM_TRANSFERS_START_BLOCK: "1" + # SOCKET_BRIDGE_CONTRACT_ADDRESS: "0x3a23f943181408eac424116af7b7790c94cb97a5" + # SOCKET_BRIDGE_EVENT_START_BLOCK: "6124420" + # networks: + # - 0x-data-migrations_default event-pipeline-linea: build: @@ -368,31 +368,30 @@ services: SOCKET_BRIDGE_EVENT_START_BLOCK: "6917652" networks: - 0x-data-migrations_default - - token-scraper-ethereum: - depends_on: - - postgres - build: - context: . - dockerfile: Dockerfile.dev - restart: always - environment: - ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' - CHAIN_ID: '1' - POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - SCHEMA: 'events' - KAFKA_BROKERS: '${KAFKA_BROKERS}' - KAFKA_SSL: '${KAFKA_SSL}' - KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - LOG_LEVEL: "info" - FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" - TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 - EP_DEPLOYMENT_BLOCK: 10247094 - MAX_BLOCKS_TO_SEARCH: 1000 - MAX_BLOCKS_TO_PULL: 1000 - MAX_TX_TO_PULL: 1000 - SECONDS_BETWEEN_RUNS: 5 + # token-scraper-ethereum: + # depends_on: + # - postgres + # build: + # context: . + # dockerfile: Dockerfile.dev + # restart: always + # environment: + # ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' + # CHAIN_ID: '1' + # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + # SCHEMA: 'events' + # KAFKA_BROKERS: '${KAFKA_BROKERS}' + # KAFKA_SSL: '${KAFKA_SSL}' + # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + # LOG_LEVEL: "info" + # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" + # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 + # EP_DEPLOYMENT_BLOCK: 10247094 + # MAX_BLOCKS_TO_SEARCH: 1000 + # MAX_BLOCKS_TO_PULL: 1000 + # MAX_TX_TO_PULL: 1000 + # SECONDS_BETWEEN_RUNS: 5 networks: 0x-data-migrations_default: diff --git a/src/config.ts b/src/config.ts index f198c5b3..7a50bd01 100644 --- a/src/config.ts +++ b/src/config.ts @@ -36,6 +36,7 @@ import { DEFAULT_MAX_BLOCKS_REORG, DEFAULT_MAX_BLOCKS_TO_PULL, DEFAULT_MAX_BLOCKS_TO_SEARCH, + DEFAULT_MAX_RPC_RETRY_CALLS, DEFAULT_MAX_TIME_TO_SEARCH, DEFAULT_MAX_TX_TO_PULL, DEFAULT_METRICS_PATH, @@ -141,10 +142,10 @@ export const SCRAPER_MODE: ScraperMode = process.env.SCRAPER_MODE === undefined ? DEFAULT_SCRAPER_MODE : process.env.SCRAPER_MODE === 'BLOCKS' - ? 'BLOCKS' - : process.env.SCRAPER_MODE === 'EVENTS' - ? 'EVENTS' - : throwError('Wrong SCRAPER_MODE'); + ? 'BLOCKS' + : process.env.SCRAPER_MODE === 'EVENTS' + ? 'EVENTS' + : throwError('Wrong SCRAPER_MODE'); export const METRICS_PATH = process.env.METRICS_PATH || DEFAULT_METRICS_PATH; export const PROMETHEUS_PORT = getIntConfig('PROMETHEUS_PORT', DEFAULT_PROMETHEUS_PORT); @@ -157,6 +158,8 @@ export const MAX_BLOCKS_TO_SEARCH = getIntConfig('MAX_BLOCKS_TO_SEARCH', DEFAULT export const MAX_TX_TO_PULL = getIntConfig('MAX_TX_TO_PULL', DEFAULT_MAX_TX_TO_PULL); +export const MAX_RPC_RETRY_CALLS = getIntConfig('MAX_RPC_RETRY_CALLS', DEFAULT_MAX_RPC_RETRY_CALLS); + export const CHAIN_ID = process.env.CHAIN_ID ? parseInt(process.env.CHAIN_ID, 10) : throwError(`Must specify valid CHAIN_ID. Got: ${process.env.CHAIN_ID}`); @@ -383,13 +386,13 @@ export const FEAT_UNISWAP_V2_PAIR_CREATED_EVENT = getBoolConfig( export const UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS = process.env .UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS ? process.env.UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS.split(',').map((contract) => { - const [name, factoryAddress, startBlock] = contract.split(':'); - return { - name, - factoryAddress, - startBlock: parseInt(startBlock), - }; - }) + const [name, factoryAddress, startBlock] = contract.split(':'); + return { + name, + factoryAddress, + startBlock: parseInt(startBlock), + }; + }) : []; if ( diff --git a/src/constants.ts b/src/constants.ts index 81de98de..33853113 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -10,6 +10,7 @@ export const DEFAULT_BLOCKS_REORG_CHECK_INCREMENT = 35; export const DEFAULT_MAX_BLOCKS_TO_PULL = 120; export const DEFAULT_MAX_BLOCKS_TO_SEARCH = 120; export const DEFAULT_MAX_TX_TO_PULL = 1000; +export const DEFAULT_MAX_RPC_RETRY_CALLS = 5; export const DEFAULT_BLOCK_FINALITY_THRESHOLD = 10; export const DEFAULT_RESCRAPE_BLOCKS = 0; export const DEFAULT_MINUTES_BETWEEN_RUNS = 3; diff --git a/src/data_sources/events/web3.ts b/src/data_sources/events/web3.ts index 14316263..f4aac3b7 100644 --- a/src/data_sources/events/web3.ts +++ b/src/data_sources/events/web3.ts @@ -1,4 +1,4 @@ -import { MAX_TX_TO_PULL, BLOCK_RECEIPTS_MODE } from '../../config'; +import { MAX_TX_TO_PULL, BLOCK_RECEIPTS_MODE, MAX_RPC_RETRY_CALLS } from '../../config'; import { chunk, logger } from '../../utils'; import { BlockWithTransactionData, @@ -253,27 +253,33 @@ export class Web3Source { } public async getBlockInfoAsync(blockNumber: number): Promise { - while (true) { + let retryCount = 0; + + while (retryCount < MAX_RPC_RETRY_CALLS) { try { logger.debug(`Fetching block ${blockNumber}`); const block = (await this._web3Wrapper.getBlockIfExistsAsync(blockNumber)) as BlockWithoutTransactionData; if (block == null) { - logger.warn(`Block ${blockNumber} returned null, likely because the RPC node is not fully synced. Retrying...`); + logger.warn(`Block ${blockNumber} returned null, likely because the RPC node is not fully synced. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); + retryCount++; await new Promise((resolve) => setTimeout(resolve, 1000)); continue; } return block; } catch (err) { if (err instanceof Error) { - logger.error(`Error while fetching block ${blockNumber}: ${err.message}. Retrying...`); + logger.error(`Error while fetching block ${blockNumber}: ${err.message}. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); } else { - logger.error(`Unknown error while fetching block ${blockNumber}. Retrying...`); + logger.error(`Unknown error while fetching block ${blockNumber}. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); } + retryCount++; await new Promise((resolve) => setTimeout(resolve, 1000)); } } + + throw new Error(`Failed to fetch block ${blockNumber} after ${MAX_RPC_RETRY_CALLS} retries.`); } public async getCurrentBlockAsync(): Promise { From 8e2c4b358cb784ed4aa60a2b022914c09e1927b1 Mon Sep 17 00:00:00 2001 From: Nicolas Alencar <55406040+nicoalencar@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:41:59 -0300 Subject: [PATCH 3/4] npm prettier --- src/config.ts | 22 +++++++++++----------- src/data_sources/events/web3.ts | 22 ++++++++++++++++++---- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/config.ts b/src/config.ts index 7a50bd01..2c521ba0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -142,10 +142,10 @@ export const SCRAPER_MODE: ScraperMode = process.env.SCRAPER_MODE === undefined ? DEFAULT_SCRAPER_MODE : process.env.SCRAPER_MODE === 'BLOCKS' - ? 'BLOCKS' - : process.env.SCRAPER_MODE === 'EVENTS' - ? 'EVENTS' - : throwError('Wrong SCRAPER_MODE'); + ? 'BLOCKS' + : process.env.SCRAPER_MODE === 'EVENTS' + ? 'EVENTS' + : throwError('Wrong SCRAPER_MODE'); export const METRICS_PATH = process.env.METRICS_PATH || DEFAULT_METRICS_PATH; export const PROMETHEUS_PORT = getIntConfig('PROMETHEUS_PORT', DEFAULT_PROMETHEUS_PORT); @@ -386,13 +386,13 @@ export const FEAT_UNISWAP_V2_PAIR_CREATED_EVENT = getBoolConfig( export const UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS = process.env .UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS ? process.env.UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS.split(',').map((contract) => { - const [name, factoryAddress, startBlock] = contract.split(':'); - return { - name, - factoryAddress, - startBlock: parseInt(startBlock), - }; - }) + const [name, factoryAddress, startBlock] = contract.split(':'); + return { + name, + factoryAddress, + startBlock: parseInt(startBlock), + }; + }) : []; if ( diff --git a/src/data_sources/events/web3.ts b/src/data_sources/events/web3.ts index f4aac3b7..ee04deb5 100644 --- a/src/data_sources/events/web3.ts +++ b/src/data_sources/events/web3.ts @@ -259,10 +259,16 @@ export class Web3Source { try { logger.debug(`Fetching block ${blockNumber}`); - const block = (await this._web3Wrapper.getBlockIfExistsAsync(blockNumber)) as BlockWithoutTransactionData; + const block = (await this._web3Wrapper.getBlockIfExistsAsync( + blockNumber, + )) as BlockWithoutTransactionData; if (block == null) { - logger.warn(`Block ${blockNumber} returned null, likely because the RPC node is not fully synced. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); + logger.warn( + `Block ${blockNumber} returned null, likely because the RPC node is not fully synced. Retrying... (${ + retryCount + 1 + }/${MAX_RPC_RETRY_CALLS})`, + ); retryCount++; await new Promise((resolve) => setTimeout(resolve, 1000)); continue; @@ -270,9 +276,17 @@ export class Web3Source { return block; } catch (err) { if (err instanceof Error) { - logger.error(`Error while fetching block ${blockNumber}: ${err.message}. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); + logger.error( + `Error while fetching block ${blockNumber}: ${err.message}. Retrying... (${ + retryCount + 1 + }/${MAX_RPC_RETRY_CALLS})`, + ); } else { - logger.error(`Unknown error while fetching block ${blockNumber}. Retrying... (${retryCount + 1}/${MAX_RPC_RETRY_CALLS})`); + logger.error( + `Unknown error while fetching block ${blockNumber}. Retrying... (${ + retryCount + 1 + }/${MAX_RPC_RETRY_CALLS})`, + ); } retryCount++; await new Promise((resolve) => setTimeout(resolve, 1000)); From 589f84e1085bb4cba7e7551aecaf65e9d2b99212 Mon Sep 17 00:00:00 2001 From: Nicolas Alencar <55406040+nicoalencar@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:57:45 -0300 Subject: [PATCH 4/4] fixed docker-compose --- docker-compose-dev.yml | 701 +++++++++++++++++++++-------------------- 1 file changed, 351 insertions(+), 350 deletions(-) diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml index 696d763a..db574b77 100644 --- a/docker-compose-dev.yml +++ b/docker-compose-dev.yml @@ -1,342 +1,342 @@ version: '3' services: - # event-pipeline-ethereum: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' - # CHAIN_ID: '1' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events' - # # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" - # # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # EP_DEPLOYMENT_BLOCK: 10247094 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 1000 - # MAX_TX_TO_PULL: 1000 - # BLOCK_FINALITY_THRESHOLD: 0 - # SECONDS_BETWEEN_RUNS: 1 - # # FEAT_TRANSFORMED_ERC20_EVENT: "true" - # # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" - # # UNISWAP_V2_VIP_SWAP_SOURCES: "UniswapV2,SushiSwap" - # # UNISWAP_V2_VIP_SWAP_START_BLOCK: 10917104 - # # FEAT_UNISWAP_V3_VIP_SWAP_EVENT: "true" - # # UNISWAP_V3_VIP_SWAP_START_BLOCK: 12553659 - # # FEAT_UNISWAP_V3_SWAP_EVENT: "true" - # # UNISWAP_V3_SWAP_START_BLOCK: 16670838 - # # FEAT_LIMIT_ORDERS: "true" - # # V4_NATIVE_FILL_START_BLOCK: "11591021" - # # FEAT_PLP_SWAP_EVENT: "true" - # # PLP_VIP_START_BLOCK: 11377457 - # # FEAT_OTC_ORDERS: "true" - # # OTC_ORDERS_FEATURE_START_BLOCK: 13143075 - # # FEAT_CANCEL_EVENTS: "true" - # # FEAT_STAKING: "true" - # # STAKING_DEPLOYMENT_BLOCK: 8952581 - # # FEAT_RFQ_EVENT: "true" - # # FEAT_V3_NATIVE_FILL: "true" - # # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - # # FLASHWALLET_ADDRESS: "0x22f9dcf4647084d6c31b2765f6910cd85c178c18" - # # FLASHWALLET_DEPLOYMENT_BLOCK: 12231666 - # # FEAT_NFT: "true" - # # NFT_FEATURE_START_BLOCK: 14258205 - # # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" - # # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "UniswapV2:0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f:10000835,SushiSwap:0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac:10794229" - # # FEAT_UNISWAP_V2_SYNC_EVENT: "true" - # # UNISWAP_V2_SYNC_START_BLOCK: 10000835 - # # FEAT_ONCHAIN_GOVERNANCE: "true" - # # ONCHAIN_GOVERNANCE_START_BLOCK: 16990159 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' + event-pipeline-ethereum: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' + CHAIN_ID: '1' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events' + # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" + # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + EP_DEPLOYMENT_BLOCK: 10247094 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 1000 + MAX_TX_TO_PULL: 1000 + BLOCK_FINALITY_THRESHOLD: 0 + SECONDS_BETWEEN_RUNS: 1 + # FEAT_TRANSFORMED_ERC20_EVENT: "true" + # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" + # UNISWAP_V2_VIP_SWAP_SOURCES: "UniswapV2,SushiSwap" + # UNISWAP_V2_VIP_SWAP_START_BLOCK: 10917104 + # FEAT_UNISWAP_V3_VIP_SWAP_EVENT: "true" + # UNISWAP_V3_VIP_SWAP_START_BLOCK: 12553659 + # FEAT_UNISWAP_V3_SWAP_EVENT: "true" + # UNISWAP_V3_SWAP_START_BLOCK: 16670838 + # FEAT_LIMIT_ORDERS: "true" + # V4_NATIVE_FILL_START_BLOCK: "11591021" + # FEAT_PLP_SWAP_EVENT: "true" + # PLP_VIP_START_BLOCK: 11377457 + # FEAT_OTC_ORDERS: "true" + # OTC_ORDERS_FEATURE_START_BLOCK: 13143075 + # FEAT_CANCEL_EVENTS: "true" + # FEAT_STAKING: "true" + # STAKING_DEPLOYMENT_BLOCK: 8952581 + # FEAT_RFQ_EVENT: "true" + # FEAT_V3_NATIVE_FILL: "true" + # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + # FLASHWALLET_ADDRESS: "0x22f9dcf4647084d6c31b2765f6910cd85c178c18" + # FLASHWALLET_DEPLOYMENT_BLOCK: 12231666 + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 14258205 + # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" + # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "UniswapV2:0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f:10000835,SushiSwap:0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac:10794229" + # FEAT_UNISWAP_V2_SYNC_EVENT: "true" + # UNISWAP_V2_SYNC_START_BLOCK: 10000835 + # FEAT_ONCHAIN_GOVERNANCE: "true" + # ONCHAIN_GOVERNANCE_START_BLOCK: 16990159 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' - # event-pipeline-bsc: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_BSC}' - # CHAIN_ID: '56' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_bsc' - # MAX_BLOCKS_REORG: 50 - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # EP_DEPLOYMENT_BLOCK: 5375047 - # MAX_BLOCKS_TO_SEARCH: 2000 - # MAX_BLOCKS_TO_PULL: 5000 - # SECONDS_BETWEEN_RUNS: 1 - # # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" - # # UNISWAP_V2_VIP_SWAP_SOURCES: "PancakeSwap,BakerySwap,SushiSwap,CafeSwap,SwapLiquidity,ApeSwapFinance,CheeseSwap,Swap" - # # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" - # # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "PancakeSwap:0xbcfccbde45ce874adcb698cc183debcf17952812:586851,PancakeSwap!v2:0xca143ce32fe78f1f7019d7d551a6402fc5350c73:6809737,BakerySwap:0x01bf7c66c6bd861915cdaae475042d3c4bae16a7:470617,SushiSwap:0xc35dadb65012ec5796536bd9864ed8773abc74c4:5205069,CafeSwap:0x3e708fdbe3ada63fc94f8f61811196f1302137ad:5865260,SwapLiquidity:0x553990f2cba90272390f62c5bdb1681ffc899675:784352,ApeSwapFinance:0x0841bd0b734e4f5853f0dd8d7ea041c241fb0da6:4855901,CheeseSwap:0xdd538e4fd1b69b7863e1f741213276a6cf1efb3b:1569172" - # # FEAT_NFT: "true" - # # NFT_FEATURE_START_BLOCK: 15860129 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c' + event-pipeline-bsc: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_BSC}' + CHAIN_ID: '56' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_bsc' + MAX_BLOCKS_REORG: 50 + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + EP_DEPLOYMENT_BLOCK: 5375047 + MAX_BLOCKS_TO_SEARCH: 2000 + MAX_BLOCKS_TO_PULL: 5000 + SECONDS_BETWEEN_RUNS: 1 + # FEAT_UNISWAP_V2_VIP_SWAP_EVENT: "true" + # UNISWAP_V2_VIP_SWAP_SOURCES: "PancakeSwap,BakerySwap,SushiSwap,CafeSwap,SwapLiquidity,ApeSwapFinance,CheeseSwap,Swap" + # FEAT_UNISWAP_V2_PAIR_CREATED_EVENT: "true" + # UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS: "PancakeSwap:0xbcfccbde45ce874adcb698cc183debcf17952812:586851,PancakeSwap!v2:0xca143ce32fe78f1f7019d7d551a6402fc5350c73:6809737,BakerySwap:0x01bf7c66c6bd861915cdaae475042d3c4bae16a7:470617,SushiSwap:0xc35dadb65012ec5796536bd9864ed8773abc74c4:5205069,CafeSwap:0x3e708fdbe3ada63fc94f8f61811196f1302137ad:5865260,SwapLiquidity:0x553990f2cba90272390f62c5bdb1681ffc899675:784352,ApeSwapFinance:0x0841bd0b734e4f5853f0dd8d7ea041c241fb0da6:4855901,CheeseSwap:0xdd538e4fd1b69b7863e1f741213276a6cf1efb3b:1569172" + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 15860129 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c' - # event-pipeline-polygon: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_POLYGON}' - # CHAIN_ID: '137' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_polygon' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # ENABLE_PROMETHEUS_METRICS: "true" - # EP_DEPLOYMENT_BLOCK: 14391480 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 1000 - # MINUTES_BETWEEN_RUNS: 1 - # # FEAT_SLINGSHOT_TRADE_EVENT: "true" - # # SLINGSHOT_DEPLOYMENT_BLOCK: 14500000 - # # FEAT_LIMIT_ORDERS: "true" - # # V4_NATIVE_FILL_START_BLOCK: "17587182" - # # FEAT_NFT: "true" - # # NFT_FEATURE_START_BLOCK: 25697854 - # # FEAT_OTC_ORDERS: "true" - # # OTC_ORDERS_FEATURE_START_BLOCK: 26479109 - # # FEAT_META_TRANSACTION_EXECUTED_EVENT: "true" - # # META_TRANSACTION_EXECUTED_START_BLOCK: 39406300 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' + event-pipeline-polygon: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_POLYGON}' + CHAIN_ID: '137' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_polygon' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + ENABLE_PROMETHEUS_METRICS: "true" + EP_DEPLOYMENT_BLOCK: 14391480 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 1000 + MINUTES_BETWEEN_RUNS: 1 + # FEAT_SLINGSHOT_TRADE_EVENT: "true" + # SLINGSHOT_DEPLOYMENT_BLOCK: 14500000 + # FEAT_LIMIT_ORDERS: "true" + # V4_NATIVE_FILL_START_BLOCK: "17587182" + # FEAT_NFT: "true" + # NFT_FEATURE_START_BLOCK: 25697854 + # FEAT_OTC_ORDERS: "true" + # OTC_ORDERS_FEATURE_START_BLOCK: 26479109 + # FEAT_META_TRANSACTION_EXECUTED_EVENT: "true" + # META_TRANSACTION_EXECUTED_START_BLOCK: 39406300 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270' - # event-pipeline-avalanche: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_AVALANCHE}' - # CHAIN_ID: '43114' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_avalanche' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # ENABLE_PROMETHEUS_METRICS: "true" - # EP_DEPLOYMENT_BLOCK: 3601700 - # MAX_BLOCKS_TO_SEARCH: 5000 - # MAX_BLOCKS_TO_PULL: 2000 - # MINUTES_BETWEEN_RUNS: 1 - # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - # FLASHWALLET_ADDRESS: "0xdb6f1920a889355780af7570773609bd8cb1f498" - # FLASHWALLET_DEPLOYMENT_BLOCK: 11805869 - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 11816835 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' + event-pipeline-avalanche: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_AVALANCHE}' + CHAIN_ID: '43114' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_avalanche' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + ENABLE_PROMETHEUS_METRICS: "true" + EP_DEPLOYMENT_BLOCK: 3601700 + MAX_BLOCKS_TO_SEARCH: 5000 + MAX_BLOCKS_TO_PULL: 2000 + MINUTES_BETWEEN_RUNS: 1 + FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + FLASHWALLET_ADDRESS: "0xdb6f1920a889355780af7570773609bd8cb1f498" + FLASHWALLET_DEPLOYMENT_BLOCK: 11805869 + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 11816835 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7' - # event-pipeline-fantom: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_FANTOM}' - # CHAIN_ID: '250' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_fantom' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # EP_ADDRESS: "0xDEF189DeAEF76E379df891899eb5A00a94cBC250" - # ENABLE_PROMETHEUS_METRICS: "true" - # EP_DEPLOYMENT_BLOCK: 18855765 - # MAX_BLOCKS_TO_SEARCH: 2000 - # MAX_BLOCKS_TO_PULL: 1000 - # SECONDS_BETWEEN_RUNS: 60 - # FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" - # FLASHWALLET_ADDRESS: "0xb4d961671cadfed687e040b076eee29840c142e5" - # FLASHWALLET_DEPLOYMENT_BLOCK: 18855797 - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 32817445 - # FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83' + event-pipeline-fantom: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_FANTOM}' + CHAIN_ID: '250' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_fantom' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + EP_ADDRESS: "0xDEF189DeAEF76E379df891899eb5A00a94cBC250" + ENABLE_PROMETHEUS_METRICS: "true" + EP_DEPLOYMENT_BLOCK: 18855765 + MAX_BLOCKS_TO_SEARCH: 2000 + MAX_BLOCKS_TO_PULL: 1000 + SECONDS_BETWEEN_RUNS: 60 + FEAT_ERC20_BRIDGE_TRANSFER_FLASHWALLET: "true" + FLASHWALLET_ADDRESS: "0xb4d961671cadfed687e040b076eee29840c142e5" + FLASHWALLET_DEPLOYMENT_BLOCK: 18855797 + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 32817445 + FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83' - # event-pipeline-celo: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_CELO}' - # CHAIN_ID: '42220' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_celo' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # ENABLE_PROMETHEUS_METRICS: "true" - # EP_DEPLOYMENT_BLOCK: 9350111 - # MAX_BLOCKS_TO_SEARCH: 5000 - # MAX_BLOCKS_TO_PULL: 2000 - # MINUTES_BETWEEN_RUNS: 1 - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 11820000 + event-pipeline-celo: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_CELO}' + CHAIN_ID: '42220' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_celo' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + ENABLE_PROMETHEUS_METRICS: "true" + EP_DEPLOYMENT_BLOCK: 9350111 + MAX_BLOCKS_TO_SEARCH: 5000 + MAX_BLOCKS_TO_PULL: 2000 + MINUTES_BETWEEN_RUNS: 1 + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 11820000 - # event-pipeline-optimism: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_OPTIMISM}' - # CHAIN_ID: '10' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_optimism' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # EP_DEPLOYMENT_BLOCK: 1691335 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 1000 - # SECONDS_BETWEEN_RUNS: 30 - # EP_ADDRESS: "0xdef1abe32c034e558cdd535791643c58a13acc10" - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 4214981 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: "0x4200000000000000000000000000000000000006" + event-pipeline-optimism: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_OPTIMISM}' + CHAIN_ID: '10' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_optimism' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + EP_DEPLOYMENT_BLOCK: 1691335 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 1000 + SECONDS_BETWEEN_RUNS: 30 + EP_ADDRESS: "0xdef1abe32c034e558cdd535791643c58a13acc10" + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 4214981 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: "0x4200000000000000000000000000000000000006" - # event-pipeline-arbitrum: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_ARBITRUM}' - # CHAIN_ID: '42161' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_arbitrum' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # EP_DEPLOYMENT_BLOCK: 4050733 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 1000 - # SECONDS_BETWEEN_RUNS: 30 - # EP_ADDRESS: "0xdef1c0ded9bec7f1a1670819833240f027b25eff" - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 4050733 - # FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' + event-pipeline-arbitrum: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_ARBITRUM}' + CHAIN_ID: '42161' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_arbitrum' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + EP_DEPLOYMENT_BLOCK: 4050733 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 1000 + SECONDS_BETWEEN_RUNS: 30 + EP_ADDRESS: "0xdef1c0ded9bec7f1a1670819833240f027b25eff" + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 4050733 + FEAT_WRAP_UNWRAP_NATIVE_TRANSFER_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' - # event-pipeline-base: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_BASE}' - # CHAIN_ID: '8453' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events_base' - # EP_DEPLOYMENT_BLOCK: 1410394 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 100 - # SECONDS_BETWEEN_RUNS: 1 - # FEAT_NFT: "true" - # NFT_FEATURE_START_BLOCK: 1410394 - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4200000000000000000000000000000000000006' + event-pipeline-base: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_BASE}' + CHAIN_ID: '8453' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events_base' + EP_DEPLOYMENT_BLOCK: 1410394 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 100 + SECONDS_BETWEEN_RUNS: 1 + FEAT_NFT: "true" + NFT_FEATURE_START_BLOCK: 1410394 + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4200000000000000000000000000000000000006' - # event-pipeline-scroll: - # build: - # context: . - # dockerfile: Dockerfile.dev - # platform: linux/amd64 - # restart: always - # environment: - # SCRAPER_MODE: 'BLOCKS' - # EVM_RPC_URL: '${RPC_URL_SCROLL}' - # CHAIN_ID: '534352' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' - # SCHEMA: 'events_scroll' - # FEAT_ZEROEX_EXCHANGE_PROXY: "false" - # SETTLER_DEPLOYMENT_BLOCK: 7474150 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 100 - # SECONDS_BETWEEN_RUNS: 1 - # RESCRAPE_BLOCKS: 10 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x5300000000000000000000000000000000000004' - # FEAT_TOKENS_FROM_TRANSFERS: "true" - # FEAT_ERC20_TRANSFER_ALL: "true" - # FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" - # FEAT_SETTLER_RFQ_ORDER_EVENT: "true" - # networks: - # - 0x-data-migrations_default + event-pipeline-scroll: + build: + context: . + dockerfile: Dockerfile.dev + platform: linux/amd64 + restart: always + environment: + SCRAPER_MODE: 'BLOCKS' + EVM_RPC_URL: '${RPC_URL_SCROLL}' + CHAIN_ID: '534352' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' + SCHEMA: 'events_scroll' + FEAT_ZEROEX_EXCHANGE_PROXY: "false" + SETTLER_DEPLOYMENT_BLOCK: 7474150 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 100 + SECONDS_BETWEEN_RUNS: 1 + RESCRAPE_BLOCKS: 10 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x5300000000000000000000000000000000000004' + FEAT_TOKENS_FROM_TRANSFERS: "true" + FEAT_ERC20_TRANSFER_ALL: "true" + FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" + FEAT_SETTLER_RFQ_ORDER_EVENT: "true" + networks: + - 0x-data-migrations_default - # event-pipeline-blast: - # build: - # context: . - # dockerfile: Dockerfile.dev - # platform: linux/amd64 - # restart: always - # environment: - # SCRAPER_MODE: 'EVENTS' - # EVM_RPC_URL: '${RPC_URL_BLAST}' - # CHAIN_ID: '81457' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' - # SCHEMA: 'events_blast' - # FEAT_ZEROEX_EXCHANGE_PROXY: "false" - # SETTLER_DEPLOYMENT_BLOCK: 6124420 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 100 - # SECONDS_BETWEEN_RUNS: 1 - # RESCRAPE_BLOCKS: 10 - # FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" - # WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4300000000000000000000000000000000000004' - # FEAT_TOKENS_FROM_TRANSFERS: "true" - # FEAT_ERC20_TRANSFER_ALL: "true" - # FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" - # TOKENS_FROM_TRANSFERS_START_BLOCK: "1" - # SOCKET_BRIDGE_CONTRACT_ADDRESS: "0x3a23f943181408eac424116af7b7790c94cb97a5" - # SOCKET_BRIDGE_EVENT_START_BLOCK: "6124420" - # networks: - # - 0x-data-migrations_default + event-pipeline-blast: + build: + context: . + dockerfile: Dockerfile.dev + platform: linux/amd64 + restart: always + environment: + SCRAPER_MODE: 'EVENTS' + EVM_RPC_URL: '${RPC_URL_BLAST}' + CHAIN_ID: '81457' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}' + SCHEMA: 'events_blast' + FEAT_ZEROEX_EXCHANGE_PROXY: "false" + SETTLER_DEPLOYMENT_BLOCK: 6124420 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 100 + SECONDS_BETWEEN_RUNS: 1 + RESCRAPE_BLOCKS: 10 + FEAT_WRAP_UNWRAP_NATIVE_EVENT: "true" + WRAP_UNWRAP_NATIVE_CONTRACT_ADDRESS: '0x4300000000000000000000000000000000000004' + FEAT_TOKENS_FROM_TRANSFERS: "true" + FEAT_ERC20_TRANSFER_ALL: "true" + FEAT_SETTLER_ERC721_TRANSFER_EVENT: "true" + TOKENS_FROM_TRANSFERS_START_BLOCK: "1" + SOCKET_BRIDGE_CONTRACT_ADDRESS: "0x3a23f943181408eac424116af7b7790c94cb97a5" + SOCKET_BRIDGE_EVENT_START_BLOCK: "6124420" + networks: + - 0x-data-migrations_default event-pipeline-linea: build: @@ -368,30 +368,31 @@ services: SOCKET_BRIDGE_EVENT_START_BLOCK: "6917652" networks: - 0x-data-migrations_default - # token-scraper-ethereum: - # depends_on: - # - postgres - # build: - # context: . - # dockerfile: Dockerfile.dev - # restart: always - # environment: - # ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' - # CHAIN_ID: '1' - # POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' - # SCHEMA: 'events' - # KAFKA_BROKERS: '${KAFKA_BROKERS}' - # KAFKA_SSL: '${KAFKA_SSL}' - # KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' - # KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' - # LOG_LEVEL: "info" - # FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" - # TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 - # EP_DEPLOYMENT_BLOCK: 10247094 - # MAX_BLOCKS_TO_SEARCH: 1000 - # MAX_BLOCKS_TO_PULL: 1000 - # MAX_TX_TO_PULL: 1000 - # SECONDS_BETWEEN_RUNS: 5 + + token-scraper-ethereum: + depends_on: + - postgres + build: + context: . + dockerfile: Dockerfile.dev + restart: always + environment: + ETHEREUM_RPC_URL: '${RPC_URL_ETHEREUM}' + CHAIN_ID: '1' + POSTGRES_URI: 'postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres/${POSTGRES_DB}' + SCHEMA: 'events' + KAFKA_BROKERS: '${KAFKA_BROKERS}' + KAFKA_SSL: '${KAFKA_SSL}' + KAFKA_AUTH_USER: '${KAFKA_AUTH_USER}' + KAFKA_AUTH_PASSWORD: '${KAFKA_AUTH_PASSWORD}' + LOG_LEVEL: "info" + FEAT_EXCLUSIVE_TOKENS_FROM_TRANSACTIONS: "true" + TOKENS_FROM_TRANSACTIONS_START_BLOCK: 9193266 + EP_DEPLOYMENT_BLOCK: 10247094 + MAX_BLOCKS_TO_SEARCH: 1000 + MAX_BLOCKS_TO_PULL: 1000 + MAX_TX_TO_PULL: 1000 + SECONDS_BETWEEN_RUNS: 5 networks: 0x-data-migrations_default: