Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Known deployments of this frontend can be used at:

- [Milkomeda C1 - Mainnet](https://milkomeda-c1.djed.one)
- [Milkomeda C1 - Testnet](https://milkomeda-c1-testnet.djed.one)
- **Djed Tefnut - Sepolia Testnet** (configured in `env/sepolia-tefnut.env`)

By utilizing this frontend application, users can conveniently engage with Djed deployments and explore the functionalities provided by the smart contracts.

Expand All @@ -100,6 +101,23 @@ npm install
```

# Usage

## Configure Environment

Before starting, copy the desired environment configuration from the `env/` folder to the root as `.env`:

**For Djed Tefnut on Sepolia:**
```bash
cp env/sepolia-tefnut.env .env
```

**For other networks:**
```bash
cp env/sepolia.env .env # Djed Osiris on Sepolia
cp env/milkomeda.env .env # Milkomeda Mainnet
cp env/milkomeda-testnet.env .env # Milkomeda Testnet
```

Start the development server:
```bash
npm start
Expand Down
136 changes: 136 additions & 0 deletions docs/TEFNUT_SEPOLIA_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Djed Tefnut - Sepolia Deployment Guide

This document provides instructions for connecting the Djed Dashboard frontend to the **Djed Tefnut** protocol deployed on the Sepolia testnet.

## What is Djed Tefnut?

Djed Tefnut is the latest version of the Djed protocol, a formally verified crypto-backed algorithmic stablecoin. The Tefnut specification includes improvements and updates to the original Djed protocol.

## Quick Start

### 1. Configure Environment

Copy the Tefnut configuration file to use the Sepolia deployment:

```bash
# Linux/Mac
cp env/sepolia-tefnut.env .env

# Windows (PowerShell)
Copy-Item env\sepolia-tefnut.env .env

# Or use the setup script
./setup-env.sh # Linux/Mac
setup-env.bat # Windows
```

### 2. Install Dependencies

```bash
npm install
```

### 3. Start Development Server

```bash
npm start
```

The dashboard will be available at http://localhost:3000

## Configuration Details

The Tefnut Sepolia configuration (`env/sepolia-tefnut.env`) includes:

- **Network**: Ethereum Sepolia Testnet
- **Chain ID**: 11155111
- **Stablecoin**: Djed Tefnut Dollar (DJED)
- **Reserve Coin**: Shen Reserve Coin (SHEN)
- **Djed Contract Address**: `0x624FcD0a1F9B5820c950FefD48087531d38387f4`
- **Stablecoin Address**: `0x6b930182787F346F18666D167e8d32166dC5eFBD`
- **Reserve Coin Address**: `0xc61ac381F4F585fd194D3C5cE20B76826b960e5E`

## Wallet Setup

### Connect to Sepolia Testnet

1. Open MetaMask (or your preferred Web3 wallet)
2. Add Sepolia network if not already added:
- **Network Name**: Sepolia Testnet
- **RPC URL**: `https://ethereum-sepolia.publicnode.com/`
- **Chain ID**: 11155111
- **Currency Symbol**: ETH
- **Block Explorer**: https://sepolia.etherscan.io/

### Get Test ETH

To interact with the protocol, you'll need Sepolia ETH:

1. Visit a Sepolia faucet:
- https://sepoliafaucet.com/
- https://www.alchemy.com/faucets/ethereum-sepolia
- https://faucet.quicknode.com/ethereum/sepolia

2. Enter your wallet address and request test ETH

## Features

The Djed Tefnut dashboard allows you to:

- **View Protocol Health**: Monitor reserve ratio, stability status, and system parameters
- **Mint Stablecoins (DJED)**: Exchange ETH for DJED stablecoins
- **Redeem Stablecoins**: Convert DJED back to ETH
- **Mint Reserve Coins (SHEN)**: Participate in the reserve mechanism
- **Redeem Reserve Coins**: Exchange SHEN for ETH

## Differences from Djed Osiris

Djed Tefnut includes several improvements over the previous Osiris implementation:

- Updated tokenomics and fee structure
- Enhanced reserve ratio management
- Improved oracle integration
- Optimized gas efficiency

## Troubleshooting

### Connection Issues

If you can't connect to the protocol:

1. Verify you're on the Sepolia testnet
2. Check that your wallet has sufficient Sepolia ETH
3. Clear your browser cache and reload the page
4. Ensure the `.env` file is correctly configured

### Transaction Failures

Common reasons for transaction failures:

- **Insufficient Balance**: Ensure you have enough Sepolia ETH
- **Reserve Ratio Out of Range**: The protocol may temporarily restrict certain operations
- **Slippage**: Price movements between transaction submission and execution
- **Gas Price Too Low**: Increase gas settings in your wallet

## Resources

- **Djed Protocol Documentation**: https://docs.djed.one
- **Sepolia Etherscan**: https://sepolia.etherscan.io/
- **Discord Community**: https://discord.gg/9SXM4jka
- **Twitter/X**: https://x.com/DjedStablecoin

## Support

For issues or questions:

1. Check the main [README](../README.md) for general setup instructions
2. Open an issue on GitHub: https://github.com/DjedAlliance/Djed-Solidity-WebDashboard/issues
3. Join our Discord: https://discord.gg/9SXM4jka

## Contract Verification

All Djed Tefnut contracts are verified on Sepolia Etherscan:

- [Djed Contract](https://sepolia.etherscan.io/address/0x624FcD0a1F9B5820c950FefD48087531d38387f4)
- [DJED Token](https://sepolia.etherscan.io/address/0x6b930182787F346F18666D167e8d32166dC5eFBD)
- [SHEN Token](https://sepolia.etherscan.io/address/0xc61ac381F4F585fd194D3C5cE20B76826b960e5E)
21 changes: 21 additions & 0 deletions env/sepolia-tefnut.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
###############
# APPLICATION #
###############
REACT_APP_BLOCKCHAIN_URI=https://ethereum-sepolia.publicnode.com/
REACT_APP_CHAIN_ID=11155111
REACT_APP_DJED_ADDRESS=0x624FcD0a1F9B5820c950FefD48087531d38387f4
REACT_APP_FEE_UI=0
REACT_APP_UI=0x0232556C83791b8291E9b23BfEa7d67405Bd9839
REACT_APP_EXPLORER=https://sepolia.etherscan.io/
REACT_APP_BC=Sepolia
REACT_APP_PROTOCOL_CHAIN_DESCRIPTION=Djed Tefnut deployed on Sepolia testnet - A formally verified crypto-backed algorithmic stablecoin protocol.
REACT_APP_CHAIN_COIN=ETH
REACT_APP_SC_NAME=Djed Tefnut Dollar
REACT_APP_SC_SYMBOL=DJED
REACT_APP_RC_NAME=Shen Reserve Coin
REACT_APP_RC_SYMBOL=SHEN
REACT_APP_LIMIT_PER_TXN=10000
REACT_APP_EVM_RESERVECOIN_ADDRESS=0xc61ac381F4F585fd194D3C5cE20B76826b960e5E
REACT_APP_EVM_STABLECOIN_ADDRESS=0x6b930182787F346F18666D167e8d32166dC5eFBD

REACT_APP_LOGO_PATH=Logo_symbol.png
52 changes: 52 additions & 0 deletions setup-env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@echo off
REM Djed Dashboard Environment Switcher (Windows)
REM This script helps you quickly switch between different Djed deployment configurations

echo.
echo Djed Dashboard - Environment Configuration
echo ==============================================
echo.
echo Available environments:
echo 1^) Djed Tefnut - Sepolia Testnet ^(sepolia-tefnut.env^)
echo 2^) Djed Osiris - Sepolia Testnet ^(sepolia.env^)
echo 3^) Milkomeda C1 - Mainnet ^(milkomeda.env^)
echo 4^) Milkomeda C1 - Testnet ^(milkomeda-testnet.env^)
echo 5^) Ethereum Classic - Mainnet ^(ethereum-classic.env^)
echo 6^) Mordor - Testnet ^(mordor.env^)
echo.
set /p choice="Select environment (1-6): "

if "%choice%"=="1" (
set ENV_FILE=env\sepolia-tefnut.env
set NAME=Djed Tefnut - Sepolia Testnet
) else if "%choice%"=="2" (
set ENV_FILE=env\sepolia.env
set NAME=Djed Osiris - Sepolia Testnet
) else if "%choice%"=="3" (
set ENV_FILE=env\milkomeda.env
set NAME=Milkomeda C1 - Mainnet
) else if "%choice%"=="4" (
set ENV_FILE=env\milkomeda-testnet.env
set NAME=Milkomeda C1 - Testnet
) else if "%choice%"=="5" (
set ENV_FILE=env\ethereum-classic.env
set NAME=Ethereum Classic - Mainnet
) else if "%choice%"=="6" (
set ENV_FILE=env\mordor.env
set NAME=Mordor - Testnet
) else (
echo Invalid choice. Exiting.
exit /b 1
)

if not exist "%ENV_FILE%" (
echo Error: %ENV_FILE% not found!
exit /b 1
)

copy "%ENV_FILE%" .env >nul
echo.
echo Environment configured: %NAME%
echo Configuration copied from: %ENV_FILE%
echo.
echo You can now start the development server with: npm start
59 changes: 59 additions & 0 deletions setup-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/bin/bash

# Djed Dashboard Environment Switcher
# This script helps you quickly switch between different Djed deployment configurations

echo "🔧 Djed Dashboard - Environment Configuration"
echo "=============================================="
echo ""
echo "Available environments:"
echo " 1) Djed Tefnut - Sepolia Testnet (sepolia-tefnut.env)"
echo " 2) Djed Osiris - Sepolia Testnet (sepolia.env)"
echo " 3) Milkomeda C1 - Mainnet (milkomeda.env)"
echo " 4) Milkomeda C1 - Testnet (milkomeda-testnet.env)"
echo " 5) Ethereum Classic - Mainnet (ethereum-classic.env)"
echo " 6) Mordor - Testnet (mordor.env)"
echo ""
read -p "Select environment (1-6): " choice

case $choice in
1)
ENV_FILE="env/sepolia-tefnut.env"
NAME="Djed Tefnut - Sepolia Testnet"
;;
2)
ENV_FILE="env/sepolia.env"
NAME="Djed Osiris - Sepolia Testnet"
;;
3)
ENV_FILE="env/milkomeda.env"
NAME="Milkomeda C1 - Mainnet"
;;
4)
ENV_FILE="env/milkomeda-testnet.env"
NAME="Milkomeda C1 - Testnet"
;;
5)
ENV_FILE="env/ethereum-classic.env"
NAME="Ethereum Classic - Mainnet"
;;
6)
ENV_FILE="env/mordor.env"
NAME="Mordor - Testnet"
;;
*)
echo "❌ Invalid choice. Exiting."
exit 1
;;
esac

if [ ! -f "$ENV_FILE" ]; then
echo "❌ Error: $ENV_FILE not found!"
exit 1
fi

cp "$ENV_FILE" .env
echo "✅ Environment configured: $NAME"
echo "📄 Configuration copied from: $ENV_FILE"
echo ""
echo "You can now start the development server with: npm start"