chadswap

Crates.iochadswap
lib.rschadswap
version0.1.3
created_at2025-12-24 17:50:20.840657+00
updated_at2025-12-24 18:22:05.942724+00
descriptionChadSwap DEX CLI - Swap tokens on Fantom Opera from your terminal
homepage
repositoryhttps://github.com/GFTM/swap
max_upload_size
id2003628
size144,940
Gui (GFTM)

documentation

README

ChadSwap CLI

Swap tokens on Fantom Opera from your terminal! 🚀

Installation

cargo install chadswap

Or install from source:

git clone https://github.com/GFTM/swap
cd swap/chadswap-cli
cargo install --path .

Quick Start

  1. Set your private key:
export PRIVATE_KEY=your_private_key_here
  1. Run ChadSwap:
chadswap

Usage

Interactive Mode

Simply run chadswap to enter interactive mode with a beautiful menu:

chadswap

Commands

Check your token balances:

chadswap balance

Start a swap:

chadswap swap

View configuration:

chadswap config

Configuration

ChadSwap looks for a config file at ~/.config/chadswap/config.toml. You can customize:

  • RPC endpoints
  • Default slippage
  • Supported tokens
  • Contract addresses

Example config:

rpc_url = "https://rpc.fantom.network"
chain_id = 250
default_slippage = 0.5

swapper_address = "0xcBc0C8919f95688b400723Bc742575723EF25074"
vault_address = "0x4E8d6150c1C1f453cc41431231189b8BDe88740F"
router_address = "0x6D0176C5ea1e44b08D3dd001b0784cE42F47a3A7"

[[tokens]]
symbol = "FTM"
name = "Fantom"
address = "0x0000000000000000000000000000000000000000"
decimals = 18
is_native = true

[[tokens]]
symbol = "WFTM"
name = "Wrapped Fantom"
address = "0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83"
decimals = 18

Features

  • 💱 Swap any supported token on Fantom Opera
  • 💰 Check token balances
  • ⚡ Fast and responsive TUI
  • 🎨 Beautiful colored output
  • 🔒 Secure (uses your private key from environment)
  • ⚙️ Customizable via config file

Security

  • Never share your private key
  • Use environment variables or .env file
  • The CLI never stores or transmits your private key anywhere

Contract Addresses

  • Swapper: 0xcBc0C8919f95688b400723Bc742575723EF25074
  • Vault: 0x4E8d6150c1C1f453cc41431231189b8BDe88740F
  • Router: 0x6D0176C5ea1e44b08D3dd001b0784cE42F47a3A7

License

MIT

Links

Commit count: 0

cargo fmt