Skip to content

Commit

Permalink
chore(avalanche): added to mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Nov 8, 2024
1 parent e46815e commit 59637c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/factory/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface TChainParams {
nearParams: TNearParams;
blastParams: TEvmParams;
fantomParams: TEvmParams;
avaxParams: TEvmParams;
}

export namespace ChainFactoryConfigs {
Expand Down Expand Up @@ -234,6 +235,15 @@ export namespace ChainFactoryConfigs {
royaltySalePrice: 10000,
storage,
},
avaxParams: {
identifier: Chain.AVALANCHE,
provider: new JsonRpcProvider(
"https://endpoints.omniatech.io/v1/avax/mainnet/public",
),
bridge: ethers.getAddress("0x92764FF21a1a8cC4e8eEec43ED04Bea3B76D8fD3"),
royaltySalePrice: 10000,
storage,
},
} satisfies Partial<TChainParams>;
}
}
5 changes: 5 additions & 0 deletions src/factory/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export namespace Chain {
export const MOONBEAM = "MOONBEAM";
export const BLAST = "BLAST";
export const FANTOM = "FANTOM";
export const AVALANCHE = "AVALANCHE";
}

function mapNonceToParams(chainParams: Partial<TChainParams>): TParamMap {
Expand All @@ -55,6 +56,7 @@ function mapNonceToParams(chainParams: Partial<TChainParams>): TParamMap {
cToP.set(Chain.MOONBEAM, chainParams.moonbeamParams);
cToP.set(Chain.BLAST, chainParams.blastParams);
cToP.set(Chain.FANTOM, chainParams.fantomParams);
cToP.set(Chain.AVALANCHE, chainParams.avaxParams);
return cToP;
}

Expand Down Expand Up @@ -216,3 +218,6 @@ CHAIN_INFO.set(Chain.BLAST, {
CHAIN_INFO.set(Chain.FANTOM, {
constructor: evmHandler,
});
CHAIN_INFO.set(Chain.AVALANCHE, {
constructor: evmHandler,
});
1 change: 1 addition & 0 deletions src/factory/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ export type MetaMap = {
NEAR: TNearMeta;
BLAST: TEvmMeta;
FANTOM: TEvmMeta;
AVALANCHE: TEvmMeta;
};

0 comments on commit 59637c1

Please sign in to comment.