The starknet Dart package (v0.2.0) has incomplete V3 transaction support (missing l1_data_gas field), and all free public RPC endpoints either:
- Require V3 transactions (Alchemy)
- Are deprecated (BlastAPI)
- Have DNS/compatibility issues (Nethermind, Lava)
# Using Docker (recommended)
docker pull shardlabs/starknet-devnet-rs:latest
# OR using cargo
cargo install starknet-devnet# Using Docker
docker run -p 5050:5050 shardlabs/starknet-devnet-rs:latest
# OR using cargo
starknet-devnet --host 0.0.0.0 --port 5050-
Update
lib/config/constants.dart:static const String rpcUrl = 'http://YOUR_COMPUTER_IP:5050';
Replace
YOUR_COMPUTER_IPwith your computer's local IP address (e.g.,192.168.1.100) -
Deploy your contract to devnet (you'll need to redeploy since it's a fresh network)
-
Fund your deployer account using devnet's predeployed accounts
# On macOS/Linux
ifconfig | grep "inet " | grep -v 127.0.0.1
# On Windows
ipconfig- Sign up at https://www.infura.io/
- Create a new Starknet project
- Get your API key
- Update RPC URL to:
https://starknet-sepolia.infura.io/v3/YOUR_API_KEY
Note: Infura may also require V3 transactions, so local devnet is the most reliable option.