4 份文档
标准
规范性规范、生成的接口与元数据参考,以及版本规则。CC0。
标准是 A-REX 中由其他人来实现的部分。它刻意保持小巧:五个接口、一份批次元数据模式和一份规范文档,全部采用 CC0。本部分中没有任何内容依赖参考实现。
本部分的文档
| 文档 | 状态 | 用途 |
|---|---|---|
| A-REX Core 规范 | 规范性 | 准确了解符合一致性要求的代币和钩子必须、应当和可以做什么 |
| 接口参考 | 由 contracts/standard/ 生成 | 查阅任何函数、事件、错误、结构体字段或常量及其 NatSpec |
| 批次元数据模式 | 由 JSON Schema 生成 | 构建并验证 metadataHash 所承诺的链下文档 |
| 接口与版本管理 | 规范性 | 查找接口 id、分层模型、版本规则以及如何提出变更 |
一致性速览
| 代币在满足以下条件时符合一致性要求 | 接口 id |
|---|---|
| 实现 ERC-1155 和 ERC-165 | 0xd9b67a26 |
| 实现 ERC-7943 多代币接口 | 0x41c4fbad |
实现 IARexBatch | 0xe22639e0 |
通过 IARexHookManager.getHooks() 公开其管线 | 0x964f4861 |
自身或通过配套合约提供 IARexAttest(应当) | 0xad603a6c |
钩子在实现 IARexHook(0x332afcbb)和 ERC-165 时符合一致性要求。npm run interface-ids 会根据已编译的代码打印每一个 id。
文档
A-REX Core — Agricultural Batch Token Standard
A minimal extension of ERC-1155 and ERC-7943 for tokenized agricultural batches — batch identity, lineage, an ordered hook pipeline and open attestations.
Interface reference
Every function, event, error and type of the five normative interfaces, generated from contracts/standard/ and its NatSpec on each build. For the normative prose, read the specification.
Batch metadata schema
The off-chain document every batch commits to with metadataHash and points to with uri, generated from standard/schema/batch-metadata.schema.json on each build.
接口与版本管理
Interface ids, the layer model, the versioning rules and how to propose a change to the standard.