Solana: Verification Successful but now showing on explorer (devnet)

Solana: Verification Successful but now showing on explorer (devnet)

Solana Application Review on DevNet: A Step-by-Step Guide

As a developer, it is crucial to test the functionality of your application before deploying it to production environments such as the mainnet. One of the most important steps in this process is to ensure that your application can successfully test its implementation. In this article, we focus on testing Solana applications on DevNet, the testnet version of the Solana blockchain.

Why Verification is Important

Before we dive into the review, it is important to understand why this step is necessary. Your application should be able to verify its correctness and ensure that all transactions are processed correctly before deploying it to the mainnet. Failure to do so may result in unexpected behavior or even security vulnerabilities that could have serious consequences for your users.

Step-by-step verification process on DevNet

To test your Solana application on DevNet, follow these steps:

  • Install the required dependencies

    Solana: Verification Successful but now showing on explorer (devnet)

    : Make sure that you have the latest version of the Solana SDK installed on your computer. You can install it using npm by running npm install -g solana-sdk and then creating a new Solana CLI account.

  • Create a new Solana program: Write and compile your Solana program in the Rust-like language Splide (formerly known as Rust). For example, if you are using the “spl-derive” library to generate contract code from a template, create a new file called “main.rs”.
  • Generate a keystore: Create a new keystore on DevNet using the solana-keygen command-line tool. This will provide a public address for your program.
  • Compile and deploy your program: Compile your program into a .sol file using the solc compiler, and then deploy it to the Solana testnet using the solana-deploy command.
  • Testing your application in DevNet Explorer: Use the DevNet Explorer tool ( to query your application’s blockchain. You can use the “–gas” and “–network=devnet” flags to specify the network and gas limit for your transaction.

Testing Example

Here is an example of how to validate a simple contract on DevNet:


Create a new Solana program file (main.rs)

contract_code = {

"version": 1,

"functions": [

{

"name": "my_function",

"inputs": [],

"outputs": [/ empty /],

"storage": true,

"gas_limit": 2000000

}

]

}

`


Compile and deploy the program on DevNet

solc main.rs -- Keystore path/to/your/keystore.key --network devnet --gas 10000000


Use the DevNet Explorer tool to test your program

explorer -u --gas 2000000 --network=devnet

By following these steps, you can successfully test your Solana application on DevNet and ensure that it works as expected before deploying it to the mainnet.

Share:

Leave comment

Marrakech 40000

160, Angle Avenue Mohamed V, Rue de la Liberté.

05 24 43 74 54

Appelez-nous aujourd'hui!

Heures d'ouverture

Lun - Ven : 8h30 - 12h30 / 15h00 - 19h00 Samedi : 8h30 - 13h00

Prenez rendez-vous

contact@drbichra.com