Skip to content

Commit

Permalink
feat: add aleph zero (#499)
Browse files Browse the repository at this point in the history
* support aleph zero

* Set aleph zero distance from head

* update alephzero spoke pool address
  • Loading branch information
melisaguevara authored Nov 13, 2024
1 parent a55ce80 commit 7453d39
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/modules/configuration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const configValues = () => ({
690: process.env.WEB3_NODE_URL_690,
7777777: process.env.WEB3_NODE_URL_7777777,
480: process.env.WEB3_NODE_URL_480,
41455: process.env.WEB3_NODE_URL_41455,
},
hubPoolContracts: {
[ChainIds.mainnet]: {
Expand Down Expand Up @@ -406,6 +407,15 @@ export const configValues = () => ({
firstDepositId: 1,
},
],
[ChainIds.alephZero]: [
{
address: "0x13fDac9F9b4777705db45291bbFF3c972c6d1d97",
startBlockNumber: 4240318,
abi: JSON.stringify(SpokePoolV3Abi),
acrossVersion: AcrossContractsVersion.V3,
firstDepositId: 0,
},
],
},
merkleDistributor: {
address: process.env.MERKLE_DISTRIBUTOR_ADDRESS || "0xF633b72A4C2Fb73b77A379bf72864A825aD35b6D", // TODO: replace with mainnet
Expand Down
4 changes: 4 additions & 0 deletions src/modules/scraper/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ export class ScraperService {
return 120;
}

if (chainId === ChainIds.alephZero) {
return 120;
}

if (chainId === ChainIds.zkSyncMainnet) {
return 30;
}
Expand Down
1 change: 1 addition & 0 deletions src/modules/web3/model/ChainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const ChainIds = {
redstone: 690,
zora: 7777777,
worldChain: 480,
alephZero: 41455,
};

export const ChainIdToName = Object.entries(ChainIds).reduce((idToName, entry) => {
Expand Down
5 changes: 5 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ export const chainIdToInfo = {
chainId: ChainIds.worldChain,
nativeSymbol: "eth",
},
[ChainIds.alephZero]: {
name: "Aleph Zero",
chainId: ChainIds.alephZero,
nativeSymbol: "azero",
},
};

export const wait = (seconds = 1) =>
Expand Down

0 comments on commit 7453d39

Please sign in to comment.