Diagramas · 01
Arquitectura: niveles y capas
Los dos niveles del repositorio, las cuatro capas del estándar y la dirección de cada dependencia.
Niveles
Las cuatro capas del estándar
flowchart TB
L3["Capa 3 · IARexAttest<br/>attest · revokeAttestation · isAttested · emisores de confianza por tema"]
L2["Capa 2 · IARexHook + IARexHookManager<br/>hookFlags · check → bytes32 · onExecuted · getHooks"]
L1["Capa 1 · IARexBatch<br/>createBatch · batchOf · setBatchStatus · setBatchMetadata · transform · parentsOf"]
L0["Capa 0 · ERC-1155 + ERC-165 + IERC7943MultiToken<br/>freeze · forcedTransfer · canSend · canReceive · canTransfer"]
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 l0Los dos niveles del repositorio y la dirección de las dependencias
flowchart LR
STD["<b>El estándar</b><br/>standard/ · contracts/standard/<br/>normativo · CC0"]
REF["<b>Implementación de referencia</b><br/>ARexToken · ARexAttestations<br/>MIT"]
DEMO["<b>Demostraciones</b><br/>7 hooks · 3 extensiones<br/>MIT · no normativo"]
STD -->|implementado por| REF -->|demostrado por| DEMO
DEMO -.->|dependen solo de las interfaces| STDEl estándar no depende de nada. El token de referencia depende del estándar y de OpenZeppelin. Las reglas externas (hooks) y las extensiones dependen solo de las interfaces del estándar, nunca de ARexToken. Si los quitas a todos, sigues teniendo un token conforme.
Vista de componentes de la implementación de referencia
classDiagram
class IARexBatch { <<interface>> }
class IARexHook { <<interface>> }
class IARexHookManager { <<interface>> }
class IARexAttest { <<interface>> }
class IERC7943MultiToken { <<interface>> }
class ARexToken {
+createBatch()
+transform()
+setBatchStatus()
+forcedTransfer()
+setFrozenTokens()
+registerHook()
+transferCheck()
-_update()
}
class ARexAttestations {
+attest()
+revokeAttestation()
+isAttested()
+setTrustedIssuer()
}
IERC7943MultiToken <|.. ARexToken
IARexBatch <|.. ARexToken
IARexHookManager <|.. ARexToken
IARexAttest <|.. ARexAttestations
ARexToken --> "0..n" IARexHook : cadena de reglas ordenada
ARexAttestations --> IARexBatch : ¿existe el lote?
IARexHook <|.. EligibilityHook
IARexHook <|.. ExpiryHook
IARexHook <|.. AttestationHook
IARexHook <|.. PerishabilityHook
IARexHook <|.. SeasonalHook
IARexHook <|.. DeliveryHook
IARexHook <|.. TraceabilityHook
AttestationHook --> IARexAttest : isAttested
CarbonImmobilizationWrapper --> IARexAttest : attest
ParametricInsurance --> IARexAttest : isAttested