Skip to content

This is Smart Contract what deployed on Arch Network. Made Rune LP over Arch so users can etch Rune and swap easily on Arch Network.

License

Notifications You must be signed in to change notification settings

topnotch1998/Arch-Rune-LP

Repository files navigation

Rune LP on Arch Network Vision Dashboard

Rune Liquidity Pool On Arch Network This is Smart Contract what made by Rust & Arch

Features

  • Real-time NAV (Net Asset Value) tracking and visualization
  • Bitcoin wallet integration for buying and selling Rune Token
  • Portfolio performance monitoring
  • Transparent fund management

Prerequisites

  • Node.js 16.x or later
  • npm 7.x or later
  • A Bitcoin wallet (e.g., Xverse, Unisat, or Leather)
  • Rust and Cargo
  • Linux environment (tested on Manjaro)
  • Access to Bitcoin network (regtest for development)
  • Arch Network CLI tools

Development Environment Setup

1. System Dependencies

# For Manjaro/Arch Linux
sudo pacman -S base-devel clang llvm rocksdb snappy zlib bzip2

2. Bitcoin Core Setup

# Install Bitcoin Core
sudo pacman -S bitcoin

# Create Bitcoin configuration
mkdir -p ~/.bitcoin
echo "regtest=1
server=1
rpcuser=bitcoin
rpcpassword=bitcoinpass
rpcallowip=0.0.0.0/0
rpcbind=0.0.0.0" > ~/.bitcoin/bitcoin.conf

# Start Bitcoin daemon in regtest mode
bitcoind -regtest -daemon

3. Electrs Setup

# Create directory for Arch tools
mkdir -p ~/Coding/arch-tools
cd ~/Coding/arch-tools

# Clone and build Electrs
git clone https://github.com/Arch-Network/electrs.git
cd electrs
cargo build --release

4. Arch Validator Setup

# Create project directory
mkdir -p ~/Coding/Rune-LP-Testnet
cd ~/Coding/Rune-LP-Testnet

# Initialize validator directory
mkdir -p .arch-validator

Running the Development Environment

  1. Start Bitcoin Core (if not already running):
bitcoind -regtest -daemon -rpcuser=bitcoin -rpcpassword=bitcoinpass -rpcallowip=0.0.0.0/0 -rpcbind=0.0.0.0 -server=1
  1. Run Electrs (in a separate terminal):
cd ~/Coding/arch-tools/electrs
cargo run --release --bin electrs -- -vvvv --daemon-dir ~/.bitcoin --network regtest --cookie bitcoin:bitcoinpass --main-loop-delay 0
  1. Start Arch validator (in another terminal):
cd ~/Coding/Rune-LP-Testnet
arch-cli validator-start
  1. Start the frontend development server:
npm run dev

Development Approaches

Option 1: Frontend with Mocked Backend

  1. Configure mock environment:
# Copy the example env file
cp .env.local.example .env.local

# Update with mock values for development
NEXT_PUBLIC_PROGRAM_ID=mock_program_id
NEXT_PUBLIC_TREASURY_ADDRESS=mock_treasury_address
NEXT_PUBLIC_ARCH_ENDPOINT=http://localhost:8000
NEXT_PUBLIC_MOCK_MODE=true
  1. Run the development server:
npm run dev

Option 2: Full Stack Development

Requirements:

  • Running Bitcoin Core in regtest mode
  • Running Electrs indexer
  • Running Arch validator
  • Hardware wallet for treasury management (production only)

Stopping the Development Environment

  1. Stop Bitcoin Core:
bitcoin-cli -regtest stop
  1. Stop Electrs and Arch validator:
  • Use Ctrl+C in their respective terminals

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This is Smart Contract what deployed on Arch Network. Made Rune LP over Arch so users can etch Rune and swap easily on Arch Network.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published