Contract headers
A. Common types & EIP-712
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
library Types {
// Role tags (Attestor Registry)
bytes32 constant ROLE_INSPECTOR = keccak256("INSPECTOR");
bytes32 constant ROLE_TERMINAL = keccak256("TERMINAL");
bytes32 constant ROLE_CARRIER = keccak256("CARRIER");
bytes32 constant ROLE_DC3PL = keccak256("DC_3PL");
bytes32 constant ROLE_REGISTRY = keccak256("REGISTRY");
bytes32 constant ROLE_METROLOGY = keccak256("METROLOGY");
bytes32 constant ROLE_SENSOR_OEM = keccak256("SENSOR_OEM");
// Domain tags
bytes8 constant CLM_DOMAIN = 0x45444d412f434c4d; // "EDMA/CLM"
bytes4 constant CLM_V1 = 0x00000001;
struct Attestation {
bytes32 role; // e.g. ROLE_INSPECTOR
bytes32 entityId; // registry id for the signer
bytes32 keyId; // current active key id
bytes signature; // EIP-712 / secp256k1 signature
}
struct ProofBundle {
bytes32 schemaId; // keccak256("TRADE.ON_BOARD.v1")
bytes32 povHash; // sha256(canonical_json_bytes)
bytes dossierBytes; // canonical JSON (optional echo)
bytes keyBlob; // normalized identity fields blob
Attestation[] atts; // role-signed attestations bound to povHash
}
}B. PoV Gate
C. One-Claim
D. EMT (Event/Milestone Token)
E. Trade Settlement
F. Tokens
G. Fee Router / Burner
H. Registry Mirror
I. Attestor Registry
J. ParameterStore
K. Governor / Timelock
L. Treasury Splitter
M. EDSD Treasury & Proof-of-Reserves
N. Bridge Gateway
O. Error catalog
P. Events you will index
Q. Invariants
Last updated
