Skip to content

Commit

Permalink
Rainbowkit added. Set up forked topos in hardhat (#6)
Browse files Browse the repository at this point in the history
* Set up Nextjs project

* Rainbowkit added. Set up forked topos in hardhat

* Removed package-lock.json
  • Loading branch information
Jovells authored Oct 31, 2023
1 parent 4e321f5 commit 02fc40a
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 4,361 deletions.
9 changes: 8 additions & 1 deletion blockchain/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ const config: HardhatUserConfig = {
incal: {
url: 'https://rpc.incal.testnet-1.topos.technology',
accounts: [process.env.PRIVATE_KEY as string || crypto.randomBytes(32).toString('hex')]
}
},
hardhat:{
forking:{
url: 'https://rpc.topos-subnet.testnet-1.topos.technology',
blockNumber: 610_535
}
},

},
gasReporter: {
enabled: true
Expand Down
4 changes: 4 additions & 0 deletions frontend/nextjs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# Miscellaneous
package-lock.json
yarn.lock
36 changes: 36 additions & 0 deletions frontend/nextjs/emt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
const { getDefaultWallets } = require("@rainbow-me/rainbowkit");
import { configureChains, createConfig } from 'wagmi';
import {
hardhat, mainnet
} from 'wagmi/chains';
import { publicProvider } from 'wagmi/providers/public';

/* @todo: define topos chains
https://wagmi.sh/react/chains#build-your-own
const topos...
*/

const { chains, publicClient } = configureChains(
[hardhat,
mainnet
// @todo: add topos chain
],
[
publicProvider()
]
);

const { connectors } = getDefaultWallets({
appName: 'My RainbowKit App',
projectId: 'YOUR_PROJECT_ID',
chains
});

const wagmiConfig = createConfig({
autoConnect: true,
connectors,
publicClient
})

export const emtChains = chains
export const emtWagmiConfig = wagmiConfig
Loading

0 comments on commit 02fc40a

Please sign in to comment.