Before you begin, you need to install the following tools:
- Yarn (v1 or v2+)
- Git
- React Native
- Yeet CLI
To get started, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/dewdrip/dispas-mobile.git
cd dispas-mobile
yarn install
cd packages/reactnative
npx pod-install
-
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.
Alternatively, you can use Ganache to persist the blockchain state during development
- 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_KEYandlocalhost.provider(port 8545) variables inpackages/reactnative/ethmobile.config.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 DebugContracts tab. You can configure your supported networks in packages/reactnative/ethmobile.config.ts.
Run smart contract test with yarn hardhat:test
- Edit your smart contract
YourContract.solinpackages/hardhat/contracts - Edit your frontend in
packages/reactnative/src/screens - Edit your deployment scripts in
packages/hardhat/deploy
We welcome contributions to ETH Mobile!
Please see CONTRIBUTING.MD for more information and guidelines for contributing to ETH Mobile.
