Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

DEX2-0/dex2_0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DEX Screener - Token-2022 Analytics & Trading Platform

A modern mobile application built with React Native and Expo that provides real-time analytics and trading capabilities for Token-2022 tokens on the Solana blockchain.

๐Ÿš€ Features

Token-2022 Program Features

  • Transfer Hooks: Programmable token transfers with custom logic
  • Confidential Transfers: Private token transfers with encryption
  • Metadata Pointers: Dynamic metadata linked to external sources
  • Advanced Mint Management: Full control over token creation and management

Mobile App Features

  • Dark Theme UI: Modern black-themed interface with Space Grotesk fonts
  • Floating Navigation: Custom animated bottom navigation bar
  • Wallet Integration: Seamless wallet connection and management
  • Real-time Analytics: Live market data and trading insights
  • Portfolio Management: Track and manage Token-2022 assets
  • Airdrop Support: Easy SOL airdrop requests for testing

๐Ÿ—๏ธ Project Structure

dex2_0/
โ”œโ”€โ”€ app/                          # Expo Router app directory
โ”‚   โ”œโ”€โ”€ (tabs)/                   # Tab navigation screens
โ”‚   โ”‚   โ”œโ”€โ”€ index.tsx            # Home screen
โ”‚   โ”‚   โ”œโ”€โ”€ portfolio.tsx        # Portfolio management
โ”‚   โ”‚   โ”œโ”€โ”€ search.tsx           # Token search
โ”‚   โ”‚   โ””โ”€โ”€ settings.tsx         # App settings
โ”‚   โ”œโ”€โ”€ sign-in.tsx              # Wallet connection screen
โ”‚   โ””โ”€โ”€ _layout.tsx              # Root layout
โ”œโ”€โ”€ components/                   # Reusable UI components
โ”‚   โ”œโ”€โ”€ app-theme.tsx           # Theme configuration
โ”‚   โ”œโ”€โ”€ app-providers.tsx       # Context providers
โ”‚   โ””โ”€โ”€ auth/                   # Authentication components
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ””โ”€โ”€ AppContext.tsx      # Main app context
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ WalletService.ts    # Wallet management
โ”‚   โ”‚   โ”œโ”€โ”€ DEXService.ts       # DEX integration
โ”‚   โ”‚   โ””โ”€โ”€ Token2022Service.ts # Token-2022 operations
โ”‚   โ””โ”€โ”€ screens/                # Screen components
โ”œโ”€โ”€ programs/
โ”‚   โ””โ”€โ”€ token-2022/             # Solana program
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ””โ”€โ”€ lib.rs          # Token-2022 smart contract
โ”‚       โ””โ”€โ”€ Cargo.toml          # Rust dependencies
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ fonts/                  # Space Grotesk fonts
โ””โ”€โ”€ android/                    # Android configuration

๐ŸŽจ Design System

Colors

  • Primary: #ffffff (White for active elements)
  • Background: #000000 (Pure black)
  • Surface: #1a1a1a (Dark gray for cards)
  • Text: #ffffff (White text)
  • Muted: #666666 (Gray for secondary text)
  • Success: #10b981 (Green)
  • Error: #ef4444 (Red)
  • Warning: #f59e0b (Orange)
  • Accent: #6366f1 (Indigo)

Typography

  • Font Family: Space Grotesk
  • Weights: Regular, SemiBold, Bold
  • Usage: Consistent typography throughout the app

๐Ÿ”ง Smart Contract Features

Token-2022 Program (programs/token-2022/src/lib.rs)

Core Functions

  • initialize_mint: Create new Token-2022 mints with advanced features
  • create_account: Create Token-2022 accounts with transfer hook support
  • transfer_with_hook: Execute transfers with custom logic
  • enable_confidential_transfers: Enable private transfers
  • confidential_transfer: Perform encrypted transfers
  • set_metadata_pointer: Configure dynamic metadata
  • mint_to: Mint new tokens
  • burn: Burn tokens

Advanced Features

  1. Transfer Hooks: Custom logic executed on every transfer
  2. Confidential Transfers: Encrypted token transfers
  3. Metadata Pointers: Dynamic metadata from external sources
  4. Event Tracking: Comprehensive event logging
  5. Error Handling: Robust error management

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • Yarn or npm
  • Expo CLI
  • Rust and Cargo (for smart contract development)
  • Solana CLI tools

Installation

  1. Clone the repository

    git clone <repository-url>
    cd dex2_0
  2. Install dependencies

    yarn install
  3. Install Rust dependencies (for smart contract)

    cd programs/token-2022
    cargo build
    cd ../..
  4. Start the development server

    yarn start

Environment Setup

  1. Solana Configuration

    solana config set --url devnet
  2. Build the smart contract

    anchor build
  3. Deploy the program

    anchor deploy

๐Ÿ“ฑ App Usage

Wallet Connection

  1. Open the app
  2. Tap "Connect Demo Wallet" for testing
  3. Or import a private key for production use
  4. Request SOL airdrop for testing

Token-2022 Features

  1. Create Tokens: Initialize new Token-2022 mints
  2. Transfer Hooks: Set custom transfer logic
  3. Confidential Transfers: Enable private transfers
  4. Metadata Management: Configure dynamic metadata
  5. Portfolio Tracking: Monitor Token-2022 assets

Navigation

  • Home: Market overview and trending tokens
  • Search: Find and analyze tokens
  • Portfolio: Manage your Token-2022 assets
  • Settings: App configuration

๐Ÿ”’ Security Features

Smart Contract Security

  • Comprehensive input validation
  • Authority checks for all operations
  • Secure transfer hook execution
  • Confidential transfer encryption
  • Event logging for audit trails

Mobile App Security

  • Secure wallet key management
  • Encrypted storage for sensitive data
  • Network security with HTTPS
  • Input sanitization and validation

๐Ÿงช Testing

Smart Contract Tests

cd programs/token-2022
cargo test

Mobile App Tests

yarn test

Integration Tests

yarn test:integration

๐Ÿ“ฆ Deployment

Smart Contract Deployment

  1. Build the program

    anchor build
  2. Deploy to devnet

    anchor deploy --provider.cluster devnet
  3. Deploy to mainnet

    anchor deploy --provider.cluster mainnet

Mobile App Deployment

  1. Build for production

    expo build:android
    expo build:ios
  2. Submit to app stores

    expo submit:android
    expo submit:ios

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

Code Style

  • Use TypeScript for type safety
  • Follow React Native best practices
  • Use Space Grotesk fonts consistently
  • Maintain dark theme design
  • Add comprehensive error handling

๐Ÿ“„ License

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

๐Ÿ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Check the documentation
  • Review the smart contract code
  • Test with devnet first

๐Ÿ”ฎ Roadmap

Phase 1 (Current)

  • โœ… Basic Token-2022 integration
  • โœ… Dark theme UI
  • โœ… Wallet connection
  • โœ… Portfolio management

Phase 2 (Next)

  • ๐Ÿ”„ Advanced transfer hooks
  • ๐Ÿ”„ Confidential transfer UI
  • ๐Ÿ”„ Metadata pointer management
  • ๐Ÿ”„ Real-time price feeds

Phase 3 (Future)

  • ๐Ÿ“‹ DEX integration
  • ๐Ÿ“‹ Advanced analytics
  • ๐Ÿ“‹ Social features
  • ๐Ÿ“‹ Cross-chain support

๐ŸŽฏ Token-2022 Program ID

The Token-2022 program is deployed at:

TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

This is the official Solana Token-2022 program that provides advanced token features beyond the standard SPL Token program.


Note: This is a demonstration app for Token-2022 analytics and trading. Always test thoroughly on devnet before using on mainnet.

=======

DEX Screener - Token-2022 Analytics & Trading Platform

DEX Screener App Icon

A modern mobile application built with React Native and Expo that provides real-time analytics and trading capabilities for Token-2022 tokens on the Solana blockchain.

๐Ÿš€ Features

Token-2022 Program Features

  • Transfer Hooks: Programmable token transfers with custom logic
  • Confidential Transfers: Private token transfers with encryption
  • Metadata Pointers: Dynamic metadata linked to external sources
  • Advanced Mint Management: Full control over token creation and management

Mobile App Features

  • Dark Theme UI: Modern black-themed interface with Space Grotesk fonts
  • Floating Navigation: Custom animated bottom navigation bar
  • Wallet Integration: Seamless wallet connection and management
  • Real-time Analytics: Live market data and trading insights
  • Portfolio Management: Track and manage Token-2022 assets
  • Airdrop Support: Easy SOL airdrop requests for testing

๐Ÿ—๏ธ Project Structure

dex2_0/
โ”œโ”€โ”€ app/                          # Expo Router app directory
โ”‚   โ”œโ”€โ”€ (tabs)/                   # Tab navigation screens
โ”‚   โ”‚   โ”œโ”€โ”€ index.tsx            # Home screen
โ”‚   โ”‚   โ”œโ”€โ”€ portfolio.tsx        # Portfolio management
โ”‚   โ”‚   โ”œโ”€โ”€ search.tsx           # Token search
โ”‚   โ”‚   โ””โ”€โ”€ settings.tsx         # App settings
โ”‚   โ”œโ”€โ”€ sign-in.tsx              # Wallet connection screen
โ”‚   โ””โ”€โ”€ _layout.tsx              # Root layout
โ”œโ”€โ”€ components/                   # Reusable UI components
โ”‚   โ”œโ”€โ”€ app-theme.tsx           # Theme configuration
โ”‚   โ”œโ”€โ”€ app-providers.tsx       # Context providers
โ”‚   โ””โ”€โ”€ auth/                   # Authentication components
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ context/
โ”‚   โ”‚   โ””โ”€โ”€ AppContext.tsx      # Main app context
โ”‚   โ”œโ”€โ”€ services/
โ”‚   โ”‚   โ”œโ”€โ”€ WalletService.ts    # Wallet management
โ”‚   โ”‚   โ”œโ”€โ”€ DEXService.ts       # DEX integration
โ”‚   โ”‚   โ””โ”€โ”€ Token2022Service.ts # Token-2022 operations
โ”‚   โ””โ”€โ”€ screens/                # Screen components
โ”œโ”€โ”€ programs/
โ”‚   โ””โ”€โ”€ token-2022/             # Solana program
โ”‚       โ”œโ”€โ”€ src/
โ”‚       โ”‚   โ””โ”€โ”€ lib.rs          # Token-2022 smart contract
โ”‚       โ””โ”€โ”€ Cargo.toml          # Rust dependencies
โ”œโ”€โ”€ assets/
โ”‚   โ””โ”€โ”€ fonts/                  # Space Grotesk fonts
โ””โ”€โ”€ android/                    # Android configuration

๐ŸŽจ Design System

Colors

  • Primary: #ffffff (White for active elements)
  • Background: #000000 (Pure black)
  • Surface: #1a1a1a (Dark gray for cards)
  • Text: #ffffff (White text)
  • Muted: #666666 (Gray for secondary text)
  • Success: #10b981 (Green)
  • Error: #ef4444 (Red)
  • Warning: #f59e0b (Orange)
  • Accent: #6366f1 (Indigo)

Typography

  • Font Family: Space Grotesk
  • Weights: Regular, SemiBold, Bold
  • Usage: Consistent typography throughout the app

๐Ÿ”ง Smart Contract Features

Token-2022 Program (programs/token-2022/src/lib.rs)

Core Functions

  • initialize_mint: Create new Token-2022 mints with advanced features
  • create_account: Create Token-2022 accounts with transfer hook support
  • transfer_with_hook: Execute transfers with custom logic
  • enable_confidential_transfers: Enable private transfers
  • confidential_transfer: Perform encrypted transfers
  • set_metadata_pointer: Configure dynamic metadata
  • mint_to: Mint new tokens
  • burn: Burn tokens

Advanced Features

  1. Transfer Hooks: Custom logic executed on every transfer
  2. Confidential Transfers: Encrypted token transfers
  3. Metadata Pointers: Dynamic metadata from external sources
  4. Event Tracking: Comprehensive event logging
  5. Error Handling: Robust error management

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • Yarn or npm
  • Expo CLI
  • Rust and Cargo (for smart contract development)
  • Solana CLI tools

Installation

  1. Clone the repository

    git clone <repository-url>
    cd dex2_0
  2. Install dependencies

    yarn install
  3. Install Rust dependencies (for smart contract)

    cd programs/token-2022
    cargo build
    cd ../..
  4. Start the development server

    yarn start

Environment Setup

  1. Solana Configuration

    solana config set --url devnet
  2. Build the smart contract

    anchor build
  3. Deploy the program

    anchor deploy

๐Ÿ“ฑ App Usage

Wallet Connection

  1. Open the app
  2. Tap "Connect Demo Wallet" for testing
  3. Or import a private key for production use
  4. Request SOL airdrop for testing

Token-2022 Features

  1. Create Tokens: Initialize new Token-2022 mints
  2. Transfer Hooks: Set custom transfer logic
  3. Confidential Transfers: Enable private transfers
  4. Metadata Management: Configure dynamic metadata
  5. Portfolio Tracking: Monitor Token-2022 assets

Navigation

  • Home: Market overview and trending tokens
  • Search: Find and analyze tokens
  • Portfolio: Manage your Token-2022 assets
  • Settings: App configuration

๐Ÿ”’ Security Features

Smart Contract Security

  • Comprehensive input validation
  • Authority checks for all operations
  • Secure transfer hook execution
  • Confidential transfer encryption
  • Event logging for audit trails

Mobile App Security

  • Secure wallet key management
  • Encrypted storage for sensitive data
  • Network security with HTTPS
  • Input sanitization and validation

๐Ÿงช Testing

Smart Contract Tests

cd programs/token-2022
cargo test

Mobile App Tests

yarn test

Integration Tests

yarn test:integration

๐Ÿ“ฆ Deployment

Smart Contract Deployment

  1. Build the program

    anchor build
  2. Deploy to devnet

    anchor deploy --provider.cluster devnet
  3. Deploy to mainnet

    anchor deploy --provider.cluster mainnet

Mobile App Deployment

  1. Build for production

    expo build:android
    expo build:ios
  2. Submit to app stores

    expo submit:android
    expo submit:ios

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new features
  5. Submit a pull request

Code Style

  • Use TypeScript for type safety
  • Follow React Native best practices
  • Use Space Grotesk fonts consistently
  • Maintain dark theme design
  • Add comprehensive error handling

๐Ÿ“„ License

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

๐Ÿ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Check the documentation
  • Review the smart contract code
  • Test with devnet first

๐Ÿ”ฎ Roadmap

Phase 1 (Current)

  • โœ… Basic Token-2022 integration
  • โœ… Dark theme UI
  • โœ… Wallet connection
  • โœ… Portfolio management

Phase 2 (Next)

  • ๐Ÿ”„ Advanced transfer hooks
  • ๐Ÿ”„ Confidential transfer UI
  • ๐Ÿ”„ Metadata pointer management
  • ๐Ÿ”„ Real-time price feeds

Phase 3 (Future)

  • ๐Ÿ“‹ DEX integration
  • ๐Ÿ“‹ Advanced analytics
  • ๐Ÿ“‹ Social features
  • ๐Ÿ“‹ Cross-chain support

๐ŸŽฏ Token-2022 Program ID

The Token-2022 program is deployed at:

TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

This is the official Solana Token-2022 program that provides advanced token features beyond the standard SPL Token program.


Note: This is a demonstration app for Token-2022 analytics and trading. Always test thoroughly on devnet before using on mainnet.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •