Devnet
Last updated
Last updated
This guide walks you through deploying a simple smart contract to Eclipse Devnet.
You'll have to do a few things before you can deploy your smart contract to Eclipse Devnet.
Install Rust, and its package manager Cargo.
You can check if the installation was successful by running the following commands:
ii. We'll also have to install Node.js and npm using, which will be used later in this guide.
Visit the official and download the installation binary for your system. Versions recommended are 14.0 and above. If you have trouble with this, you might consider using Homebrew or some other package manager.
Note that npm is bundled with the Node.js installation, so you don't have to install it separately.
iii. Now let's install the Solana CLI. This allows you to interact with Solana clusters (Eclipse Devnet in this case).
iv. Instead of setting your Solana CLI to a local cluster, set it to Eclipse Devnet with the following command:
v. If this is your first time using the Solana CLI, you will need to generate a new keypair:
This will generate a new key pair and save it to your local machine. You will need this key pair to sign transactions to deploy your smart contract to Eclipse Devnet.
We need to claim devnet tokens to pay for transaction fees to deploy your smart contract to the devnet.
Run the following commands to get 10 devnet tokens in your local wallet:
solana config set --url https://staging-rpc.dev2.eclipsenetwork.xyz
solana airdrop 10
Now that we've set up our environment, we can deploy our smart contract to Eclipse Devnet. Let's make sure that everything is installed properly by running a local Solana cluster.
We don't need that local Solana cluster but we're using it to check that everything is installed properly. Next, we'll clone the Solana Hello World repository and install the dependencies.
We build the smart contract:
Finally, we can deploy the smart contract to Eclipse Devnet:
We can run the JavaScript client and confirm whether the smart contract was deployed successfully:
The output should be something like this:
These devnet tokens are only valid on the devnet and are meant for testing purposes only. Eclipse will never charge you for devnet tokens. Please be wary of scams. Report any suspicious activity to us on our .
Do you need additional assistance integrating something special like a wallet, bridge, or something else? Feel free to reach out via .