المعيار
الواجهات والإصدارات
Interface ids, the layer model, the versioning rules and how to propose a change to the standard.
This repository holds the normative material of A-REX. Everything outside it (the reference token, the hooks, the extensions, the whitepaper) is an implementation or a demonstration and may change without changing the standard.
Where things live
A-REX is published in three repositories. The specification and the decision records cite
paths of the whole project (contracts/standard/…, contracts/reference/…, test/standard/…);
this table says where each one is.
| Path cited | Repository | Folder there |
|---|---|---|
standard/…, contracts/standard/…, docs/adr/… | arex-standard (this one, CC0) | /, contracts/, adr/ |
contracts/reference/…, contracts/examples/…, test/…, scripts/…, ignition/…, docs/*.md | arex-contracts (MIT) | same paths; this repository is mounted at lib/arex-standard |
whitepaper/ui/… | arex-site | the repository root |
| File | What it is |
|---|---|
AREX-CORE.md | The specification, written in ERC format (Abstract, Motivation, Specification with RFC 2119 keywords, Rationale, Security). CC0. |
contracts/ | The Solidity interfaces the specification refers to: IARexBatch, IARexHook, IARexHookManager, IARexAttest, IERC7943MultiToken (verbatim from ERC-7943), plus ARexCodes and ARexInterfaceIds. CC0. |
schema/batch-metadata.schema.json | JSON Schema for the off-chain metadata document committed by metadataHash. Aligned with GS1 EPCIS 2.0 and FSMA 204 key data elements. |
examples/ | Example documents. |
Interface ids
| Interface | ERC-165 id | Required |
|---|---|---|
IERC1155 | 0xd9b67a26 | MUST |
IERC7943MultiToken | 0x41c4fbad | MUST |
IARexBatch | 0xe22639e0 | MUST |
IARexHookManager | 0x964f4861 | MUST (getHooks) |
IARexAttest | 0xad603a6c | SHOULD (token or companion) |
IARexHook | 0x332afcbb | MUST for hooks |
Reproduce with npm run interface-ids.
Layers
flowchart TB
L3["Layer 3 · IARexAttest<br/>attestations per batch and topic, trusted issuers per topic"]
L2["Layer 2 · IARexHook + IARexHookManager<br/>ordered rule pipeline, bytes32 rejection codes"]
L1["Layer 1 · IARexBatch<br/>batch identity, status, metadata commitment, lineage"]
L0["Layer 0 · ERC-1155 + ERC-165 + ERC-7943<br/>balances, freeze, forced transfer, eligibility"]
L3 --- L2 --- L1 --- L0
classDef l3 fill:#edf5ff,stroke:#0f62fe,color:#161616
classDef l2 fill:#d0e2ff,stroke:#0f62fe,color:#161616
classDef l1 fill:#a6c8ff,stroke:#0f62fe,color:#161616
classDef l0 fill:#78a9ff,stroke:#0043ce,color:#161616
class L3 l3
class L2 l2
class L1 l1
class L0 l0Each layer builds on the one below. The reference implementation (ARexToken, ARexAttestations) implements all four; the hooks and extensions only depend on the interfaces and are not part of the standard.
| Layer | Interface | What it standardizes | Required |
|---|---|---|---|
| 0 | ERC-1155, ERC-165, IERC7943MultiToken | balances and batch transfers; freeze, forced transfer, eligibility, canTransfer | MUST |
| 1 | IARexBatch | the batch record with open codes, role-only status with a terminal RETIRED, transform lineage | MUST |
| 2 | IARexHook, IARexHookManager | one hook interface, ordered evaluation, bytes32 rejection codes | MUST (getHooks); hooks implement IARexHook |
| 3 | IARexAttest | attestations per (batch, topic), trusted issuers per topic | SHOULD, in the token or a companion |
Versioning
The interfaces are versioned with the repository (package.json). A change to any function
signature, event or normative MUST is a major version and comes with a migration note in
docs/. Additive, optional material (new recommended codes,
schema fields) is a minor version.
How to propose a change
Open a discussion in the repository describing the use case, the proposed interface change and at least one implementation. Changes are accepted when two independent implementers confirm they can adopt them. This mirrors how ERC-3643 and ERC-7943 evolved before becoming Final.