Skip to content

Commit

Permalink
feat: multichain support (#38)
Browse files Browse the repository at this point in the history
# 🤖 Linear

Closes GIT-177 GIT-178 GIT-179

## Description
- index remaining chains on Indexer app
- enable multichain support on Processing app
- fix InMemoryEventsRegistry to save events per chain
- move out from Singleton pattern for logger as we want to log which
Chain Orchestrator's makes a log

## Checklist before requesting a review

-   [x] I have conducted a self-review of my code.
-   [x] I have conducted a QA.
-   [x] If it is a core feature, I have included comprehensive tests.
  • Loading branch information
0xnigir1 authored Nov 29, 2024
1 parent ba77fe1 commit 8d06292
Show file tree
Hide file tree
Showing 18 changed files with 758 additions and 237 deletions.
240 changes: 120 additions & 120 deletions apps/indexer/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ networks:
#######################
# MAINNET #
#######################
# - id: 1 # mainnet
# start_block: 18486688
# contracts:
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
# - name: Strategy
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- id: 1 # mainnet
start_block: 18486688
contracts:
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
- name: Strategy
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3

- id: 10 # optimism
start_block: 111678968
Expand All @@ -144,93 +144,82 @@ networks:
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 11155111 # sepolia
# start_block: 4617051
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 250 # fantom
# start_block: 77624278
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 42161 # arbitrum
# start_block: 146489425
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 137 # polygon
# start_block: 49466006
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 8453 # base
# start_block: 6083365
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 324 # zksync-era-mainnet
# start_block: 31154341
# contracts:
# - name: Registry
# address:
# - 0xaa376Ef759c1f5A8b0B5a1e2FEC5C23f3bF30246
# - name: Strategy
# - name: Allo
# address:
# - 0x9D1D1BF2835935C291C0f5228c86d5C4e235A249

# - id: 43114 # avalanche
# start_block: 34540051
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 534352 # scroll
# start_block: 2683205
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
- id: 250 # fantom
start_block: 77624278
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 42161 # arbitrum
start_block: 146489425
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 137 # polygon
start_block: 49466006
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 8453 # base
start_block: 6083365
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 324 # zksync-era-mainnet
start_block: 31154341
contracts:
- name: Registry
address:
- 0xaa376Ef759c1f5A8b0B5a1e2FEC5C23f3bF30246
- name: Strategy
- name: Allo
address:
- 0x9D1D1BF2835935C291C0f5228c86d5C4e235A249

- id: 43114 # avalanche
start_block: 34540051
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 534352 # scroll
start_block: 2683205
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 1329 # sei-mainnet
# rpc_config:
Expand All @@ -245,39 +234,50 @@ networks:
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 42220 # celo-mainnet
# start_block: 22257475
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 42 # lukso-mainnet
# start_block: 2400000
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
- id: 42220 # celo-mainnet
start_block: 22257475
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

- id: 42 # lukso-mainnet
start_block: 2400000
contracts:
- name: Registry
address:
- 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
- name: Strategy
- name: Allo
address:
- 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
#######################
# TESTNET #
#######################

# - id: 11155111 # sepolia
# start_block: 4617051
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1

# - id: 80001 # polygon-mumbai
# start_block: 41939383
# contracts:
# - name: Registry
# address:
# - 0x4AAcca72145e1dF2aeC137E1f3C5E3D75DB8b5f3
# - name: Strategy
#
# - name: Strategy

# - name: Allo
# address:
# - 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
Expand Down
2 changes: 1 addition & 1 deletion apps/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"chai": "4.3.10",
"envio": "2.7.3",
"envio": "2.8.2",
"ethers": "6.8.0",
"yaml": "2.5.1"
},
Expand Down
49 changes: 28 additions & 21 deletions apps/indexer/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions apps/processing/.env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
RPC_URLS=["https://optimism.llamarpc.com","https://rpc.ankr.com/optimism","https://optimism.gateway.tenderly.co","https://optimism.blockpi.network/v1/rpc/public","https://mainnet.optimism.io","https://opt-mainnet.g.alchemy.com/v2/demo"]
CHAIN_ID=10
LOG_LEVEL=debug
CHAINS=[{"id":10,"name":"optimism","rpcUrls":["https://optimism.llamarpc.com","https://rpc.ankr.com/optimism","https://optimism.gateway.tenderly.co","https://optimism.blockpi.network/v1/rpc/public","https://mainnet.optimism.io","https://opt-mainnet.g.alchemy.com/v2/demo"]},{"id":1,"name":"mainnet","rpcUrls":["https://eth.llamarpc.com","https://rpc.flashbots.net/fast"],"fetchLimit":1000,"fetchDelayMs":30000}]

FETCH_LIMIT=10000
FETCH_DELAY_MS=30000
LOG_LEVEL=debug

DATABASE_URL=postgresql://postgres:testing@localhost:5434/datalayer-postgres-db
DATABASE_SCHEMA=chain_data_schema_1
Expand Down
Loading

0 comments on commit 8d06292

Please sign in to comment.