系统设计 · AREX-START
Getting started
Node.js 20 or 22 LTS and npm. Clone and install from the lockfile:
- 文档 ID
- AREX-START
- 文档版本
- 2.1
- 最后更新
- 2026-10-31
文档版本记录的是本文档的修订次数,不是标准(A-REX Core 2.1.0-alpha.2)或参考实现(2.0.0-alpha.10)的版本。
| Field | Value |
|---|---|
| Document ID | AREX-START |
| Document version | 2.1 |
| Last updated | 2026-10-31 |
1. Environment
Node.js 20 or 22 LTS and npm. Clone and install from the lockfile:
2. Compile and test
3. Local deployment
Both scripts print a JSON manifest with addresses and the registered hook order. AREX_SINGLE_ADMIN=1 keeps every role on the deployer, which is only acceptable locally; for a real network set ADMIN_ADDRESS (a multisig) and OPS_ADDRESS instead, and the script hands the roles over, renounces the deployer's and prints the final role table. Ignition alternative: npx hardhat ignition deploy ignition/modules/ARexToken.js --network localhost.
4. First batch: the walkthrough script
It deploys the stack and runs one lot through creation, transfer, sanction, split, processing, attestation, freeze, forced transfer, retirement and burn, printing the rejection code before each blocked step. Change the numbers and re-run; it is the fastest way to understand the pipeline.
For manual poking, open a console against the node: npx hardhat console --network localhost, then const t = await ethers.getContractAt("ARexToken", "<address printed by the deploy script>").
See the Implementation Guide chapter of the whitepaper (whitepaper/ui/content/11-implementation-guide.md) for createBatch, transfers with transferCheck, transform, attestations and enforcement, with runnable snippets.