🧪 An open-source, up-to-date toolkit for building decentralized applications (dapps) on the Ethereum blockchain. It's designed to make it easier for developers to create and deploy smart contracts and build user interfaces that interact with those contracts.
⚙️ Built using React Native, Hardhat, Wagmi, Viem, and Typescript.
- 💳 In-Built Wallet: A safe and secure crypto wallet to manage funds, sign transactions and messages on multiple EVM compatible chains.
- ✅ Contract Hot Reload: Your frontend auto-adapts to your smart contract as you edit it.
- 🪝 Custom hooks: Collection of React hooks to simplify interactions with smart contracts with typescript autocompletion.
- 🧱 Components: Collection of common web3 components to quickly build your frontend.
Before you begin, you need to install the following tools:
- Yarn (v1 or v2+)
- Git
- React Native
To get started with Scaffold-ETH 2, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/ValentineCodes/scaffold-eth-react-native.git
cd scaffold-eth-react-native
yarn install && yarn patch-ethers
cd packages/reactnative
npx pod-install
Remember to run yarn patch-ethers
to patch ethers after installing any package
-
Connect your device to your computer via WIFI-HOTSPOT
-
Run a local network in the first terminal
yarn chain
This command starts a local Ethereum network hosted on your local IP address. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in hardhat.config.ts
.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in packages/hardhat/contracts
and can be modified to suit your needs. The yarn deploy
command uses the deploy script located in packages/hardhat/deploy
to deploy the contract to the network. You can also customize the deploy script.
- Set the
ALCHEMY_KEY
andLOCAL_PROVIDER
(port 8545) variables inpackages/reactnative/src/utils/constants.ts
ipconfig getifaddr en0
ipconfig
-
Connect your device via USB or Run an emulator
-
Run on device:
yarn android
yarn ios
- Import one of the funded accounts in your local blockchain into your wallet to have funds for testing
You can interact with your smart contract using the Debug Contracts
tab. You can tweak the app config in packages/reactnative/scaffold.config.ts
.
Run smart contract test with yarn hardhat:test
- Edit your smart contract
YourContract.sol
inpackages/hardhat/contracts
- Edit your frontend in
packages/reactnative/src/screens
- Edit your deployment scripts in
packages/hardhat/deploy
We welcome contributions to Scaffold-ETH!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to Scaffold-ETH.