### Start React Development Server (npm start) Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/building-a-react-app-front-end/step-5-start-the-development-server-and-verify-setup Starts the React development server using npm. This command compiles the application and serves it locally, typically opening it in a web browser at http://localhost:3000/. ```bash npm start ``` -------------------------------- ### Start React Development Server (npm run start) Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/building-a-react-app-front-end/step-5-start-the-development-server-and-verify-setup Starts the React development server using npm, often when `react-app-rewired` is used for custom Webpack configurations. This command also compiles and serves the application locally. ```bash npm run start ``` -------------------------------- ### Clone and Install Example Hello World Project Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Clones the Solana Hello World repository from GitHub and installs the necessary Node.js dependencies. ```bash git clone https://github.com/solana-labs/example-helloworld cd example-helloworld npm install ``` -------------------------------- ### Install Rust Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Installs the Rust programming language and its package manager, Cargo, using the official installation script. This is a prerequisite for developing Solana smart contracts. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Install Solana CLI Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Installs the Solana Command Line Interface (CLI) tools, which are essential for interacting with the Solana blockchain, deploying programs, and managing accounts. ```bash sh -c "$(curl -sSfL https://release.solana.com/stable/install)" ``` -------------------------------- ### Install Project Dependencies Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/reading-from-the-blockchain Installs all necessary project dependencies using the pnpm package manager. This command should be run after cloning the repository and before starting the development server. ```bash pnpm install ``` -------------------------------- ### Start Local Solana Validator Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Starts a local Solana validator for testing purposes. This is used to verify the Solana installation. ```bash solana-test-validator ``` -------------------------------- ### Check Rust Installation Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Verifies that Rust and Cargo have been installed correctly by checking their versions. Ensures the development environment is properly set up. ```bash rustc --version ``` ```bash cargo --version ``` -------------------------------- ### Verify Node.js and npm Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-4-download-node.js After installing Node.js, use these commands in your command prompt or terminal to confirm that both Node.js and its package manager, npm, have been installed correctly. This ensures you can proceed with project setup and dependency management. ```bash node --version npm --version ``` -------------------------------- ### Example Solana CLI Configuration Output Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/solana-cli-and-solana-keypair/step-2-verify-solana-cli-configuration Displays an example of the output from the `solana config get` command. Focus on the 'RPC URL' field to confirm it matches the intended staging environment URL for the Eclipse blockchain. ```bash RPC URL: https://staging-rpc.dev2.eclipsenetwork.xyz ``` -------------------------------- ### Install Rust and Cargo Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Installs the Rust programming language and its package manager, Cargo, using the official installation script. This is a prerequisite for many blockchain development tasks. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Install Project Dependencies Source: https://docs.eclipse.xyz/developers/developer-tooling/benchmarking Installs all required project dependencies for the benchmarking script. This command must be executed within the 'token_swap' directory after cloning the repository. ```bash npm i ``` -------------------------------- ### Install Core Solana Web3.js Dependencies Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/building-a-react-app-front-end/step-2-install-solana-web3.js-and-wallet-adapter-dependencies Installs the fundamental packages required for interacting with the Solana blockchain and integrating wallet functionality into a React application. These include the main web3.js library and core adapter components. ```bash npm install @solana/web3.js @solana/wallet-adapter-react @solana/wallet-adapter-wallets @solana/wallet-adapter-react-ui ``` -------------------------------- ### Install Additional Solana Wallet Adapter Dependencies Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/building-a-react-app-front-end/step-2-install-solana-web3.js-and-wallet-adapter-dependencies Installs extended dependencies for comprehensive Solana blockchain communication, various wallet integrations, and UI components. This includes base adapter functionality and styling libraries like Emotion. ```bash npm install @solana/web3.js @solana/wallet-adapter-react @solana/wallet-adapter-react-ui @solana/wallet-adapter-wallets @solana/wallet-adapter-base @project-serum/sol-wallet-adapter @emotion/react @emotion/styled ``` -------------------------------- ### Start Development Server Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/reading-from-the-blockchain Starts the Next.js development server, allowing you to view and interact with the application locally. The application will typically be accessible at http://localhost:3000. ```bash pnpm dev ``` -------------------------------- ### Download Solana Install Script Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-6-install-the-solana-cli Downloads the Solana CLI installer for Windows (x86_64 MSVC) to a temporary directory. This command uses `curl` to fetch the executable from the specified release URL and saves it. ```cmd cmd /c "curl https://release.solana.com/v1.18.3/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dirs" ``` -------------------------------- ### Install Rust on Ubuntu WSL Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-8-set-up-development-environment-in-ubuntu-wsl Installs the Rust programming language and its package manager, Cargo, using the official installation script. This is a prerequisite for many Solana development tasks. ```sh curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -------------------------------- ### Install Nifty CLI from Source Source: https://docs.eclipse.xyz/developers/nfts/nifty-asset Instructions for installing the Nifty CLI tool using Rust's Cargo package manager. This involves cloning the repository, navigating to the CLI directory, and running the installation command. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh pnpm clients:cli:install cd clients/cli cargo install --path . cargo install nifty-cli ``` -------------------------------- ### Troubleshoot Solana Validator Startup Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 A command to run the Solana system tuner, which can help resolve issues if the validator fails to start. ```bash sudo $(command -v solana-sys-tuner) --user $(whoami) > sys-tuner.log 2>&1 & ``` -------------------------------- ### Build Smart Contract with Anchor CLI Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Compiles the smart contract project using the Anchor command-line interface. This step is essential before deployment. ```bash anchor build ``` -------------------------------- ### Create and Initialize Anchor Project Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/modifying-a-solana-dapp-to-support-eclipse-chomping-glass/developing-on-the-solana-virtual-machine-svm Steps to create a new Anchor project using the `anchor init` command and then navigate into the project directory. This sets up the basic structure for a Solana program. ```Bash anchor init my_project cd my_project ``` -------------------------------- ### Rust Smart Contract - Account and Program Structure Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Defines the structure for accounts used by the smart contract and outlines the basic program structure with a sample 'trade' function. This sets up the contract's state and entry points. ```rust ... #[program] pub mod my_smart_contract { use super::*; #[derive(Accounts)] pub struct MyAccounts<'info> { } #[access_control(allow)] pub fn trade(ctx: Context) -> ProgramResult { Ok(()) } } ... ``` -------------------------------- ### Deploy Smart Contract with Anchor CLI Source: https://docs.eclipse.xyz/developers/developer-tooling/openbook-quickstart Deploys the compiled smart contract to the target network using the Anchor command-line interface. This command follows a successful build. ```bash anchor deploy ``` -------------------------------- ### programs.yaml Entry Structure Source: https://docs.eclipse.xyz/developers/eclipse-program-registry-guide Example structure for adding a program's details to the `programs.yaml` file. This includes program name, description, repository link, icon, framework, program address, and categories. ```yaml - name: canonical_bridge description: The Eclipse Canonical Bridge facilitates depositing and withdrawing ether from the Eclipse Chain repo: https://github.com/Eclipse-Laboratories-Inc/syzygy/tree/main/solana-programs/canonical_bridge icon: https://i.imgur.com/y0JEPfQ.png framework: Anchor program_address: br1xwubggTiEZ6b7iNZUwfA3psygFfaXGfZ1heaN9AW categories: - Bridge ``` -------------------------------- ### Acquire Devnet Tokens Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Commands to configure the Solana CLI to point to the Eclipse devnet and request testnet tokens for transaction fees. ```bash solana config set --url https://staging-rpc.dev2.eclipsenetwork.xyz solana airdrop 10 ``` -------------------------------- ### Solana CLI Configuration Source: https://docs.eclipse.xyz/developers/nfts/nifty-asset Instructions for installing the Solana CLI and configuring it to use a specific RPC node URL and generating a new keypair. This setup is necessary for interacting with the Solana Virtual Machine (SVM) for Nifty Asset operations. ```bash sh -c "$(curl -sSfL https://release.solana.com/v1.16.25/install)" solana config set --url https://mainnetbeta-rpc.eclipse.xyz solana-keygen new ``` -------------------------------- ### Install Solana CLI Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Installs the Solana Command Line Interface (CLI) tool, which is essential for interacting with Solana clusters, including the Eclipse Testnet and Devnet. ```bash sudo sh -c "$(curl -sSfL https://release.anza.xyz/v1.18.22/install)" ``` -------------------------------- ### Successful SPL Token Transfer Output Source: https://docs.eclipse.xyz/developers/developer-tooling/faucet Example output from a successful SPL token transfer operation that included funding the recipient's account. It details the sender, recipient, associated token account, and the transaction signature. ```bash Transfer 50 tokens Sender: 4dYFmw8ytJmYDmZLvFnobT4CKC7Z5q1W5b9byEuVVap7 Recipient: qp6oBVgpxfQDMP1GKzxgzDxKqEuZnuC8gZo5PK1qrdh Recipient associated token account: 7G9XHxAjgXhkKnTmcb8Z24ssSgiXYNnTp8KqRuQVCi9D Funding recipient: 7G9XHxAjgXhkKnTmcb8Z24ssSgiXYNnTp8KqRuQVCi9D Signature: 25cb1D1pxN3Sh3cqFhJSP2hmD6jAMRDxeg9jrvp3SH6GNpkY6Z4viEs7FFsHwVH5528xUZB8xCT5F1uVrXpcTBcN ``` -------------------------------- ### Run Solana CLI Installer Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-6-install-the-solana-cli Executes the downloaded Solana CLI installer script to install a specific version of the Solana CLI. This command requires administrator privileges to ensure proper installation. ```cmd C:\solana-install-tmp\solana-install-init.exe v1.18.3 ``` -------------------------------- ### Rust Project Setup for Solana Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/modifying-a-solana-dapp-to-support-eclipse-chomping-glass/developing-on-the-solana-virtual-machine-svm Steps to initialize a new Rust project for Solana development using Cargo and add the Solana SDK as a dependency. ```toml [dependencies] solana-sdk = "1.9.0" ``` ```shell cargo new my_project cd my_project ``` -------------------------------- ### Verify Git Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-5-install-git-on-windows This command verifies that Git has been successfully installed on your Windows system. Running it in the Command Prompt or PowerShell will display the installed Git version. ```bash git --version ``` -------------------------------- ### Install Solana Toolkit on Ubuntu WSL Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-8-set-up-development-environment-in-ubuntu-wsl Downloads and installs the latest stable version of the Solana command-line tools. This toolkit is essential for interacting with the Solana blockchain. ```sh sh -c "$(curl -sSfL https://release.solana.com/stable/install)" ``` -------------------------------- ### Verify Anchor Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-9-install-anchor-on-windows-and-wsl Checks if the Anchor CLI has been installed correctly by displaying its version. This command should be run in both Windows Terminal and WSL to confirm successful installation. ```windows-bash anchor --version ``` ```wsl-bash anchor --version ``` -------------------------------- ### Verify Solana CLI Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-6-install-the-solana-cli Checks if the Solana CLI has been installed correctly by displaying its version number. This command confirms that the CLI is accessible and lists the installed version. ```bash solana --version ``` -------------------------------- ### Build Rust Smart Contract Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/quick-start-hello-world/deployment-walkthrough-1 Compiles the Rust smart contract program using npm scripts. ```bash npm run build:program-rust ``` -------------------------------- ### Verify Solana Installation on Ubuntu WSL Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-8-set-up-development-environment-in-ubuntu-wsl Confirms that the Solana toolkit has been installed correctly by displaying its version. This ensures that Solana CLI commands are available and functional. ```bash solana --version ``` -------------------------------- ### Verify WSL2 Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-7-install-wsl-on-visual-studio-code-and-upgrade-to-wsl2 Confirms that WSL2 is installed and running by checking the Linux kernel version within your installed distribution. This command is executed inside the Linux environment. ```Bash uname -a ``` -------------------------------- ### Verify Rust and Cargo Installation Source: https://docs.eclipse.xyz/developers/tutorials-and-guides/developer-guides/dapp-deployment-tutorial-eclipse-devnet/install-dependencies-windows/step-2-install-rust-and-cargo This command verifies that the Rust compiler (rustc) and Cargo package manager are successfully installed on your system. It's a crucial step after running the Rustup installer to ensure the development environment is set up correctly. ```bash rustc --version cargo --version ```