An open-source mobile toolkit for building decentralized applications (dApps) on Starknet. The React Native counterpart to Scaffold Stark 2 — same developer experience, built for iOS and Android.
Built using Expo, starknet.js, Scarb, Starknet Foundry, and NativeWind (TailwindCSS).
- Contract Fast Reload — Your app auto-adapts to your smart contracts as you deploy them.
- Custom Hooks — Type-safe React hooks for reading, writing, and subscribing to Starknet contracts, mirroring the Scaffold Stark 2 web hooks.
- Debug Contracts Screen — Inspect and interact with every function on your deployed contracts directly from the app.
- Wallet-as-a-Service — Seamless onboarding with Cavos Aegis for Sepolia and Mainnet.
- Burner Wallet — Instant devnet testing without external wallet setup.
- NativeWind Styling — Write TailwindCSS classes in React Native via NativeWind.
| Feature | Scaffold Stark 2 (Web) | Scaffold Stark RN (Mobile) |
|---|---|---|
| Framework | Next.js | Expo (React Native) |
| Styling | TailwindCSS | NativeWind (TailwindCSS) |
| Wallet Connection | Browser wallets (Argent, Braavos) | Cavos Aegis (WaaS) + Burner |
| Hook API | useScaffoldReadContract, etc. |
Identical API signatures |
| Contract Debugging | /debug page |
Debug tab in-app |
| Smart Contracts | Scarb + Starknet Foundry | Same (shared snfoundry workspace) |
| Deployment | Vercel / static hosting | App Store / Play Store via EAS |
| Scaffolder CLI | npx create-stark@latest |
npx create-stark-rn@latest |
The smart contract workspace (packages/snfoundry) is shared — if you've used Scaffold Stark 2 before, the contract development workflow is identical.
| Tool | Version | Purpose |
|---|---|---|
| Node.js | >= v24 | Runtime (recommend nvm) |
| Yarn | v3+ (or v1 classic) | Package manager |
| Git | Latest | Version control |
| Tool | Version | Purpose |
|---|---|---|
| Scarb | 2.16.0 | Cairo package manager and build toolchain |
| Starknet Foundry | 0.57.0 | Testing and deployment toolchain |
| Starknet Devnet | 0.7.2 | Local Starknet node |
| asdf | Latest | Version manager for the above tools |
Install all Starknet tools at once with starkup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.starkup.sh | shThen pin the exact versions this project requires:
asdf installThis reads .tool-versions in the repo root and installs the correct Scarb, Starknet Foundry, and Devnet versions.
Manual version pinning (if asdf install doesn't work)
# Scarb
asdf install scarb 2.16.0 && asdf set scarb 2.16.0
# Starknet Foundry
asdf install starknet-foundry 0.57.0 && asdf set starknet-foundry 0.57.0
# Starknet Devnet
asdf install starknet-devnet 0.7.2 && asdf set starknet-devnet 0.7.2Verify:
scarb --version # 2.16.0
snforge --version # 0.57.0
starknet-devnet --version # 0.7.2You need at least one of the following to run the app:
-
Install Xcode from the Mac App Store.
-
Install Xcode Command Line Tools: Xcode > Settings > Locations > Command Line Tools (select the most recent version in the dropdown).
-
Install an iOS Simulator: Xcode > Settings > Components > iOS.
-
Install Watchman:
brew update && brew install watchman
-
Install Android Studio.
-
In Android Studio, go to Settings > Languages & Frameworks > Android SDK. From the SDK Platforms tab, select the latest Android version (API level).
Then click the SDK Tools tab and make sure you have at least one version of the Android SDK Build-Tools and Android Emulator installed.
-
Add to your shell profile (
~/.zshrcor~/.bashrc):export ANDROID_HOME=$HOME/Library/Android/sdk # adjust for Linux export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools
-
Reload your shell:
source ~/.zshrc -
Create a virtual device: Android Studio > Virtual Device Manager > Create Device.
Choose a hardware profile (the newest Pixel is a good default):
Install Expo Go from the App Store or Google Play. When you start the dev server, scan the QR code with your camera (iOS) or Expo Go (Android).
npx create-stark-rn@latest
cd my-mobile-dapp
yarn installgit clone https://github.com/Scaffold-Stark/scaffold-stark-rn.git
cd scaffold-stark-rn
yarn installOpen three terminal windows and run:
Terminal 1 — Start the local Starknet devnet:
yarn chainTerminal 2 — Deploy the sample contracts:
yarn deployTerminal 3 — Launch the app:
# iOS Simulator
yarn start:ios
# Android Emulator
yarn run start -- --android
# Or start the Expo dev server and choose from the menu
yarn startThe app connects to devnet by default. Edit files inside packages/rn/app/ to start building — the project uses file-based routing.
import { useScaffoldReadContract } from "@/hooks/scaffold-stark";
const { data, isLoading } = useScaffoldReadContract({
contractName: "YourContract",
functionName: "get_balance",
args: ["0x123..."],
});import { useScaffoldWriteContract } from "@/hooks/scaffold-stark";
const { sendAsync, isLoading } = useScaffoldWriteContract({
contractName: "YourContract",
functionName: "transfer",
args: [recipientAddress, amount],
});
// Call it from a button press
<Button title="Transfer" onPress={() => sendAsync()} disabled={isLoading} />import { useScaffoldMultiWriteContract } from "@/hooks/scaffold-stark";
const { sendAsync } = useScaffoldMultiWriteContract({
calls: [
{ contractName: "Token", functionName: "approve", args: [spender, amount] },
{ contractName: "Vault", functionName: "deposit", args: [amount] },
],
});import { useDeployedContractInfo } from "@/hooks/scaffold-stark";
const { data, status } = useDeployedContractInfo("YourContract");
// status: "LOADING" | "DEPLOYED" | "NOT_FOUND"
// data?.address, data?.abiimport { useScaffoldStrkBalance } from "@/hooks/scaffold-stark";
const { value, formatted, isLoading } = useScaffoldStrkBalance({
address: "0x123...",
});import { useScaffoldEventHistory } from "@/hooks/scaffold-stark";
const { data: events, isLoading } = useScaffoldEventHistory({
contractName: "YourContract",
eventName: "Transfer",
fromBlock: 0n,
});Copy the example env files and fill in your values:
# Automatically copied on yarn install for snfoundry
# For the RN app:
cp packages/rn/.env.example packages/rn/.env| Variable | Description |
|---|---|
EXPO_PUBLIC_AEGIS_APP_ID |
Your Cavos Aegis app ID for Sepolia/Mainnet wallets |
EXPO_PUBLIC_AVNU_API_KEY |
AVNU API key for gasless transaction sponsoring |
| Variable | Description |
|---|---|
PRIVATE_KEY_SEPOLIA |
Deployer private key for Sepolia testnet |
ACCOUNT_ADDRESS_SEPOLIA |
Deployer account address for Sepolia |
RPC_URL_SEPOLIA |
Sepolia RPC endpoint |
PRIVATE_KEY_MAINNET |
Deployer private key for Mainnet |
ACCOUNT_ADDRESS_MAINNET |
Deployer account address for Mainnet |
RPC_URL_MAINNET |
Mainnet RPC endpoint |
After updating .env files, restart the dev server so Expo picks up the new values.
| Command | Description |
|---|---|
yarn install |
Install all dependencies |
yarn chain |
Start local Starknet devnet (seed 0) |
yarn deploy |
Compile and deploy contracts to devnet |
yarn deploy:clear |
Clear previous deployments and redeploy |
yarn start |
Start Expo dev server |
yarn start:ios |
Start Expo and open iOS Simulator |
yarn compile |
Compile Cairo contracts |
yarn test |
Run smart contract tests (snforge) |
yarn test:rn |
Run React Native unit tests (Jest) |
yarn format |
Format all code (Prettier + Scarb) |
scaffold-stark-rn/
packages/
rn/ # React Native (Expo) app
app/ # File-based routes (Expo Router)
(tabs)/ # Tab navigator screens
hooks/scaffold-stark # Contract interaction hooks
utils/scaffold-stark # Utilities and helpers
components/ # Reusable UI components
snfoundry/ # Smart contracts workspace
contracts/ # Cairo contracts
scripts-ts/ # Deployment scripts
deployments/ # Generated deployment artifacts
See SUBMIT.md for the full guide on building and submitting with EAS Build and EAS Submit.
Full documentation — including hook references, mobile-specific considerations, and more recipes — is available at:
docs.scaffoldstark.com/react-native
We welcome contributions. Please open an issue or pull request on GitHub.
MIT




