General
Is NEAR Playground free?
Is NEAR Playground free?
Yes! NEAR Playground is completely free. Testnet deployments cost nothing - we fund the accounts for you.Mainnet deployments require your own NEAR tokens.
Do I need to install anything?
Do I need to install anything?
No. NEAR Playground runs entirely in your browser. Just visit nearplay.app and start coding.
Is my code saved?
Is my code saved?
Yes. Your code auto-saves as you type and is stored in your account. You can close the browser and come back later.
Compilation
Why is compilation slow?
Why is compilation slow?
First compilation takes longer because dependencies need to be downloaded and cached. Subsequent compilations are faster.
What Rust version is used?
What Rust version is used?
We use the latest stable Rust with
cargo-near for NEAR-optimized builds.Can I use external crates?
Can I use external crates?
Currently, NEAR Playground supports single-file contracts with
near-sdk. For complex projects with multiple dependencies, use a local development environment.My contract won't compile
My contract won't compile
Common issues:
- Missing semicolons or brackets
- Wrong
near-sdkmacro usage - Type mismatches
Deployment
What's the difference between Playground and Wallet mode?
What's the difference between Playground and Wallet mode?
Playground mode: Free testnet deployment. We create and fund the account for you.Wallet mode: Mainnet deployment with your own wallet (Meteor). Uses real NEAR tokens.
Can I deploy to testnet with my wallet?
Can I deploy to testnet with my wallet?
No. Meteor wallet only supports mainnet. For testnet, use Playground mode - it’s free and has the same functionality.
How much does mainnet deployment cost?
How much does mainnet deployment cost?
Roughly 0.1 NEAR per 10KB of contract size, plus ~0.01 NEAR for gas. A typical 150KB contract costs about 1.5 NEAR.
Can I redeploy to the same address?
Can I redeploy to the same address?
In Playground mode, each deployment creates a new address. In Wallet mode, you deploy to your own account and can update it.
Contract Interface
Why do view methods show 'undefined'?
Why do view methods show 'undefined'?
The method might be returning
() (unit type) instead of a value. Make sure your view method has a return type.My call method isn't changing state
My call method isn't changing state
Make sure your method takes
&mut self instead of &self. Only mutable methods can change state.How do I pass complex arguments?
How do I pass complex arguments?
For structs or vectors, use JSON format in the input field:
Troubleshooting
The page is blank or not loading
The page is blank or not loading
- Clear your browser cache
- Try a different browser (Chrome or Firefox recommended)
- Disable browser extensions
My wallet won't connect
My wallet won't connect
- Make sure your wallet is unlocked
- Try refreshing the page
- Check if popup blockers are preventing the wallet window
Deployment is stuck
Deployment is stuck
Deployments usually complete in 5-10 seconds. If stuck:
- Check your internet connection
- Try refreshing and deploying again