Skip to main contentA-REX Foundation

系统设计 · AREX-CONF

Configuration

Keep secrets in a local .env (see .env.example) or a secret manager. Never commit keys.

文档 ID
AREX-CONF
版本
2.0
日期
2026-09-21
仅提供英文版
本页为英文。白皮书章节和示意图已翻译。规范性标准留在仓库中;请使用申请提前访问获取该文本。系统设计指南和决策记录保持英文。
FieldValue
Document IDAREX-CONF
Version2.0
Date2026-09-21

Hardhat

hardhat.config.js defines:

  • Solidity 0.8.22, viaIR: true, EVM target paris;
  • optimizer runs = 200 for all contracts, with a per-file override runs = 1 for contracts/reference/core/ARexToken.sol so that the reference token stays under the EIP-170 size limit (24,136 bytes deployed);
  • networks hardhat/localhost (chain id 31337), sepolia, polygon, arbitrum;
  • Ignition (requiredConfirmations: 1), gas reporter (REPORT_GAS=true), Etherscan-style verification keys.

Environment variables

VariablePurpose
PRIVATE_KEYdeployment account for remote networks
SEPOLIA_RPC_URL, POLYGON_RPC_URL, ARBITRUM_RPC_URLRPC endpoints
ETHERSCAN_API_KEY, POLYGONSCAN_API_KEY, ARBISCAN_API_KEYverification
AREX_BASE_URIERC-1155 base URI for scripts/deploy-standard.js and deploy-full-standard.js
AREX_PAYOUT_TOKENERC-20 used by ParametricInsurance in deploy-full-standard.js (skipped if unset)
AREX_INVARIANT_STEPS, AREX_INVARIANT_SEEDinvariant test length and seed
REPORT_GASHardhat gas reporter

Keep secrets in a local .env (see .env.example) or a secret manager. Never commit keys.

Package manager

npm with the committed package-lock.json (npm ci). The repository does not declare a packageManager field for pnpm or yarn: the lockfile and CI are npm-based, and a second lockfile would create version drift.

Network compatibility

A network entry means a deployment path is configured, not that the system was validated there. Before deploying: confirm EVM version support (paris is intentionally conservative), gas limits, finality assumptions, explorer verification and upgrade governance (see SYSTEM-DESIGN.md §8).