This repo will help you get started building a SUAPP with a modern frontend.
We recommend using node v20.10.0 and npm v10.2.3:
$ git clone --recurse-submodules [email protected]:andytudhope/build-a-suapp-next-ts.git suapp
$ cd suapp
$ yarn
You should now be able to compile (and deploy) your contract with:
$ yarn contracts:build
If you need to get SUAVE, simply run:
curl -L https://suaveup.flashbots.net | bash
And start a local node with:
suave-geth --suave.dev --suave.eth.external-whitelist='*'
With SUAVE running locally,deploy your contracts with:
yarn contracts:deploy
Copy the deployed address in packages/next/constants/addresses.tsx
.
Start the frontend with:
yarn fe:dev
- Confidential Compute Requests (CCRs) on SUAVE do not work with wallets that implement the EIP-1193 Javascript API. Therefore, we use the unsafe
eth_sign
method to sign CCRs, which does work, but requires that you enable this functionality in wallets like MetaMask.- To do so in MetaMask, go to "Settings" -> "Advanced" -> scroll to bottom -> switch Eth_sign requests on.
- This template assumes that you are running SUAVE locally and have your browser wallet connected to
localhost:8545
. - No tests are included in
forge
. - If you want to pirate ready-to-use typescript components for your frontend, we recommend you do so from scaffold-eth2.