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/
Running the app
- using only single .env file
- .env file at project root is required.
-
print all the basic project commands
yarn scafold:help
-
install foundry and project dependencies
yarn install yarn setup
it will install or update foundry
-
start a foundry node
open a new command prompt
yarn chain
-
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
-
deploy on vercel.
yarn vercel:deploy
## (login vercel at first time)
-
this template requires .env file rename .env.example file to .env file and add required id's
-
define created contracts inside
packages/foundry-ts/configs/index.ts
DEPLOY_CONTRACTS array -
write test cases inside test folder follow foundry doc
-
installing forge packages follow forge doc
- 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
- 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
- load a contract with hook
- to load a contract inside a component use useAppLoadContract() hook defined inside
packages/hooks/useAppLoadContract
- to deploy web app on vercel.
- run
yarn vercel:deploy
- fill up the vercel credentials and push the site
Everything you need to build on Ethereum! 🚀 Quickly experiment with Solidity using a frontend that adapts to your smart contract:
- 🔏 Edit your smart contract
YourContract.sol
inpackages/foundry-ts/src
- 📝 Start Editing your frontend at
packages/next-ts/pages
- 💼 Update
DEPLOY_CONTRACTS
array you want to deploy atpakages/foundry-ts/config/index.ts
- 📱 Open http://localhost:3000 to see the app
- 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!
Register as a builder here and start on some of the challenges and build a portfolio.
Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io
Eth-hooks documentation is here. Learn how to use the contexts here.
Read the docs: https://docs.soliditylang.org
Go through each topic from solidity by example editing YourContract.sol
in 🏗 scaffold-eth
Check out all the active branches, open issues, and join/fund the 🏰 BuidlGuidl!
Follow the full Ethereum Speed Run
Join the telegram support chat 💬 to ask questions and find others building with 🏗 scaffold-eth!
Please check out our Gitcoin grant too!
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.