-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
100 lines (81 loc) · 5.23 KB
/
Copy pathenv.example
File metadata and controls
100 lines (81 loc) · 5.23 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
96
97
98
99
100
# Environment type (mainnet, testnet, or localnet)
# This determines the chain ID
ENV=testnet
# Arbitrum RPC URL (required)
# Should be a complete private RPC URL with API key included.
# Public fallback (rate-limited): https://arb1.arbitrum.io/rpc
# Recommended: a private endpoint, e.g. https://arb-mainnet.g.alchemy.com/v2/your-api-key
RPC_URL=https://your-rpc-provider.com/your-api-key
# Private key for the EIP-712 measurement signer (without 0x prefix). This
# wallet only signs beacon-update digests — it never holds or sends funds.
# All gas + guest funding transfers go through the WALLET_PRIVATE_KEYS /
# WALLET_KMS_* pool below, so those wallets need ETH AND testnet USDC for
# the fund_guest_wallet / fund_bonus_wallet routes.
PRIVATE_KEY=your_private_key_here_without_0x_prefix
# API access token for authentication
BEACONATOR_ACCESS_TOKEN=your_api_token_here
# Admin token for beacon type management endpoints (required)
BEACONATOR_ADMIN_TOKEN=your_admin_token_here
# Redis URL for wallet pool
REDIS_URL=redis://127.0.0.1:6379
# Gas-payer wallet pool for sending transactions (beacon creation, perp deployment, etc.)
# Production (AWS): keys are ECC_SECG_P256K1 SIGN_VERIFY, created via
# `cargo run --bin kms-wallet -- create`; the private key never leaves KMS. The
# task role needs kms:Sign + kms:GetPublicKey (address derivation at startup),
# plus kms:ListAliases when using WALLET_KMS_ALIAS_PREFIX discovery. Precedence when several are set:
# WALLET_KMS_KEY_IDS > WALLET_KMS_ALIAS_PREFIX > WALLET_PRIVATE_KEYS.
# Preferred: discover pool keys by alias prefix (kms:ListAliases). Expanding the
# pool is then `kms-wallet create --role wallet-N` + fund + service restart.
#WALLET_KMS_ALIAS_PREFIX=alias/perpcity/testnet/wallet-
# Explicit override: comma-separated KMS key ids / aliases / ARNs.
#WALLET_KMS_KEY_IDS=alias/perpcity/testnet/wallet-1,alias/perpcity/testnet/wallet-2
# Dev/CI fallback: comma-separated raw private keys (without 0x prefix).
WALLET_PRIVATE_KEYS=private_key_1,private_key_2,private_key_3
# Optional: Instance ID for wallet locking (auto-generated UUID if not set)
# BEACONATOR_INSTANCE_ID=instance-1
# Optional: Wallet pool balance sweep (see src/services/wallet/balances.rs).
# A background task periodically refreshes cached ETH/USDC balances for every
# pool wallet: below WALLET_MIN_ETH_WEI it logs a warning ("fund it") and
# selection proactively skips that wallet instead of sending through it and
# failing; both metrics are also published to CloudWatch (namespace PerpCity)
# best-effort (silently skipped without AWS credentials, e.g. local dev).
# WALLET_MIN_ETH_WEI=500000000000000 # 0.0005 ETH (default)
# WALLET_BALANCE_SWEEP_SECS=60 # seconds between sweeps (default)
# Contract addresses (replace with actual deployed contract addresses)
# Pinned to: beacons@v0.0.1, perpcity-contracts@v0.1.0 — see .contracts-versions
PERPCITY_REGISTRY_ADDRESS=0x3456789012345678901234567890123456789012
PERP_FACTORY_ADDRESS=0x5678901234567890123456789012345678901234
# ECDSA verifier factory address (required for beacon creation)
ECDSA_VERIFIER_FACTORY_ADDRESS=0x1234567890123456789012345678901234567890
# Optional: LBCGBM factory address (standalone beacon with CGBM + Bounded)
# LBCGBM_FACTORY_ADDRESS=0x1234567890123456789012345678901234567890
# Optional: WeightedSumComposite factory address (composite beacon with weighted sum)
# WEIGHTED_SUM_COMPOSITE_FACTORY_ADDRESS=0x1234567890123456789012345678901234567890
# USDC token address (different for mainnet/testnet).
# The default below matches the file's default ENV=testnet.
# Arbitrum Sepolia: 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
# Arbitrum One: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
USDC_ADDRESS=0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
# Multicall3 contract address for batch operations (optional)
# Canonical deployment, same address on every chain it ships on (Arbitrum included).
MULTICALL3_ADDRESS=0xcA11bde05977b3631167028862bE2a173976CA11
# Transfer limits for guest wallet funding
USDC_TRANSFER_LIMIT=1000000000 # 1000 USDC (6 decimals)
ETH_TRANSFER_LIMIT=10000000000000000 # 0.01 ETH in wei
# Perp module addresses (required, perpcity-contracts@v0.1.0)
# All five modules are passed in the Modules struct to PerpFactory.createPerp.
# Module implementations are deployed once per network and reused across markets.
FEES_MODULE_ADDRESS=0x1234567890123456789012345678901234567890
FUNDING_MODULE_ADDRESS=0x2345678901234567890123456789012345678901
MARGIN_RATIOS_MODULE_ADDRESS=0x3456789012345678901234567890123456789012
PRICE_IMPACT_MODULE_ADDRESS=0x4567890123456789012345678901234567890123
PRICING_MODULE_ADDRESS=0x5678901234567890123456789012345678901234
# Optional: ProtocolFeeManager and ModuleRegistry addresses (governance / diagnostics).
# Not used by the deploy / open flows.
# PROTOCOL_FEE_MANAGER_ADDRESS=0x6789012345678901234567890123456789012345
# MODULE_REGISTRY_ADDRESS=0x789012345678901234567890123456789012345a
# Optional: JSON map of component factory addresses seeded into Redis at startup.
# Existing Redis entries are never overwritten. Set by the AWS deployment
# (perpcity-client/sst.config.ts) where Redis is VPC-internal; local dev and
# Railway can keep seeding Redis directly instead.
# COMPONENT_FACTORIES_JSON={"CGBMFactory":"0x...","StandaloneBeaconFactory":"0x..."}