Skip to content

Assetux/voting

Repository files navigation

ASX Governance

On-chain governance for the ASX token ecosystem, built on Solana. Token holders propose and vote on protocol decisions — fully decentralized, no intermediaries.

  • Program ID: E6AZG5u8Um9rkw94gjpZNS4KUNLfkHiRMVrPcgoP6wiC
  • ASX Mint: cyaiYgJhfSuFY7yz8iNeBwsD1XNDzZXVBEGubuuxdma
  • Network: Solana Mainnet

Setup

Prerequisites

  • Node.js 18+
  • Expo CLI: npm install -g expo-cli
  • Yarn: npm install -g yarn
  • A Helius account for a mainnet RPC endpoint (free tier works)

Install

cd mobile
yarn install

Environment

Copy the example env file and fill in your Helius RPC URL:

cp .env.example .env

Edit .env:

EXPO_PUBLIC_HELIUS_RPC=https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY_HERE

Without this, the app falls back to the public Solana RPC which may be rate-limited.


Running

Expo Go (quickest — no build required)

yarn start

Scan the QR code with the Expo Go app on your phone.

Note: Wallet signing on mobile requires a wallet app that supports the Solana Mobile Wallet Adapter protocol (e.g. Phantom, Solflare). Expo Go supports read-only views without a connected wallet.

Android via USB

  1. Enable Developer Options and USB Debugging on your Android device.
  2. Connect via USB and verify it's recognized:
    adb devices
  3. Start with tunnel mode so the device can reach your dev server:
    yarn start --tunnel
    Or for a local network connection (device and computer on same Wi-Fi):
    yarn start
  4. Open Expo Go on the device and scan the QR code, or press a in the terminal to open directly on the connected Android device.

Android build (native)

Required if you need the full Mobile Wallet Adapter flow (wallet signing on device):

yarn android

This compiles a debug APK and installs it. Requires Android Studio and a configured SDK path (ANDROID_HOME).


Screens

Screen Description
About Project overview, governance parameters, on-chain addresses
Vote Browse live proposals, cast FOR/AGAINST votes
Propose Submit a governance proposal (requires 10M+ ASX)
History Full log of all votes cast on-chain
Setup Program registry, proposal count, governance config

Governance Rules

Parameter Value
Total supply 1,000,000,000 ASX
Minimum to propose 10,000,000 ASX
Pass threshold 500,100,000 ASX voting FOR (50.01% of supply)
Vote weight Direct ASX token balance
Double-vote protection VoteRecord PDA per voter per proposal

Tech Stack

  • React Native (Expo ~55) — iOS, Android, Web
  • Solana Web3.js — RPC and transaction construction
  • Anchor (@coral-xyz/anchor 0.32) — smart contract interaction
  • Solana Mobile Wallet Adapter — native wallet signing on Android/iOS
  • Phantom (window.solana) — browser wallet signing on Web

Contract Addresses

Label Address
Program E6AZG5u8Um9rkw94gjpZNS4KUNLfkHiRMVrPcgoP6wiC
ASX Mint cyaiYgJhfSuFY7yz8iNeBwsD1XNDzZXVBEGubuuxdma
Deploy TX 5hz2Km9bZWXZskAjtcoiKZFH5X36CoHgFsho85jQyDZ4nHC2gA8A7yJe7qgPZ4uDbcexAYFur9K7cWamFSvJAfF