Skip to content

Naim-Bijapure/feedback-loop

Repository files navigation

🏗 Scaffold-Eth-next Typescript

Typescript

This is the typescript repo of scaffold.eth with foundry, rainbowkit , wagmi hooks and nextjs.

The directories that you'll use are:

packages/next-ts/
packages/foundry-ts/

Quick Start

Running the app

NOTE !! : Rename .env.example file to .env file

  • using only single .env file
  • .env file at project root is required.
  1. print all the basic project commands

    yarn scafold:help
  2. install foundry and project dependencies

    yarn install
    
    yarn setup

    it will install or update foundry

  3. start a foundry node open a new command prompt

    yarn chain
  4. run the app, open a new command prompt

    # build foundry & external contracts types
    yarn contracts:build
    # deploy your foundry contracts
    yarn deploy --network xx (without --network it will deploy on localhost)
    # start the app
    yarn dev
  5. deploy on vercel.

 yarn vercel:deploy
 ## (login vercel  at first time)

Template Configurations

Foundry configs
  1. this template requires .env file rename .env.example file to .env file and add required id's

  2. define created contracts inside packages/foundry-ts/configs/index.ts DEPLOY_CONTRACTS array 2022-06-12_23-01

  3. write test cases inside test folder follow foundry doc

  4. installing forge packages follow forge doc

Front end configs
  1. contract setup go inside packages/next-ts/components/configs/appContract.config.ts file
  • inside appContract.config.ts file add your contract json, and typechain factory module
  1. target networks setup
  • to define rainbow kit targeted networks inside .env file

  • deployed contract's json file saved as foundry_contracts.json file inside contracts dirctory

  1. load a contract with hook
  • to load a contract inside a component use useAppLoadContract() hook defined inside packages/hooks/useAppLoadContract 2022-06-12_23-20
  1. to deploy web app on vercel.
  • run yarn vercel:deploy
  • fill up the vercel credentials and push the site

Overview

Everything you need to build on Ethereum! 🚀 Quickly experiment with Solidity using a frontend that adapts to your smart contract:

image

  • 🔏 Edit your smart contract YourContract.sol in packages/foundry-ts/src
  • 📝 Start Editing your frontend at packages/next-ts/pages
  • 💼 Update DEPLOY_CONTRACTS array you want to deploy at pakages/foundry-ts/config/index.ts
  • 📱 Open http://localhost:3000 to see the app

Guides

  • Check out wagmi hooks docs for example of how to use hooks
  • you can look at speedrun ethereum to get started with scaffold-eth-typescript and web3.
    • 🏁 Make sure to click on the typescript tab!

🏃💨 Speedrun Ethereum

Register as a builder here and start on some of the challenges and build a portfolio.

More Information!

📚 Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

Eth-hooks documentation is here. Learn how to use the contexts here.

🔭 Learning Solidity

Read the docs: https://docs.soliditylang.org

Go through each topic from solidity by example editing YourContract.sol in 🏗 scaffold-eth

🛠 Buidl

Check out all the active branches, open issues, and join/fund the 🏰 BuidlGuidl!

Follow the full Ethereum Speed Run

💬 Support Chat

Join the telegram support chat 💬 to ask questions and find others building with 🏗 scaffold-eth!

🙏🏽 Support us!

Please check out our Gitcoin grant too!

🔐 P.S.About keys

You need an RPC and API keys for testnets and production deployments, create an Alchemy account and replace the value of ALCHEMY_KEY = xxx in packages/vite-app-ts/.env with your new keys.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published