Documentation/Development Environment Setup
Beginner Friendly

Development Environment Setup

Set up your development environment to build applications on Tetreum.

Prerequisites

Required Software

  • • Node.js (v16.0 or higher)
  • • npm or yarn package manager
  • • Git version control
  • • Code editor (VS Code recommended)

Recommended

  • • MetaMask browser extension
  • • Hardhat or Truffle framework
  • • Solidity extension for VS Code
  • • Postman for API testing
Wallet Configuration

Add Tetreum Testnet to MetaMask

Network Name:Tetreum Testnet
RPC URL:https://testrpc.tetreum.com
Chain ID:793788
Currency Symbol:TET
Block Explorer:https://testnet.tetscan.com

Get Testnet Tokens

Visit our faucet to get free TET tokens for development and testing:

Development Framework Setup

Option 1: Hardhat Setup

# Create new project
mkdir my-tetreum-project
cd my-tetreum-project

# Initialize Hardhat
npm init -y
npm install --save-dev hardhat
npx hardhat

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

Hardhat Configuration

Update your hardhat.config.js:

require("@nomicfoundation/hardhat-toolbox");

module.exports = {
  solidity: "0.8.19",
  networks: {
    tetreum_testnet: {
      url: "https://testrpc.tetreum.com",
      accounts: [process.env.PRIVATE_KEY],
      chainId: 793788
    }
  },
  etherscan: {
    apiKey: {
      tetreum_testnet: "api-key" // Not required for Tetreum
    }
  }
};

Option 2: Truffle Setup

# Install Truffle globally
npm install -g truffle

# Create new project
mkdir my-tetreum-project
cd my-tetreum-project
truffle init

# Install HDWallet provider
npm install @truffle/hdwallet-provider

Truffle Configuration

Update your truffle-config.js:

const HDWalletProvider = require('@truffle/hdwallet-provider');

module.exports = {
  networks: {
    tetreum_testnet: {
      provider: () => new HDWalletProvider(
        process.env.MNEMONIC,
        'https://testrpc.tetreum.com'
      ),
      network_id: 793788,
      gas: 8000000,
      gasPrice: 20000000000
    }
  },
  compilers: {
    solc: {
      version: "0.8.19"
    }
  }
};
Environment Variables

Create a .env file in your project root:

# Your wallet private key (NEVER commit this to version control)
PRIVATE_KEY=your_private_key_here

# Or use mnemonic phrase
MNEMONIC=your twelve word mnemonic phrase here

# Tetreum RPC endpoints
TETREUM_RPC_URL=https://testnet-rpc.tetreum.com

# Optional: API keys for external services
INFURA_PROJECT_ID=your_infura_project_id
ALCHEMY_API_KEY=your_alchemy_api_key

Security Warning: Never commit your private keys or mnemonic phrases to version control. Add .env to your .gitignore file.