Skip to content

Commit

Permalink
fix: arbitrum problem (sismo-core#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabin54 authored Jul 12, 2023
1 parent a76c039 commit 010fb86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const nextConfig = {
styledComponents: true
},
webpack: config => {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.resolve.fallback = { fs: false, net: false, tls: false, "pino-pretty": false, lokijs: false };

return config;
},
}
Expand Down
2 changes: 1 addition & 1 deletion space-configs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export type ZkBadgeAppConfig = AppCommonConfig & {
};
};

export type ZkDropChainName = Network.Gnosis | Network.Mumbai | Network.Sepolia | Network.Polygon | Network.Mainnet |Network.Goerli | Network.Optimism | Network.ArbitrumOne;
export type ZkDropChainName = Network.Gnosis | Network.Mumbai | Network.Sepolia | Network.Polygon | Network.Mainnet |Network.Goerli | Network.Optimism | Network.Arbitrum;
export type ZkDropAppConfig = AppCommonConfig & {
type: "zkDrop";
templateConfig: {
Expand Down
12 changes: 6 additions & 6 deletions src/libs/contracts/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export enum Network {
Mumbai = "mumbai",
Optimism = "optimism",
OptimismGoerli = "optimism-goerli",
ArbitrumOne = "arbitrum-one",
Arbitrum = "arbitrum",
ArbitrumGoerli = "arbitrum-goerli",
ScrollTestnet = "scroll-testnet",
}
Expand All @@ -25,7 +25,7 @@ export const networkChainIds: { [network in Network]: number } = {
[Network.Mumbai]: 80001,
[Network.Optimism]: 10,
[Network.OptimismGoerli]: 420,
[Network.ArbitrumOne]: 42161,
[Network.Arbitrum]: 42161,
[Network.ArbitrumGoerli]: 421613,
[Network.ScrollTestnet]: 534353
};
Expand All @@ -39,13 +39,13 @@ export const networkLabels: { [network in Network]?: string } = {
[Network.Mumbai]: "Mumbai",
[Network.Optimism]: "Optimism",
[Network.OptimismGoerli]: "Optimism Goerli",
[Network.ArbitrumOne]: "Arbitrum",
[Network.Arbitrum]: "Arbitrum",
[Network.ArbitrumGoerli]: "Arbitrum Goerli",
[Network.ScrollTestnet]: "Scroll Testnet"
};

export const networkRpcUrls: { [network in Network]?: string } = {
[Network.ArbitrumOne]: "https://1rpc.io/arb",
[Network.Arbitrum]: "https://1rpc.io/arb",
[Network.ArbitrumGoerli]: "https://rpc.goerli.arbitrum.gateway.fm",
[Network.ScrollTestnet]: "https://alpha-rpc.scroll.io/l2",
};
Expand All @@ -59,7 +59,7 @@ export const explorers: { [network in Network]?: string } = {
[Network.Goerli]: "https://goerli.etherscan.io",
[Network.Optimism]: "https://optimistic.etherscan.io",
[Network.OptimismGoerli]: "https://goerli-optimism.etherscan.io",
[Network.ArbitrumOne]: "https://arbiscan.io",
[Network.Arbitrum]: "https://arbiscan.io",
[Network.ArbitrumGoerli]: "https://goerli.arbiscan.io"
};

Expand All @@ -79,7 +79,7 @@ export const getErc721Explorer = ({ contractAddress, network, tokenId }: { contr
case Network.Mainnet:
case Network.Optimism:
return `https://opensea.io/assets/${network}/${contractAddress}${tokenId ? "/" + tokenId : ""}`;
case Network.ArbitrumOne:
case Network.Arbitrum:
return `https://opensea.io/assets/arbitrum/${contractAddress}${tokenId ? "/" + tokenId : ""}`;
case Network.Polygon:
return `https://opensea.io/assets/matic/${contractAddress}${tokenId ? "/" + tokenId : ""}`;
Expand Down

0 comments on commit 010fb86

Please sign in to comment.