- Android emulator (Android Studio, IntelliJ IDEA, etc.)
- starknet-devnet-rs
- Install
starknet-devnet-rs
. Since it has yet to be released, you will need to build it manually:git clone https://github.com/0xSpaceShard/starknet-devnet-rs.git starknet-devnet-rs cd starknet-devnet-rs cargo build --release export DEVNET_PATH=$(pwd)/target/release/starknet-devnet
- Run devnet with specific parameters on your host machine:
$DEVNET_PATH --host 127.0.0.1 --port 5050 --seed 1053545547
- Run the
MainActivity
on the emulator.
Running the demo on a network other than devnet (Mainnet/Testen/Integration) requires some tweaks to be made.
- Android emulator (Android Studio, IntelliJ IDEA, etc.)
- URL of a Starknet RPC node.
- Account deployed on said network with some funds on it. If you're using Sepolia testnet, you can obtain some funds from the faucet.
- A valid configuration that consists of the data above:
DEMO_RPC_URL
- RPC node URLDEMO_ACCOUNT_ADDRESS
- account addressDEMO_ACCOUNT_PRIVATE_KEY
- account private key
- Set a config with your data. To do so, you can modify build.gradle.kts:
android { ... defaultConfig { ... buildConfigField("String", "DEMO_RPC_URL", "\"http://example-node-url.com/rpc\"") buildConfigField("String", "DEMO_ACCOUNT_ADDRESS", "\"0x123456789\"") buildConfigField("String", "DEMO_PRIVATE_KEY", "\"0x123\"") } } }
- Run the
MainActivity
on the emulator.