Skip to content

Commit

Permalink
add op
Browse files Browse the repository at this point in the history
  • Loading branch information
backmeupplz committed Dec 18, 2023
1 parent 27d79ff commit 3ccc896
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deployflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:
VITE_ALCHEMY_POLYGON: ${{ secrets.VITE_ALCHEMY_POLYGON }}
VITE_ALCHEMY_BASE: ${{ secrets.VITE_ALCHEMY_BASE }}
VITE_ALCHEMY_GOERLI: ${{ secrets.VITE_ALCHEMY_GOERLI }}
VITE_ALCHEMY_OPTIMISM: ${{ secrets.VITE_ALCHEMY_OPTIMISM }}
VITE_CONTRACT_ADDRESS_MAINNET: ${{ secrets.VITE_CONTRACT_ADDRESS_MAINNET }}
VITE_CONTRACT_ADDRESS_POLYGON: ${{ secrets.VITE_CONTRACT_ADDRESS_POLYGON }}
VITE_CONTRACT_ADDRESS_BASE: ${{ secrets.VITE_CONTRACT_ADDRESS_BASE }}
VITE_CONTRACT_ADDRESS_ZORA: ${{ secrets.VITE_CONTRACT_ADDRESS_ZORA }}
VITE_CONTRACT_ADDRESS_GOERLI: ${{ secrets.VITE_CONTRACT_ADDRESS_GOERLI }}
VITE_CONTRACT_ADDRESS_OPTIMISM: ${{ secrets.VITE_CONTRACT_ADDRESS_OPTIMISM }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
5 changes: 3 additions & 2 deletions src/components/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import {
} from '@rainbow-me/rainbowkit'
import { WagmiConfig, configureChains, createConfig } from 'wagmi'
import { alchemyProvider } from 'wagmi/providers/alchemy'
import { base, goerli, mainnet, polygon, zora } from 'wagmi/chains'
import { base, goerli, mainnet, optimism, polygon, zora } from 'wagmi/chains'
import { publicProvider } from 'wagmi/providers/public'
import env from 'helpers/env'

const { chains, publicClient } = configureChains(
[mainnet, polygon, base, zora, goerli],
[mainnet, polygon, base, zora, goerli, optimism],
[
alchemyProvider({ apiKey: env.VITE_ALCHEMY_MAINNET }),
alchemyProvider({ apiKey: env.VITE_ALCHEMY_POLYGON }),
alchemyProvider({ apiKey: env.VITE_ALCHEMY_BASE }),
alchemyProvider({ apiKey: env.VITE_ALCHEMY_GOERLI }),
alchemyProvider({ apiKey: env.VITE_ALCHEMY_OPTIMISM }),
publicProvider(),
]
)
Expand Down
1 change: 1 addition & 0 deletions src/helpers/chainIdToBaseBlockExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export default {
8453: 'https://basescan.org',
7777777: 'https://explorer.zora.energy',
5: 'https://goerli.etherscan.io',
10: 'https://optimistic.etherscan.io',
} as { [index: number]: string | undefined }
1 change: 1 addition & 0 deletions src/helpers/chainIdToContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export default {
8453: env.VITE_CONTRACT_ADDRESS_BASE,
7777777: env.VITE_CONTRACT_ADDRESS_ZORA,
5: env.VITE_CONTRACT_ADDRESS_GOERLI,
10: env.VITE_CONTRACT_ADDRESS_OPTIMISM,
} as { [index: number]: string | undefined }
1 change: 1 addition & 0 deletions src/helpers/chainIdToName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export default {
8453: 'Base',
7777777: 'Zora',
5: 'Goerli',
10: 'Optimism',
} as { [index: number]: string | undefined }
1 change: 1 addition & 0 deletions src/helpers/chainIdToProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export default {
8453: new AlchemyProvider(8453, env.VITE_ALCHEMY_BASE),
7777777: new JsonRpcProvider('https://rpc.zora.energy'),
5: new AlchemyProvider(5, env.VITE_ALCHEMY_GOERLI),
10: new AlchemyProvider(10, env.VITE_ALCHEMY_OPTIMISM),
} as { [index: number]: Provider | undefined }
2 changes: 2 additions & 0 deletions src/helpers/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ export default cleanEnv(import.meta.env, {
VITE_ALCHEMY_POLYGON: str(),
VITE_ALCHEMY_BASE: str(),
VITE_ALCHEMY_GOERLI: str(),
VITE_ALCHEMY_OPTIMISM: str(),
VITE_CONTRACT_ADDRESS_MAINNET: str(),
VITE_CONTRACT_ADDRESS_POLYGON: str(),
VITE_CONTRACT_ADDRESS_BASE: str(),
VITE_CONTRACT_ADDRESS_ZORA: str(),
VITE_CONTRACT_ADDRESS_GOERLI: str(),
VITE_CONTRACT_ADDRESS_OPTIMISM: str(),
})

0 comments on commit 3ccc896

Please sign in to comment.