Thursday, June 18, 2026
No Result
View All Result
Crypeto News
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
Crypeto News
No Result
View All Result

Solana Devnet – How to Build Dapps on Solana

by crypetonews
March 4, 2023
in Web3
Reading Time: 11 mins read
0 0
A A
0
Home Web3
Share on FacebookShare on Twitter


Solana is one of the most popular non-EVM-compatible blockchains, attracting numerous developers to create dapps (decentralized applications) on its network. However, before launching dapps directly on its mainnet, the Solana devnet is the go-to choice. 

If you’re an aspiring Solana developer, this article will help you understand the Solana devnet to get going in your Solana journey. You’ll have a chance to learn how to start building dapps on this popular network easily with the help of the Moralis Solana API. The latter supports both the Solana mainnet and the Solana devnet. Furthermore, with Moralis, you can use short code snippets to fetch parsed on-chain data with any of the leading programming languages and frameworks. For example, let’s say you want to get NFTs from users’ wallets. In that case, you can use the Moralis Solana NFT API endpoint to get NFTs by wallet either using Python or NodeJS with just a few simple lines of code:

The get_nfts endpoint using Python:

result = sol_api.account.get_nfts(
api_key=api_key,
params=params,
)

The getNFTs endpoint using NodeJS:

const response = await Moralis.SolApi.account.getNFTs({
address,
network,
});

The network parameter enables you to choose between the Solana mainnet and the Solana devnet. Of course, to make the above endpoints work, you also need to import Moralis, obtain your Web3 API key, and properly define the parameters. Fortunately, we’ll show you how to do that in the “Build Dapps on the Solana Network with Moralis” section. Before we get there, make sure to sign up with Moralis!  

Overview

In today’s article, we will cover the following topics:

What is the Solana DevnetSolana Devnet vs Solana MainnetSolana Devnet vs TestnetWhat is a Solana Devnet FaucetBuilding on the Solana DevnetWrite a Solana Smart Contract for the DevnetGet the Portfolio Balance on SolanaBuild Dapps on the Solana Network with Moralis

The final three topics of today’s article will show you how to easily build dapps using the power of Moralis. Aside from the above showcased “Get NFTs by wallet” endpoint, you’ll learn about other Moralis Solana API endpoints. Here’s an overview of the current Solana API fleet with the lines of code for the NodeJS framework:

Solana NFT API

The getNFTs endpoint to get NFTs by wallet:  const response = await Moralis.SolApi.account.getNFTs({
address,
network,
}); The getNFTMetadata endpoint to get NFT metadata:const response = await Moralis.SolApi.nft.getNFTMetadata({
address,
network,
});

Solana Token API

The getTokenPrice endpoint to get the token price:const response = await Moralis.SolApi.token.getTokenPrice({
address,
network,
});

Solana Balance API

The getBalance endpoint to get the native balance by wallet:const response = await Moralis.SolApi.account.getBalance({
network,
address,
}); The getSPL endpoint to get the token balance by wallet:const response = await Moralis.SolApi.account.getSPL({
network,
address,
}); The getPortfolio endpoint to get the portfolio by wallet:const response = await Moralis.SolApi.account.getPortfolio({
network,
address,
});

Solana Auth API

The requestMessage endpoint to request a Solana challenge:const result = await Moralis.Auth.requestMessage(options); The verify endpoint to verify the Solana challenge:const verifiedData = Moralis.Auth.verify({
message: message,
signature: signature,
network: network,
});

However, before we can show you how to implement some of these code snippets above, you ought to get the basics of the Solana devnet under your belt. Now, if you’d like to skip the basics, feel free to scroll down to the “Building on the Solana Devnet” section!

Title - What is the Solana Devnet?

What is the Solana Devnet?

The Solana devnet is a test network for the Solana blockchain. This devnet is specifically designed for developers to test their dapps before deploying to the main Solana network. Thanks to this network, developers get to experiment with Solana’s features, such as smart contracts, token creation, and other dapps. Additionally, they get to do so without risking real funds (SOL) or affecting the performance of the main network.

The devnet is an important tool for developers because it enables them to test their dapps in a controlled environment. That way, devs can identify and fix potential issues and vulnerabilities before they go live on the main network. Also, the Solana devnet provides a sandbox environment for developers to learn and experiment with the Solana ecosystem. Despite its name, the devnet is not only for developers, but every Solana user can connect to this network to take Solana for a test drive.

Aside from the public devnet, which is the primary focus of this article, developers may also use the “localnet” environment. The latter allows devs to run a local instance of Solana for testing and development purposes.

Build on Solana with Moralis

Solana Devnet vs Solana Mainnet

The devnet is basically a replica of Solana’s mainnet. After all, the goal is for the devnet to resemble the mainnet as much as possible to give proper weight to testing. However, there are some key differences between the two networks:

SOL vs Devnet SOL – Transactions and network security of the mainnet are powered by Solana’s native coin: SOL. The latter is a cryptocurrency that one must purchase with fiat or another cryptocurrency. On the other hand, the devnet SOL is not “real” – anyone can obtain it for free from a reliable Solana faucetLedger Resets – The devnet may be subject to ledger resets, which is not the case for the mainnet.Software Release – Typically, the mainnet and the devnet run the same software release branch version. However, updates are rolled out to the devnet first. Thus, there may be times when the devnet runs a newer release than the mainnet.  

Solana Devnet vs Testnet?

Solana Devnet vs Testnet

By definition, the Solana devnet is a test network; however, it is a different network than the Solana testnet. It’s worth noting that most other leading blockchains offer only testnets. Thus, Solana’s devnet is often referred to as a testnet, which can cause some confusion. However, keep in mind that these are two separate networks with essentially the same properties. The core difference is in whom the networks serve.  

The devnet is intended to serve all Solana developers and users who want to test on-chain programs, create tokens, and build various dapps. On the other hand, the Solana testnet is meant to primarily serve Solana’s core developers and contributors for stress testing the mainnet’s upcoming upgrades. With the Solana testnet, the core Solana contributors test network stability, performance, and validators’ behavior.

Title - What is a Solana Faucet?

What is a Solana Devnet Faucet?

A Solana devnet faucet is an online application that allows you to obtain devnet SOL. Accordingly, this is the tool to use to get the native “play” or “testnet” currency of the devnet and then use it to execute test transactions. The most user-friendly crypto faucets enable users to simply input their wallet address, hit a button, and receive test assets in their wallet. That is exactly how the Solana faucet that awaits you on our “Pure Faucets” page works.

Solana Devnet Faucet Landing Page

Note: The above page includes links to all leading crypto faucets, such as a vetted Goerli faucet and many others. So, whether you wish to build on Aptos, target the Arbitrum testnet, Ethereum testnet, or any of the leading EVM-compatible chains’ testnets, this is the page to use to get their respective test tokens.

If you wish to learn more details about how to use a reliable Solana faucet, make sure to read our article on that subject. You can access that article via the “Solana faucet” link above. There, you’ll also find detailed instructions on how to use the best Solana faucet; however, the following screenshot covers the gist:

Devnet Faucet for Solana page with entry field

Building on the Solana Devnet

By this point, you know that if you wish to build on the Solana mainnet, you should first build on the Solana devnet. So, whether you want to deploy a simple on-chain program (smart contract), create new SPL tokens, or build a complex dapp that utilizes multiple smart contracts, you should start on the devnet.

When it comes to building dapps, you have two options. You can focus on utilizing existing smart contracts, or you can also create your own smart contracts. The first option is a lot simpler, as it allows you to use some powerful tools to effortlessly fetch the on-chain data using legacy programming languages and frameworks, such as NodeJS, Python, Go, etc. On the other hand, creating your own smart contracts requires getting acquainted with some specific Solana standards and tools. However, unlike Ethereum, where smart contracts are mainly written in Solidity, Solana allows you to use legacy programming languages to write on-chain programs. As such, you can use Rust, C, and C++; however, Rust is the most popular choice. 

To help you get started with either of the two options of building on Solana, we’ve prepared two short video tutorials. We encourage you to follow along and get a taste of writing your own smart contracts and building dapps by using existing smart contracts and fetching on-chain data.

Write a Solana Smart Contract for the Devnet

The above video will show you how to use Rust to write a simple Solana smart contract. It will guide you through the Rust and Solana CLI installation process and the code itself. You’ll also have a chance to create a clean, simple frontend that gives users a neat way to trigger your new smart contract:

To easily implement Web3 authentication, you will get to use the Moralis Auth API presented in the intro. Last but not least, the above video also introduces a Solana playground app that enables you to deploy and test Solana programs in your favorite browser. Nonetheless, if you prefer written instructions over a video, learn to write a Solana smart contract from our article on the subject – just click the link in this sentence. 

As you probably know, to create your own Solana tokens, you must also deploy your own smart contracts. However, in case you want to create NFTs on Solana, you can use Metaplex’s Candy Machine. This is a powerful tool that basically generates a Solana NFT smart contract on your behalf. As a result, it makes creating NFT SPL tokens a lot simpler.

Get the Portfolio Balance

There are many cool dapps that you can build on Solana without deploying your own smart contracts. Some great examples are Web3 wallets, portfolio trackers, and NFT galleries. The easiest way to build such dapps is to use the power of Moralis. This is where the Solana API endpoints outlined in the “Overview” section come to play. 

You can follow the above video to create a simple portfolio tracker that utilizes the power of the getPortfolio endpoint. The latter essentially combines the power of the getBalance, getSPL, and getNFTs endpoints. Moreover, the following are the NodeJS lines of code enabling you to implement that powerful API endpoint in your backend:

const getPortfolio = async (address, network) => {
const data = await Moralis.SolApi.account.getPortfolio({
address,
network,
});

return data.raw;
};

app.post(“/getPortfolio”, async (req, res) => {
const { address, network } = req.body;
try {
if (address && network) {
const response = await getPortfolio(address, network);
res.status(200).json(response);
} else {
res.status(400).send({ error: “Missing Inputs” });
}
} catch (e) {
console.log(e.message);
res.status(400).send({ error: e.message });
}
});

In addition, you’ll also have a chance to create a simple frontend dapp that lets you enter any Solana wallet address, choose between the Solana mainnet and devnet, and get the specified wallet’s portfolio via the “Get Portfolio” button:

Build Dapps on the Solana Network with Moralis

If you want to dive into Solana blockchain app development with your legacy programming skills, there’s no better way than using Moralis. With the Web3 Data API and Authentication API, you can create killer dapps based on the existing Solana smart contracts and the on-chain data they process. All you need to start using these endpoints is your Moralis Web3 API key. And the latter awaits you inside your admin area, which you can access with your Moralis account credentials:

When it comes to implementing the Moralis Solana endpoints, you do not have to write the code from scratch. Instead, you can use the API reference pages from Moralis’ docs. There, you simply select the programming language/framework that you want to use and then copy the lines of code:

Looking at the above screenshot, you can see that the API reference pages enable you to enter the parameters and take the endpoints for a spin right on the spot. By copying the lines of code from the API reference pages, you get to create your backend scripts in minutes. This means you can spend more time creating a unique frontend that will ensure a great user experience. So, start BUIDLing Solana dapps the easy way today!

Title - Build on Solana Devnet with Moralis

Solana Devnet – How to Build Dapps on Solana – Summary

We covered quite a distance in today’s article. First, we went through the basics that helped you understand what the Solana devnet is and how it’s different from Solana’s mainnet and testnet. You also find out what a Solana faucet is and where you can find a reliable one. As such, you now know how to get testnet SOL. 

In addition, we stated that there are two ways devs can start building on Solana: by creating their own on-chain programs or by building dapps on top of existing smart contracts and tokens. However, no matter which path you choose, you now know that you should first focus on the devnet. We even provided you with two video tutorials, allowing you to test the waters of each approach. Last but not least, you found out what makes Moralis so powerful and how you can easily implement blockchain-related backend functionalities using the Moralis API reference pages.

In case you wish to explore other blockchain development topics, make sure to visit the Moralis YouTube channel and the Moralis blog. 



Source link

Tags: BuilddAppsDevNetSolana
Previous Post

Ankr Price Prediction 2023, 2024, 2025, 2026

Next Post

FTX’s Sam Bankman-Fried Should Have Only Flip Phone, Website Whitelist, DOJ Says

Related Posts

Ronin API – Build on Ronin with Moralis
Web3

Ronin API – Build on Ronin with Moralis

May 28, 2025
How to Build NFT Apps on Solana
Web3

How to Build NFT Apps on Solana

May 23, 2025
Solana NFT API – Exploring the Top 2025 NFT API for Solana
Web3

Solana NFT API – Exploring the Top 2025 NFT API for Solana

May 21, 2025
Get Solana Whales – How to Fetch Top Whales of a Solana Token
Web3

Get Solana Whales – How to Fetch Top Whales of a Solana Token

May 19, 2025
Neobank App Development – How to Build a Web3 Neobank
Web3

Neobank App Development – How to Build a Web3 Neobank

May 16, 2025
How to Get Top Solana Token Holders
Web3

How to Get Top Solana Token Holders

May 14, 2025
Next Post
FTX’s Sam Bankman-Fried Should Have Only Flip Phone, Website Whitelist, DOJ Says

FTX's Sam Bankman-Fried Should Have Only Flip Phone, Website Whitelist, DOJ Says

Digital Assets Under Management 5.25% Higher in February — Grayscale Still ‘Most Dominant Player’ – Featured Bitcoin News

Digital Assets Under Management 5.25% Higher in February — Grayscale Still 'Most Dominant Player' – Featured Bitcoin News

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

RECOMMENDED

No Content Available

  • USD
  • EUR
  • GBP
  • AUD
  • JPY
  • bitcoinBitcoin(BTC)
    $64,553.00-1.71%
  • ethereumEthereum(ETH)
    $1,754.35-2.12%
  • tetherTether(USDT)
    $1.000.01%
  • binancecoinBNB(BNB)
    $602.57-0.37%
  • usd-coinUSDC(USDC)
    $1.000.00%
  • rippleXRP(XRP)
    $1.19-2.23%
  • solanaSolana(SOL)
    $72.35-1.62%
  • tronTRON(TRX)
    $0.3209831.35%
  • Figure HelocFigure Heloc(FIGR_HELOC)
    $1.02-1.40%
  • HyperliquidHyperliquid(HYPE)
    $72.12-1.52%
  • Trending
  • Comments
  • Latest
4 Expert Tips to Turn Blank Pages Into Business Blueprints

4 Expert Tips to Turn Blank Pages Into Business Blueprints

October 21, 2024
Top Crypto Portfolio Rebalancing Tools (Automated & Manual)

Top Crypto Portfolio Rebalancing Tools (Automated & Manual)

April 13, 2025
What are Meta Transactions? Exploring ERC-2771

What are Meta Transactions? Exploring ERC-2771

October 25, 2023
How to Set Up NFT Sales Notifications

How to Set Up NFT Sales Notifications

October 19, 2023
Uniswap v4 Teases Major Updates for 2025

Uniswap v4 Teases Major Updates for 2025

January 2, 2025
A 98% Crash and a Pump & Dump

A 98% Crash and a Pump & Dump

August 8, 2025
AI Expert: Truth Protocols Could Become the SSL of the Information Age

AI Expert: Truth Protocols Could Become the SSL of the Information Age

August 24, 2025
Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means

Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means

August 24, 2025
Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse

Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse

August 24, 2025
Ethereum’s Tech Edge Could Outshine Bitcoin — Here’s How

Ethereum’s Tech Edge Could Outshine Bitcoin — Here’s How

August 23, 2025
IRS Loses Top Crypto Enforcer After Only 90 Days on the Job

IRS Loses Top Crypto Enforcer After Only 90 Days on the Job

August 23, 2025
US Court Grants Stay In Coinbase Biometric Data Lawsuit — Details

US Court Grants Stay In Coinbase Biometric Data Lawsuit — Details

August 23, 2025
Crypeto News

Find the latest Bitcoin, Ethereum, blockchain, crypto, Business, Fintech News, interviews, and price analysis at Crypeto News.

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • Mining
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Videos
  • Web3

LATEST UPDATES

  • AI Expert: Truth Protocols Could Become the SSL of the Information Age
  • Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means
  • Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us
  • About Us

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

No Result
View All Result
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In