This demo is adapted from Solana Mobile DApp Scaffold for the tutorial Token-gating Saga Genesis Token. This demo is a mobile dApp development tutorial using Helius DAS API and React Native to token-gate a collection. Follow the tutorial on the Helius Blog.
Install v20.9.0 NodeJS to use yarn.
Install the Android SDK tool and set the ANDROID_HOME variable.
Configure a Saga/Android for mobile development: In settings, tap the Build Number option 7 times until the โYou are now a developer!โ pop-up is visible. Search and enable Developer Options and enable USB Debugging in the same dropdown.
Open the repository in a code editor and bring up a terminal.
cd app/
Install the app in the app directory.
yarn
Make sure your phone is connected with USBC, debugging is turned on, and run the following command.
yarn react-native run-android
To set up token-gating with the DAS API, head to util/findSagaGenesisToken.ts and populate your Helius API key. Heads up, the request will not work without an API key, get one for free here.