-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
112 lines (92 loc) · 5.37 KB
/
Copy path.env.example
File metadata and controls
112 lines (92 loc) · 5.37 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
101
102
103
104
105
106
107
108
109
110
111
112
# ─────────────────────────────────────────────────────────────
# SentryPay — Environment Variables
# Copy this file to .env and fill in your values.
# NEVER commit .env — it is gitignored.
# ─────────────────────────────────────────────────────────────
# ─── Wallets (DO NOT USE PRODUCTION KEYS) ────────────────────
# Deployer: used to deploy contracts and own PolicyRegistry/Pool/Trigger
DEPLOYER_PRIVATE_KEY=0x...
# AI Signer: dedicated hot wallet for the monitor. Keep balance minimal (gas only).
AI_SIGNER_PRIVATE_KEY=0x...
# AI Signer public address (used by deploy scripts and the frontend)
AI_SIGNER_ADDRESS=0x...
# ─── RPC Endpoints ──────────────────────────────────────────
# HashKey Chain Mainnet
HASHKEY_MAINNET_RPC=https://mainnet.hsk.xyz
# HashKey Chain Testnet
HASHKEY_TESTNET_RPC=https://testnet.hsk.xyz
# Active RPC used by the monitor
RPC_URL=https://testnet.hsk.xyz
# ─── HSP Router ─────────────────────────────────────────────
# Mainnet: real HSP router address from https://hsp-hackathon.hashkeymerchant.com/docs
HSP_ROUTER_ADDRESS_MAINNET=0x...
# Testnet: real HSP router or leave blank to use MockHSPRouter fallback
HSP_ROUTER_ADDRESS_TESTNET=
# ─── Deployed Contract Addresses ────────────────────────────
# Populated automatically by deploy scripts into deployments.*.json
# Also set here for the monitor if you don't want to parse the JSON file
PAYOUT_TRIGGER_ADDRESS=0x...
PROTECTION_POOL_ADDRESS=0x...
POLICY_REGISTRY_ADDRESS=0x...
# ─── Frontend (Vite) — injected into the dashboard at BUILD time ────
# After deploying, the deploy script prints these (and writes deployments.<net>.env).
# Copy the values here, then run `npm run build`. 133 = testnet, 177 = mainnet.
VITE_CHAIN_ID=133
VITE_RPC_URL=https://testnet.hsk.xyz
VITE_POLICY_REGISTRY_ADDRESS=
VITE_PROTECTION_POOL_ADDRESS=
VITE_PAYOUT_TRIGGER_ADDRESS=
VITE_HSP_ROUTER_ADDRESS=
# ─── Block Explorer (contract verification) ─────────────────
# HashKey uses Blockscout — no real API key needed (any non-empty string works).
# Defaults below are baked into hardhat.config.ts; override only if they change.
EXPLORER_API_KEY=empty
HASHKEY_MAINNET_EXPLORER_API=https://hashkey.blockscout.com/api
HASHKEY_TESTNET_EXPLORER_API=https://testnet-explorer.hsk.xyz/api
# ─── Monitor Configuration ──────────────────────────────────
# Poll interval in milliseconds (default: 300000 = 5 minutes)
POLL_INTERVAL_MS=300000
# Policy to monitor (created on-chain, default policyId=0)
POLICY_ID=0
# Metric source: HSK_POOL_LIQUIDITY | PRICE_FEED | MOCK
METRIC_SOURCE_TYPE=HSK_POOL_LIQUIDITY
# For HSK_POOL_LIQUIDITY: the pool contract address to watch
# For PRICE_FEED: the REST endpoint URL
METRIC_API_URL=
METRIC_API_KEY=
# For MOCK: gradual_decline | stable | sudden_spike | data_fail
MOCK_SCENARIO=gradual_decline
# Policy threshold (on-chain scaled value, 1e18 = 100% for ratios)
# Default: 0.10e18 = 10% liquidity drop
POLICY_THRESHOLD=100000000000000000
POLICY_THRESHOLD_HUMAN=0.10
# Direction: ABOVE (metric rises past threshold) | BELOW (metric drops below threshold)
TRIGGER_DIRECTION=BELOW
# Minimum confidence score (0-100) to submit a triggering verdict
TRIGGER_CONFIDENCE=75
# Payout amount in wei (informational, actual value from on-chain policy)
PAYOUT_AMOUNT=500000000000000000
# ─── HSP Coordinator ────────────────────────────────────────
HSP_COORDINATOR_URL=https://hsp-hackathon.hashkeymerchant.com
HSP_API_KEY=
# ─── HSP settlement relay (off-chain USDC payout rail) ──────
# HSP is zero-custody: the payer wallet does a plain USDC.transfer; the Coordinator's
# adapter observes it and signs a receipt. Set true to settle payouts in USDC via HSP.
HSP_SETTLEMENT_ENABLED=false
# Deploy-script payout rail: false = HSP off-chain USDC (recommended for mainnet), true = on-chain native HSK
SETTLE_ONCHAIN=false
# Chain registry name + EIP-712 domain (from GET /chains). verifyingContract is 0x...0001.
HSP_CHAIN_NAME=hashkey-testnet
HSP_VERIFYING_CONTRACT=0x0000000000000000000000000000000000000001
HSP_ADAPTER_ADDRESS=0x467AaF355DF243379B961Ce00abBae20c1e25012
# USDC token: testnet 0x8FE3cB719Ee4410E236Cd6b72ab1fCDC06eF53c6 | mainnet(USDC.e) 0x054ed45810DbBAb8B27668922D110669c9D88D0a
USDC_ADDRESS=0x8FE3cB719Ee4410E236Cd6b72ab1fCDC06eF53c6
# Wallet holding USDC that settles the payout (defaults to AI_SIGNER if unset). Fund via /faucet/ on testnet.
HSP_PAYER_PRIVATE_KEY=
# Payout in USDC base units (6 decimals): 500000 = 0.50 USDC
PAYOUT_USDC_BASE_UNITS=500000
HSP_CONFIRMATIONS=2
HSP_DEADLINE_SECS=3600
# ─── Optional: HSK Token Address ────────────────────────────
# If monitoring an ERC-20 pool balance instead of native HSK
HSK_TOKEN_ADDRESS=