Testnet
Submit your deployment address to this form. We will provide engineering support and prioritize specific infrastructure needs.
This guide walks you through deploying a simple smart contract to Eclipse Testnet.
Prerequisites
You'll have to do a few things before you can deploy your smart contract to Eclipse Testnet.
Install Dependencies
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 Node.js download page 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 Testnet in this case).
iv. Instead of setting your Solana CLI to a local cluster, set it to Eclipse Testnet 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 Testnet.
Getting Sepolia ETH Tokens
You will need an Ethereum wallet such as Metamask to claim and bridge Sepolia ETH. As a user, you can use Sepolia ETH to explore the Eclipse testnet and dApps deployed on the network. Sepolia ETH is not meant to be traded, and is only used to test applications. Sepolia ETH can be claimed from a number of faucets: Alchemy, QuickNode, and Infura.
Here are instructions on how to claim Sepolia ETH on Alchemy Sepolia ETH Faucet.
Create an Alchemy account to request Sepolia ETH.
Visit the Alchemy Sepolia faucet and log in with your Alchemy account.
Enter your wallet in the provided box, complete the CAPTCHA verification, and click "Send Me ETH".
Deposit Sepolia ETH to Eclipse Testnet
Once you've acquired Sepolia ETH, this script allows you to deposit Sepolia ETH to the Eclipse test network.
Wallet Setup
Getting Your Ethereum Private Key
Once you have Sepolia ETH, copy your Ethereum wallet address and your private private key for later use by navigating to "Account details" and clicking "Show private key".
Getting Your Eclipse Public Address
Copy the previously generated "Solana" address using the Solana CLI: solana-keygen new --no-outfile
or solana-keygen new --outfile my-wallet.json
.
The public key in the output should resemble something like this following: 6g8wB6cJbodeYaEb5aD9QYqhdxiS8igfcHpz36oHY7p8
Create a Deposit
Obtain and set up the deposit.js script: https://github.com/Eclipse-Laboratories-Inc/testnet-deposit
You'll need to install the dependencies with yarn
.
Finally, execute the script:
[AMOUNT_IN_GWEI]
is the desired deposit amount, with a minimum of1500000
gwei (0.0015 ETH)[FEE_IN_GWEI]
is the transaction processing fee, which is currently ignored but can set to100
gwei
A successful command example:
You can check the transaction hash on Sepolia testnet.
You can verify your testnet account balance using the Eclipse Explorer.
Deploying the Smart Contractโ
Now that we've set up our environment, we can deploy our smart contract to Eclipse Testnet. Let's make sure that everything is installed properly by running a local Solana cluster.
In case the validator fails to start, restart your computer and run the following command:
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 Testnet:
We can run the JavaScript client and confirm whether the smart contract was deployed successfully:
The output should be something like this:
Not seeing the expected output?
Make sure you've run all the commands in the previous steps.
Inspect the program logs by running
solana logs
to see why the program failed.
An example of what you might find is given below.
Integration Assistance
Do you need additional assistance integrating something special like a wallet, bridge, or something else? Feel free to reach out via Discord.
Last updated