Connecting to NEAR
NEAR Protocol operates on several networks each operating with their own independent validators and unique state. These networks are as follows:
mainnet
mainnet
is for production ready smart contracts and live token transfers. Contracts ready formainnet
should have gone through rigorous testing and independent security reviews if necessary.mainnet
is the only network where state is guaranteed to persist over time (subject to the typical security guarantees of the network's validation process).
Note: near-cli
network selection flag is production
.
testnet
testnet
is intended for testing all aspects of the NEAR platform prior tomainnet
deployment. From account creation, mock token transfers, development tooling, and smart contract development, thetestnet
environment should closely representmainnet
behavior. We make every attempt to maintain the integrity of network state across updates but this is still a volatile network that receives heavy testing. Therefore, we recommended all user-facing applications are deployed tomainnet
to ensure persistent state.
Note: near-cli
network selection flag is development
or testnet
. (This network is selected by default with near-cli
and may not need additional configuration)
betanet
betanet
usually has daily releases with protocol features that are not yet stabilized. State is maintained as much as possible but no guarantees with its high volatility.
near-cli
network selection variable is betanet
localnet
LocalNet is intended for developers who want to work with the NEAR platform independent of the public blockchain. You will need to generate nodes yourself.
More on local development here
near-cli
network selection variable is local
Got a question?
Ask it on StackOverflow!