Skip to content

Commit

Permalink
Merge pull request #1334 from decent-dao/fix/wallet-connect-app-reload
Browse files Browse the repository at this point in the history
Wagmi v1 / WalletConnect v2 upgrade
  • Loading branch information
mudrila authored Jan 31, 2024
2 parents 9bf5265 + 48f26f1 commit dbe4563
Show file tree
Hide file tree
Showing 64 changed files with 6,012 additions and 4,439 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NEXT_PUBLIC_ALCHEMY_API_KEY=""
NEXT_PUBLIC_ALCHEMY_GOERLI_API_KEY=""
NEXT_PUBLIC_ALCHEMY_SEPOLIA_API_KEY=""
# automated testing workflows
NEXT_PUBLIC_ALCHEMY_TESTING_API_KEY=""
# ABI selector (*)
Expand All @@ -12,5 +12,6 @@ NEXT_PUBLIC_INFURA_IPFS_API_KEY=""
NEXT_PUBLIC_INFURA_IPFS_API_SECRET=""
# site preview links
NEXT_PUBLIC_SITE_URL="https://app.dev.fractalframework.xyz/"
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=""
# Shutter Public Key
NEXT_PUBLIC_SHUTTER_EON_PUBKEY=0x0e6493bbb4ee8b19aa9b70367685049ff01dc9382c46aed83f8bc07d2a5ba3e6030bd83b942c1fd3dff5b79bef3b40bf6b666e51e7f0be14ed62daaffad47435265f5c9403b1a801921981f7d8659a9bd91fe92fb1cf9afdb16178a532adfaf51a237103874bb03afafe9cab2118dae1be5f08a0a28bf488c1581e9db4bc23ca
2 changes: 1 addition & 1 deletion .graphclientrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sources:
- name: fractal
handler:
graphql:
endpoint: https://api.studio.thegraph.com/query/43215/fractal-{context.chainName:goerli}/version/latest
endpoint: https://api.studio.thegraph.com/query/43215/fractal-{context.chainName:sepolia}/version/latest

documents:
- ./src/graphql/DAO.graphql
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import graphQLClient from '../src/graphql';
import { FractalErrorBoundary, initErrorLogging } from '../src/helpers/errorLogging';
import { AppProvider } from '../src/providers/App/AppProvider';
import { NetworkConfigProvider } from '../src/providers/NetworkConfig/NetworkConfigProvider';
import { chains, wagmiClient } from '../src/providers/NetworkConfig/rainbow-kit.config';
import { chains, wagmiConfig } from '../src/providers/NetworkConfig/rainbow-kit.config';

export default function RootLayout({ children }: { children: ReactNode }) {
useEffect(() => {
Expand Down Expand Up @@ -95,7 +95,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
resetCSS
>
<FractalErrorBoundary fallback={<ErrorFallback />}>
<WagmiConfig client={wagmiClient}>
<WagmiConfig config={wagmiConfig}>
<RainbowKitProvider
chains={chains}
modalSize="compact"
Expand Down
25 changes: 1 addition & 24 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useRouter } from 'next/navigation';
import { useEffect } from 'react';
import { useTranslation } from 'react-i18next';
import { useNetwork } from 'wagmi';
import { goerli, mainnet, sepolia } from 'wagmi/chains';
import { mainnet, sepolia } from 'wagmi/chains';
import { AppFooter } from '../src/components/pages/AppHome/AppFooter';
import { CTABox } from '../src/components/pages/AppHome/CTABox';
import FeaturedDAOCard from '../src/components/pages/AppHome/FeaturedDAOCard';
Expand Down Expand Up @@ -45,29 +45,6 @@ interface Feature {

// featured DAOs are dependent on the connected chain
const FEATURED_DAOS = new Map<number, Feature[]>([
[
goerli.id,
[
{
iconSrc: '/images/icon-decent.svg',
titleKey: 'decentTitle',
descKey: 'decentDesc',
address: '0x8202E3cBa328CCf3eeA5bF0A11596c5297Cf7525',
},
{
iconSrc: '/images/icon-awakevc.svg',
titleKey: 'awakeTitle',
descKey: 'awakeDesc',
address: '0x36C19472D4CA942710cA9aF01a03cED4dBc6eC0a',
},
{
iconSrc: ethLizardsLogo.src,
titleKey: 'ethlizardsTitle',
descKey: 'ethlizardsDesc',
address: '0x167bE4073f52aD2Aa0D6d6FeddF0F1f79a82B98e',
},
],
],
[
mainnet.id,
[
Expand Down
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A pretty simply configured Hardhat node. Setup files are in the directory, `./do
```
- `Dockerfile` see comments in file. Creation script for blockchain Docker container
- `entrypoint.sh` executes the package.json script to start.
- `hardhat.config.js` sets the hardhat node to specific chain id and runs node forked from Goerli and latest block
- `hardhat.config.js` sets the hardhat node to specific chain id and runs node forked from Sepolia and latest block
- `hardhat.package.json` with `hardhat` and `dotenv` libraries

### Webapp
Expand All @@ -36,9 +36,9 @@ You'll also need to have the Docker software installed on your computer and runn

#### Alchemy API key

The blockchain container forks Goerli, to be able to do this an Alchemy API key is needed.
The blockchain container forks Sepolia, to be able to do this an Alchemy API key is needed.

You'll need to get a free Alchemy API key for a Goerli project from https://www.alchemy.com/.
You'll need to get a free Alchemy API key for a Sepolia project from https://www.alchemy.com/.

Once obtained, create a `.env.tests.local` file in `./docker/` directory. Add your Alchemy API key to an env variable `ALCHEMY_API_KEY` as shown in `./docker/.env.tests`. see https://hardhat.org/hardhat-network/docs/guides/forking-other-networks for more information on forking.

Expand Down
2 changes: 1 addition & 1 deletion docker/blockchain/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require('dotenv').config()
hardhat: {
chainId: 31337,
forking: {
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_TESTING_API_KEY}`,
url: `https://eth-sepolia.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_TESTING_API_KEY}`,
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion docs/NETWORK_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Fractal currently supports:

- [Ethereum Mainnet](https://ethereum.org)
- [Polygon Mainnet](https://polygon.technology/)
- [Goerli Testnet](https://goerli.net/)
- Sepolia Testnet

It is possible to easily deploy Fractal on any EVM chain that has [Safe{Wallet}](https://safe.global/wallet), [Wagmi](https://www.npmjs.com/package/@wagmi/chains), and [Graph](https://thegraph.com) support.

Expand Down
Loading

0 comments on commit dbe4563

Please sign in to comment.