• This repository has been archived on 07/Jun/2024
  • Stars
    star
    186
  • Rank 207,316 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Typescript version of Scaffold-Eth πŸ—

πŸ— Scaffold-Eth Typescript

Features

This is the typescript repo of scaffold-eth. Use scaffold-eth-typescript with:

  • A react frontend running with nextjs or vite.
  • Solidity toolkit of hardhat or foundry
  • It has the a command line system that allows you to choose a react frontend or solidity toolkit

Quick Start

Fork or clone the repo

  • You can use the use the template link: scaffold-eth-typescript template
  • You can clone the repo with git
    git clone https://github.com/scaffold-eth/scaffold-eth-typescript.git

Starting the App

Running the app

  1. install your dependencies, open a new command prompt

    yarn install
  2. Create a default scaffold.config.json configuration file

    yarn create-config
  3. start a local hardhat node (chain)

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

    # in a new terminal
    # compile your contracts
    yarn compile
    # deploy your hardhat contracts
    yarn deploy
    # start the react app (vite)
    yarn start
  5. Open http://localhost:3000 to see your front end

Configuration

Scaffold uses scaffold.config.json as a configuration file located in /packages/common/scaffold.config.json. You can create the config file by running the command yarn create-config.

Command line help

use `-h` with any command for help.  e.g. yarn set-react -h

Configure react and solidity toolkit

You can change the configuration file to pick different frontends and solidity toolkits.

yarn set-react `nextjs` or `vite`
yarn set-solidity `hardhat` or `foundry`

Target network

Set your targetNetwork in the config. This is the network the solidity toolkit is deploying against.

Set your availableNetworks in the config. This is the networks the frontend is available in.

You can configure it from the config file or from command line.

yarn set-network -h
yarn set-network 'localhost' 'localhost, mainnet'

More commands

You can see all the other commands by using yarn scaffold

Solidity Tookits Details

Hardhat

Everything will be installed with yarn install.

You can use hardhat with right context using

yarn hardhat

Foundry

Make sure you install foundry

  1. Make sure you install foundry first. Use curl -L https://foundry.paradigm.xyz | bash to install foundryup

    You can see more details here. https://book.getfoundry.sh/getting-started/installation

  2. Run yarn install:foundry to install or update foundry in the right folder. It will also run forge install automatically with the right context.

You can use foundry commands with the right context

yarn forge
yarn anvil
yarn cast

Directories

The directories that you'll use are:

packages/solidity-ts/

And one of either:
packages/vite-app-ts/
packages/next-app-ts/

More Info

Other commands

# rebuild all contracts, incase of inconsistent state
yarn contracts:clean
yarn contracts:build
# run hardhat commands for the workspace, or see all tasks
yarn hardhat 'xxx'
# run forge, anvil or
yarn forge
yarn anvil
yarn cast

Other folders

# for subgraph checkout README.md in following directories
packages/subgraph/
packages/services/

Guides

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/solidity-ts/contracts
  • πŸ“ Edit your frontend MainPage.tsx in packages/vite-app-ts/src
  • πŸ’Ό Edit your deployment scripts in packages/solidity-ts/deploy/hardhat-deploy
  • πŸ“± Open http://localhost:3000 to see the app
  • πŸ‘·πŸ½β€β™‚οΈ run yarn hardhat to get a list of all the tasks. Run yarn hardhat taskname to run the task.





Documentation

Check out eth-hooks docs for example of how to use hooks

Video Tutorials

Tutorial using the CLI

Eth-hooks v4 & scaffold-eth-typescript overview

πŸƒπŸ’¨ Speedrun Ethereum

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

🏁 Make sure to click on the typescript tab!





Extra!

πŸ’¬ Support Chat

Join the telegram support chat πŸ’¬ to ask questions and find others building with πŸ— scaffold-eth!

πŸ›  Buidl

Check out

πŸ™πŸ½ Support us!

Please check out our Gitcoin grant too!

More Repositories

1

scaffold-eth

πŸ— forkable Ethereum dev stack focused on fast product iterations
CSS
9,055
star
2

scaffold-eth-2

Open source forkable Ethereum dev stack
TypeScript
1,365
star
3

scaffold-eth-challenges

Scaffold-Eth πŸ— Challenges repository
644
star
4

eth-ui

πŸ–‡ React library of commonly used Ethereum hooks
TypeScript
437
star
5

scaffold-eth-examples

Scaffold-Eth πŸ— examples repo
CSS
213
star
6

eth-components

πŸ“¦ React library of commonly used Ethereum components
TypeScript
123
star
7

se-2-challenges

SpeedRunEthereum challenges (Powered by Scaffold-ETH 2)
82
star
8

punk-wallet

πŸ§‘β€πŸŽ€-punk-wallet
JavaScript
32
star
9

scaffold-eth-typescript-challenges

All of our typescript challenges ported over from the javascript world
27
star
10

Scaffold-ETH-DeFi-Challenges

Solidity
27
star
11

buidlguidl-v3

JavaScript
19
star
12

OP-RetroPGF3-Discovery-Voting

Create the voting and discovery process for OP retroactive public goods funding for badgeholders
TypeScript
14
star
13

se-2-docs

Documentation site for Scaffold-ETH 2
JavaScript
13
star
14

scaffold-eth-docs

πŸ“‘. Document repository for Scaffold-Eth πŸ—
10
star
15

eth-services

🚚 services eventually hoisted from scaffold-eth
7
star
16

buidlguidl.com

(OLD) The home of the Buidl Guidl 🏰
JavaScript
6
star
17

scaffold-eth-expo

Scaffold-ETH + Expo starter kit
JavaScript
5
star
18

SablierV2_starterKit

Let’s build a starter kit in se2 where someone who is building a protocol that needs streaming can fork our starter kit and have Sablier v2 with some cool vesting curve and other cool v2 features
TypeScript
5
star
19

scaffold-eth-typescript-examples

TypeScript
2
star
20

Punk-Wallet-Mobile

iOS/Android version on Punk Wallet πŸ§‘β€πŸŽ€
JavaScript
2
star
21

hardhat-tasks

Hardhat tasks library
2
star
22

eth-headless

TypeScript
1
star
23

scaffold-eth-next-js

1
star
24

scaffold-eth-moonstarter

A scaffold-eth starter build with typescript, nextjs, chakra ui, eth-hooks
TypeScript
1
star
25

eth-contract-warehouse

TypeScript
1
star
26

scaffoldeth.io

Scaffold-ETH 2 landing page
TypeScript
1
star