mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-21 23:47:56 +00:00
159700eade
Security Infrastructure: - Add .gitattributes for merge conflict protection and sensitive file handling - Add SECURITY.md with detailed security policies and procedures - Add pre-commit hook template for local secret detection - Add GitHub Actions workflow for automated security scanning - Add comprehensive documentation for git hooks Code Security Improvements: - Fix AuthContext.tsx: Remove hardcoded credentials, use environment variables - Migrate WalletContext.tsx: Replace Ethereum/MetaMask with Polkadot.js - Refactor lib/wallet.ts: Complete Substrate configuration with asset management - Update TokenSwap.tsx: Add real API integration for balance queries - Update StakingDashboard.tsx: Add blockchain integration placeholders Environment Management: - Update .env with proper security warnings - Update .env.example with comprehensive template - All sensitive data now uses environment variables - Demo mode controllable via VITE_ENABLE_DEMO_MODE flag Security Measures Implemented: ✅ 4-layer protection (gitignore + gitattributes + pre-commit + CI/CD) ✅ Automated secret scanning (TruffleHog + Gitleaks) ✅ Pre-commit hooks prevent accidental commits ✅ CI/CD pipeline validates all PRs ✅ Environment variable validation ✅ Dependency security auditing Breaking Changes: - WalletContext now uses Polkadot.js instead of MetaMask - lib/wallet.ts completely rewritten for Substrate - ASSET_IDs and CHAIN_CONFIG exported from lib/wallet.ts - Demo mode must be explicitly enabled Migration Notes: - Install pre-commit hook: cp .git-hooks/pre-commit.example .git/hooks/pre-commit - Copy environment: cp .env.example .env - Update .env with your credentials - Enable GitHub Actions in repository settings Co-authored-by: Claude <noreply@anthropic.com>
100 lines
2.9 KiB
Bash
100 lines
2.9 KiB
Bash
# ========================================
|
|
# PezkuwiChain - Configuration Template
|
|
# ========================================
|
|
# Copy this file to .env and update with your actual values
|
|
# WARNING: Never commit .env file to git!
|
|
|
|
# ========================================
|
|
# NETWORK CONFIGURATION
|
|
# ========================================
|
|
VITE_NETWORK=local
|
|
# Options: mainnet, staging, testnet, beta, development, local
|
|
|
|
# Network Endpoints (WebSocket)
|
|
VITE_MAINNET_WS=wss://mainnet.pezkuwichain.io
|
|
VITE_STAGING_WS=wss://staging.pezkuwichain.io
|
|
VITE_TESTNET_WS=wss://testnet.pezkuwichain.io
|
|
VITE_BETA_WS=wss://beta.pezkuwichain.io
|
|
VITE_DEVELOPMENT_WS=ws://127.0.0.1:9944
|
|
VITE_LOCAL_WS=ws://127.0.0.1:9945
|
|
|
|
# Default active endpoint
|
|
VITE_CHAIN_ENDPOINT=ws://127.0.0.1:9944
|
|
|
|
# ========================================
|
|
# AUTHENTICATION & SECURITY
|
|
# ========================================
|
|
# IMPORTANT: These credentials are for DEMO/TESTING ONLY
|
|
# DO NOT use in production! DO NOT commit actual passwords!
|
|
|
|
# Demo founder account (leave empty for production)
|
|
VITE_DEMO_FOUNDER_EMAIL=
|
|
VITE_DEMO_FOUNDER_PASSWORD=
|
|
VITE_DEMO_FOUNDER_ID=founder-001
|
|
|
|
# Enable demo mode (false in production)
|
|
VITE_ENABLE_DEMO_MODE=true
|
|
|
|
# ========================================
|
|
# SUPABASE CONFIGURATION
|
|
# ========================================
|
|
# Get your credentials from: https://supabase.com/dashboard
|
|
|
|
VITE_SUPABASE_URL=your_supabase_project_url
|
|
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
|
|
|
|
# ========================================
|
|
# SUBSTRATE ASSET IDs
|
|
# ========================================
|
|
# These correspond to assets in the Assets pallet
|
|
|
|
VITE_ASSET_PEZ=1
|
|
VITE_ASSET_HEZ=2
|
|
VITE_ASSET_USDT=3
|
|
VITE_ASSET_BTC=4
|
|
VITE_ASSET_ETH=5
|
|
VITE_ASSET_DOT=6
|
|
|
|
# ========================================
|
|
# CHAIN SPECIFICATIONS
|
|
# ========================================
|
|
VITE_CHAIN_NAME=PezkuwiChain
|
|
VITE_CHAIN_TOKEN_SYMBOL=PEZ
|
|
VITE_CHAIN_TOKEN_DECIMALS=12
|
|
VITE_CHAIN_SS58_FORMAT=42
|
|
|
|
# Chain IDs (generated from genesis hash)
|
|
VITE_MAINNET_CHAIN_ID=0x1234abcd
|
|
VITE_STAGING_CHAIN_ID=0x5678efgh
|
|
VITE_TESTNET_CHAIN_ID=0x9abcijkl
|
|
VITE_BETA_CHAIN_ID=0xdef0mnop
|
|
VITE_DEV_CHAIN_ID=0xlocaldev
|
|
VITE_LOCAL_CHAIN_ID=0xlocaltest
|
|
|
|
# ========================================
|
|
# EXPLORER & EXTERNAL SERVICES
|
|
# ========================================
|
|
|
|
# Polkadot.js Apps (default explorer)
|
|
VITE_EXPLORER_URL=https://polkadot.js.org/apps/?rpc=
|
|
|
|
# Custom block explorer (when available)
|
|
VITE_CUSTOM_EXPLORER_URL=https://explorer.pezkuwichain.io
|
|
|
|
# WebSocket for real-time updates
|
|
VITE_WS_URL=wss://ws.pezkuwichain.io
|
|
|
|
# ========================================
|
|
# FEATURE FLAGS
|
|
# ========================================
|
|
VITE_ENABLE_KYC=false
|
|
VITE_ENABLE_P2P_MARKET=true
|
|
VITE_ENABLE_GOVERNANCE=true
|
|
VITE_ENABLE_STAKING=true
|
|
|
|
# ========================================
|
|
# DEVELOPMENT & DEBUGGING
|
|
# ========================================
|
|
VITE_DEBUG_MODE=false
|
|
VITE_LOG_LEVEL=info
|
|
VITE_API_TIMEOUT=30000 |