Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Base Sepolia #2080

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ VITE_APP_ALCHEMY_MAINNET_API_KEY=""
VITE_APP_ALCHEMY_POLYGON_API_KEY=""
# Alchemy provider API key, used on Sepolia
VITE_APP_ALCHEMY_SEPOLIA_API_KEY=""
# Alchemy provider API key, used on Base Sepolia
VITE_APP_ALCHEMY_BASE_SEPOLIA_API_KEY=""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk can we automate and make dynamic all this shit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually yes we can, but only recently. Alchemy (as of only recently) now lets you use the same API key for all networks! I'll clean this up in a future PR.

# Alchemy provider API key, used on Base
VITE_APP_ALCHEMY_BASE_API_KEY=""
# Alchemy provider API key, used on Optimism
Expand All @@ -31,8 +29,6 @@ VITE_APP_ETHERSCAN_MAINNET_API_KEY=""
VITE_APP_ETHERSCAN_POLYGON_API_KEY=""
# ABI selector, used on Sepolia
VITE_APP_ETHERSCAN_SEPOLIA_API_KEY=""
# ABI selector, used on Base Sepolia
VITE_APP_ETHERSCAN_BASE_SEPOLIA_API_KEY=""
# ABI selector, used on Base
VITE_APP_ETHERSCAN_BASE_API_KEY=""
# ABI selector, used on Optimism
Expand Down
3 changes: 2 additions & 1 deletion src/providers/NetworkConfig/NetworkConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Context, createContext, ReactNode, useContext, useEffect, useState } fr
import { useChainId } from 'wagmi';
import { NetworkConfig } from '../../types/network';

import * as networks from './networks';
const modules = import.meta.glob<{ default: NetworkConfig }>('./networks/*.ts', { eager: true });
const networks = Object.values(modules).map(module => module.default);

export const NetworkConfigContext = createContext({} as NetworkConfig);

Expand Down
4 changes: 3 additions & 1 deletion src/providers/NetworkConfig/networks/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NetworkConfig } from '../../../types/network';

const SAFE_VERSION = '1.3.0';

export const baseConfig: NetworkConfig = {
const baseConfig: NetworkConfig = {
order: 10,
chain: base,
moralisSupported: true,
Expand Down Expand Up @@ -74,3 +74,5 @@ export const baseConfig: NetworkConfig = {
staking: {},
createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20],
};

export default baseConfig;
82 changes: 0 additions & 82 deletions src/providers/NetworkConfig/networks/baseSepolia.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/providers/NetworkConfig/networks/index.ts

This file was deleted.

4 changes: 3 additions & 1 deletion src/providers/NetworkConfig/networks/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NetworkConfig } from '../../../types/network';

const SAFE_VERSION = '1.3.0';

export const mainnetConfig: NetworkConfig = {
const mainnetConfig: NetworkConfig = {
order: 0,
chain: mainnet,
moralisSupported: true,
Expand Down Expand Up @@ -80,3 +80,5 @@ export const mainnetConfig: NetworkConfig = {
},
createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20],
};

export default mainnetConfig;
4 changes: 3 additions & 1 deletion src/providers/NetworkConfig/networks/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NetworkConfig } from '../../../types/network';

const SAFE_VERSION = '1.3.0';

export const optimismConfig: NetworkConfig = {
const optimismConfig: NetworkConfig = {
order: 15,
chain: optimism,
moralisSupported: true,
Expand Down Expand Up @@ -74,3 +74,5 @@ export const optimismConfig: NetworkConfig = {
staking: {},
createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20],
};

export default optimismConfig;
4 changes: 3 additions & 1 deletion src/providers/NetworkConfig/networks/polygon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NetworkConfig } from '../../../types/network';

const SAFE_VERSION = '1.3.0';

export const polygonConfig: NetworkConfig = {
const polygonConfig: NetworkConfig = {
order: 20,
chain: polygon,
moralisSupported: true,
Expand Down Expand Up @@ -74,3 +74,5 @@ export const polygonConfig: NetworkConfig = {
staking: {},
createOptions: [GovernanceType.MULTISIG, GovernanceType.AZORIUS_ERC20],
};

export default polygonConfig;
4 changes: 3 additions & 1 deletion src/providers/NetworkConfig/networks/sepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { NetworkConfig } from '../../../types/network';

const SAFE_VERSION = '1.3.0';

export const sepoliaConfig: NetworkConfig = {
const sepoliaConfig: NetworkConfig = {
order: 30,
chain: sepolia,
moralisSupported: true,
Expand Down Expand Up @@ -78,3 +78,5 @@ export const sepoliaConfig: NetworkConfig = {
GovernanceType.AZORIUS_ERC721,
],
};

export default sepoliaConfig;
2 changes: 0 additions & 2 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ interface ImportMetaEnv {
readonly VITE_APP_ALCHEMY_MAINNET_API_KEY: string;
readonly VITE_APP_ALCHEMY_POLYGON_API_KEY: string;
readonly VITE_APP_ALCHEMY_SEPOLIA_API_KEY: string;
readonly VITE_APP_ALCHEMY_BASE_SEPOLIA_API_KEY: string;
readonly VITE_APP_ALCHEMY_BASE_API_KEY: string;
readonly VITE_APP_ALCHEMY_OPTIMISM_API_KEY: string;

readonly VITE_APP_ETHERSCAN_MAINNET_API_KEY: string;
readonly VITE_APP_ETHERSCAN_POLYGON_API_KEY: string;
readonly VITE_APP_ETHERSCAN_SEPOLIA_API_KEY: string;
readonly VITE_APP_ETHERSCAN_BASE_SEPOLIA_API_KEY: string;
readonly VITE_APP_ETHERSCAN_BASE_API_KEY: string;
readonly VITE_APP_ETHERSCAN_OPTIMISM_API_KEY: string;

Expand Down