-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.env.example
More file actions
95 lines (85 loc) · 2.55 KB
/
.env.example
File metadata and controls
95 lines (85 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# db configuration
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=your_password
DB_DATABASE=truthbounty_dev
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/truthbounty
# Blockchain
BLOCKCHAIN_RPC_URL=https://mainnet.infura.io/v3/YOUR_INFURA_KEY
REWARD_CONTRACT_ADDRESS=0xYourContractAddress
START_BLOCK=18000000
REQUIRED_CONFIRMATIONS=12
# ==============================================
# Application Configuration
# ==============================================
NODE_ENV=development
PORT=3000
# ==============================================
# Database Configuration (PostgreSQL)
# ==============================================
# PostgreSQL connection settings for TypeORM
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_NAME=truthbounty
# TypeORM settings
DATABASE_SYNCHRONIZE=false # Set to 'true' only in development (auto-sync schema)
DATABASE_LOGGING=false # Set to 'true' to enable SQL query logging
# ==============================================
# Redis Configuration
# ==============================================
# Redis is used for caching and session management
# The application will start even if Redis is unavailable (with warnings)
REDIS_ENABLED=true
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_DB=0
REDIS_TLS=false # Set to 'true' for production with TLS
CACHE_CLAIMS_TTL=3600 # Claim cache TTL in seconds
# ==============================================
# Blockchain Configuration
# ==============================================
# Redis configuration
REDIS_HOST=localhost
REDIS_PORT=6379
# Rate limiting (requests per TTL in seconds)
RATE_LIMIT_CLAIMS_TTL=60
RATE_LIMIT_CLAIMS_LIMIT=5
RATE_LIMIT_VOTES_TTL=60
RATE_LIMIT_VOTES_LIMIT=20
RATE_LIMIT_DISPUTES_TTL=60
RATE_LIMIT_DISPUTES_LIMIT=3
# Optimism RPC Configuration
OPTIMISM_RPC_URL=https://mainnet.optimism.io
CHAIN_ID=10
# Event Indexer Configuration
CONFIRMATIONS_REQUIRED=12
BLOCK_RANGE_PER_BATCH=5000
MAX_RETRY_ATTEMPTS=3
POLLING_INTERVAL_MS=12000
# Indexed Contracts Configuration
# Format: JSON array of contract configurations
# INDEXED_CONTRACTS='[
# {
# "address": "0x...",
# "name": "StakeContract",
# "startBlock": 1000000,
# "events": [
# {
# "name": "Staked",
# "signature": "0x...",
# "abi": {...}
# }
# ]
# }
# ]'
INDEXED_CONTRACTS='[]'
# ==============================================
# Prisma Configuration (SQLite/LibSQL)
# ==============================================
# Used for user/wallet management (separate from TypeORM)
DATABASE_URL=file:./dev.db