/Docs/Developers/Development Setup

Development Setup

This guide will help you set up your development environment for building on Ramestta. Whether you're deploying smart contracts or building dApps, this setup will get you started.

Prerequisites

  • Node.js: Version 18.x or higher (recommended: 20.x LTS)
  • npm or yarn: Package manager for JavaScript
  • Git: Version control system
  • Code Editor: VS Code recommended with Solidity extension

Install Node.js

Install Node.js via nvm (recommended)bash
# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Restart terminal, then install Node.js
nvm install 20
nvm use 20

# Verify installation
node --version  # Should show v20.x.x
npm --version   # Should show 10.x.x

Project Setup

Option 1: Using Hardhat (Recommended)

Create Hardhat Projectbash
# Create project directory
mkdir my-ramestta-project
cd my-ramestta-project

# Initialize npm project
npm init -y

# Install Hardhat and dependencies
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox

# Initialize Hardhat
npx hardhat init

# Select "Create a JavaScript project" or "Create a TypeScript project"

Hardhat Configuration

hardhat.config.jsjavascript
require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();

module.exports = {
  solidity: {
    version: "0.8.20",
    settings: {
      optimizer: {
        enabled: true,
        runs: 200
      }
    }
  },
  networks: {
    ramestta: {
      url: "https://blockchain.ramestta.com",
      chainId: 1370,
      accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [],
      gasPrice: 1000000000, // 1 gwei
    },
    ramesttaTestnet: {
      url: "https://testnet.ramestta.com",
      chainId: 1371,
      accounts: process.env.PRIVATE_KEY ? [process.env.PRIVATE_KEY] : [],
      gasPrice: 1000000000,
    }
  },
  etherscan: {
    apiKey: {
      ramestta: process.env.RAMASCAN_API_KEY || "YOUR_API_KEY"
    },
    customChains: [{
      network: "ramestta",
      chainId: 1370,
      urls: {
        apiURL: "https://ramascan.com/api",
        browserURL: "https://ramascan.com"
      }
    }]
  }
};

Environment Variables

.envbash
# Your wallet private key (never commit this!)
PRIVATE_KEY=your_private_key_here

# Optional: RamaScan API key for contract verification
RAMASCAN_API_KEY=your_api_key_here
⚠️Security Warning
Never commit your .env file to version control. Add it to your .gitignore file.

Option 2: Using Foundry

Install Foundrybash
# Install Foundry
curl -L https://foundry.paradigm.xyz | bash

# Restart terminal, then run
foundryup

# Create new project
forge init my-ramestta-project
cd my-ramestta-project
foundry.tomltoml
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc = "0.8.20"
optimizer = true
optimizer_runs = 200

[rpc_endpoints]
ramestta = "https://blockchain.ramestta.com"
ramestta_testnet = "https://testnet.ramestta.com"

[etherscan]
ramestta = { key = "${RAMASCAN_API_KEY}", url = "https://ramascan.com/api" }

Install Ramestta SDK

Install SDK Packagesbash
# Core SDK with ethers.js support
npm install @ramestta/sdk @ramestta/sdk-ethers ethers

# Or with Web3.js support
npm install @ramestta/sdk @ramestta/sdk-web3 web3

# Contract ABIs and addresses
npm install @ramestta/contracts

# Optional: Staking and Bridge SDKs
npm install @ramestta/staking-sdk @ramestta/bridge-sdk

Wallet Setup

MetaMask Configuration

ParameterMainnetTestnet
Network NameRamestta MainnetPingaksha Testnet
RPC URLhttps://blockchain.ramestta.comhttps://testnet.ramestta.com
Chain ID13701371
SymbolRAMARAMA
Explorerhttps://ramascan.comhttps://pingaksha.ramascan.com
APIhttps://ramascan.com/apihttps://testbackendapi.ramascan.com
FaucetN/Ahttps://testnet-faucet.ramascan.com
Add Network Programmaticallyjavascript
// Add Ramestta to MetaMask
async function addRamesttaNetwork() {
  try {
    await window.ethereum.request({
      method: 'wallet_addEthereumChain',
      params: [{
        chainId: '0x55a', // 1370 in hex
        chainName: 'Ramestta Mainnet',
        rpcUrls: ['https://blockchain.ramestta.com'],
        nativeCurrency: {
          name: 'RAMA',
          symbol: 'RAMA',
          decimals: 18
        },
        blockExplorerUrls: ['https://ramascan.com']
      }]
    });
    console.log('Ramestta network added!');
  } catch (error) {
    console.error('Failed to add network:', error);
  }
}

Getting Test Tokens

For testnet development, you'll need test RAMA tokens:

  1. Visit the Ramestta Faucet at https://testnet-faucet.ramascan.com
  2. Connect your wallet or enter your address
  3. Request test tokens (limited per 24 hours)
  4. Wait for the transaction to confirm

Verify Setup

Test Connectionjavascript
const { ethers } = require('ethers');

async function testConnection() {
  const provider = new ethers.JsonRpcProvider('https://blockchain.ramestta.com');
  
  const network = await provider.getNetwork();
  console.log('Network:', network.name);
  console.log('Chain ID:', network.chainId);
  
  const blockNumber = await provider.getBlockNumber();
  console.log('Latest Block:', blockNumber);
  
  const gasPrice = await provider.getFeeData();
  console.log('Gas Price:', ethers.formatUnits(gasPrice.gasPrice, 'gwei'), 'gwei');
}

testConnection();
Next Steps
Your development environment is ready! Continue to the Hardhat Guide to deploy your first smart contract, or check out the SDK documentation.

Found an issue with this page? Report on GitHub