Skip to content

Commit

Permalink
CERT 8061 Add Celo chain support
Browse files Browse the repository at this point in the history
  • Loading branch information
nivcertora committed Feb 5, 2025
1 parent 97986f2 commit 118da7b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/quorum/apis/block_explorers/chains_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class ChainAPI:
Chain.SCROLL: 534352,
Chain.ZK: 324,
Chain.LINEA: 59144,
Chain.CELO: 42220,
}

BASE_URL = "https://api.etherscan.io/v2/api?chainid={chain_id}&apikey={api_key}"
Expand Down
1 change: 1 addition & 0 deletions src/quorum/apis/governance/aave_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"534352": Chain.SCROLL,
"324": Chain.ZK,
"59144": Chain.LINEA,
"42220": Chain.CELO,
}


Expand Down
2 changes: 2 additions & 0 deletions src/quorum/apis/price_feeds/chainlink_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class ChainLinkAPI(PriceFeedProviderBase):
Chain.POLY: "https://reference-data-directory.vercel.app/feeds-matic-mainnet.json",
Chain.SCROLL: "https://reference-data-directory.vercel.app/feeds-ethereum-mainnet-scroll-1.json",
Chain.ZK: "https://reference-data-directory.vercel.app/feeds-ethereum-mainnet-zksync-1.json",
Chain.LINEA: "https://reference-data-directory.vercel.app/feeds-ethereum-mainnet-linea-1.json",
Chain.CELO: "https://reference-data-directory.vercel.app/feeds-celo-mainnet.json",
}

def _get_price_feed_info(self, chain: Chain, address: str) -> PriceFeedData | None:
Expand Down
2 changes: 2 additions & 0 deletions src/quorum/apis/price_feeds/coingecko_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class CoinGeckoAPI(PriceFeedProviderBase):
Chain.POLY: "polygon-pos",
Chain.SCROLL: "scroll",
Chain.ZK: "zksync",
Chain.LINEA: "linea",
Chain.CELO: "celo",
}

COINGECKO_API_URL = (
Expand Down
1 change: 1 addition & 0 deletions src/quorum/auto_report/aave_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class ChainInfo(BaseModel):
name="zkSync Era", block_explorer_link="https://era.zksync.network/address"
),
"59144": ChainInfo(name="Linea", block_explorer_link="https://lineascan.build/"),
"42220": ChainInfo(name="Celo", block_explorer_link="https://celo.blockscout.com/"),
}


Expand Down
3 changes: 2 additions & 1 deletion src/quorum/utils/chain_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ class Chain(StrEnum):
POLY = "Polygon"
SCROLL = "Scroll"
ZK = "zkSync"
LINEA = "LINEA"
LINEA = "Linea"
CELO = "Celo"

0 comments on commit 118da7b

Please sign in to comment.