Numen Mainnet

EVM address

Contract
0x9b95db9c36cc1572b5121d62a73d8f5a680968ae
Mapped substrate accountnu6AF3YRXayaTqzKTi2B2FJBu2XufBy8sdR6TeRYUxH8j69WUboth ways, balances live there
Status
Exact match
Compiler
solc 0.8.24+commit.e11b9ed9
Optimizer
200 runs
EVM version
istanbul
Contract
contracts/assets/metadata/NumenMetadataRegistry.sol:NumenMetadataRegistry
Verified
2d ago | 2026-11-29 18:32:37 (UTC)
Verifier
Creation tx
Creation code
contracts/assets/metadata/NumenMetadataRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "../interfaces/INumenAssetRegistry.sol";
import "../libraries/NumenAssetTypes.sol";

/**
 * @title NumenMetadataRegistry
 * @notice Extensible metadata and custom-property layer
 *         for assets registered in the Numen Asset Protocol.
 *
 * @dev
 * This contract intentionally stores extended metadata separately
 * from ERC-20 / ERC-721 / ERC-1155 contracts.
 *
 * Benefits:
 *
 * - token contracts remain smaller,
 * - assets do not need redeployment when metadata capabilities grow,
 * - fungible and non-fungible assets can share the same property model,
 * - physical / 3D / RWA modules can later reference the same Asset ID,
 * - property history can be observed from events.
 *
 * IMPORTANT:
 *
 * Metadata stored here represents claims or descriptions associated
 * with an asset.
 *
 * A property such as:
 *
 *     origin = "Türkiye"
 *
 * does NOT mean that the Numen network independently verified the
 * physical origin of an object.
 *
 * Verification and attestations belong to separate protocol modules.
 */
contract NumenMetadataRegistry {
    // =============================================================
    //                            ERRORS
    // =============================================================

    error ZeroAddress();

    error EmptyKey();

    error EmptyValue();

    error AssetNotFound(
        bytes32 assetId
    );

    error AssetInactive(
        bytes32 assetId
    );

    error Unauthorized(
        address caller,
        bytes32 assetId
    );

    error PropertyNotFound(
        bytes32 assetId,
        bytes32 propertyId
    );

    error PropertyAlreadyExists(
        bytes32 assetId,
        bytes32 propertyId
    );

    error PropertyInactive(
        bytes32 assetId,
        bytes32 propertyId
    );

    error PropertyAlreadyActive(
        bytes32 assetId,
        bytes32 propertyId
    );

    error PropertyAlreadyInactive(
        bytes32 assetId,
        bytes32 propertyId
    );

    error InvalidIndex();

    // =============================================================
    //                            EVENTS
    // =============================================================

    event PropertyCreated(
        bytes32 indexed assetId,
        bytes32 indexed propertyId,
        string key,
        NumenAssetTypes.PropertyValueType valueType,
        string unit,
        address indexed updatedBy
    );

    event PropertyUpdated(
        bytes32 indexed assetId,
        bytes32 indexed propertyId,
        NumenAssetTypes.PropertyValueType valueType,
        string unit,
        address indexed updatedBy
    );

    event PropertyDeactivated(
        bytes32 indexed assetId,
        bytes32 indexed propertyId,
        address indexed updatedBy
    );

    event PropertyReactivated(
        bytes32 indexed assetId,
        bytes32 indexed propertyId,
        address indexed updatedBy
    );

    // =============================================================
    //                            STRUCTS
    // =============================================================

    /**
     * @notice Canonical stored custom property.
     *
     * @dev
     * `value` is ABI encoded according to `valueType`.
     *
     * Expected encoding:
     *
     * TEXT    -> abi.encode(string)
     * INTEGER -> abi.encode(int256)
     * DECIMAL -> abi.encode(string)
     * BOOLEAN -> abi.encode(bool)
     * DATE    -> abi.encode(uint256)
     * URI     -> abi.encode(string)
     * HASH    -> abi.encode(bytes32)
     * ADDRESS -> abi.encode(address)
     * BYTES   -> abi.encode(bytes)
     *
     * DECIMAL intentionally uses a string representation so that
     * domain-specific precision is not silently lost.
     *
     * Examples:
     *
     * "2.40"
     * "0.000001"
     * "999999999999.123456789"
     *
     * The optional unit field carries semantic units such as:
     *
     * "ct"
     * "kg"
     * "m2"
     * "mm"
     * "USD"
     */
    struct StoredProperty {
        bytes32 propertyId;
        string key;
        NumenAssetTypes.PropertyValueType valueType;
        bytes value;
        string unit;
        uint64 createdAt;
        uint64 updatedAt;
        bool active;
    }

    // =============================================================
    //                          IMMUTABLES
    // =============================================================

    INumenAssetRegistry
        public immutable assetRegistry;

    // =============================================================
    //                          CONSTANTS
    // =============================================================

    bytes32 private constant
        _METADATA_REGISTRY_VERSION =
        keccak256(
            "NUMEN_METADATA_REGISTRY_V1"
        );

    // =============================================================
    //                           STORAGE
    // =============================================================

    mapping(
        bytes32 =>
            mapping(
                bytes32 =>
                    StoredProperty
            )
    )
        private _properties;

    mapping(
        bytes32 =>
            bytes32[]
    )
        private _propertyIds;

    mapping(
        bytes32 =>
            mapping(
                bytes32 =>
                    bool
            )
    )
        private _propertyExists;

    // =============================================================
    //                         CONSTRUCTOR
    // =============================================================

    constructor(
        address assetRegistry_
    ) {
        if (
            assetRegistry_ ==
            address(0)
        ) {
            revert ZeroAddress();
        }

        assetRegistry =
            INumenAssetRegistry(
                assetRegistry_
            );
    }

    // =============================================================
    //                           VERSION
    // =============================================================

    function metadataRegistryVersion()
        external
        pure
        returns (bytes32)
    {
        return
            _METADATA_REGISTRY_VERSION;
    }

    // =============================================================
    //                       PROPERTY CREATION
    // =============================================================

    /**
     * @notice Adds a new custom property to an asset.
     *
     * @dev
     * Only the current controller recorded in
     * NumenAssetRegistry may modify asset metadata.
     *
     * propertyId is deterministic per asset and key:
     *
     * keccak256(abi.encode(assetId, keccak256(bytes(key))))
     *
     * Therefore a single asset cannot create duplicate properties
     * using the exact same key.
     */
    function createProperty(
        bytes32 assetId,
        string calldata key,
        NumenAssetTypes.PropertyValueType valueType,
        bytes calldata value,
        string calldata unit
    )
        external
        returns (
            bytes32 propertyId
        )
    {
        _requireController(
            assetId
        );

        if (
            bytes(key).length ==
            0
        ) {
            revert EmptyKey();
        }

        if (
            value.length ==
            0
        ) {
            revert EmptyValue();
        }

        propertyId =
            getPropertyId(
                assetId,
                key
            );

        if (
            _propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            revert PropertyAlreadyExists(
                assetId,
                propertyId
            );
        }

        uint64 timestamp =
            uint64(
                block.timestamp
            );

        _properties[
            assetId
        ][
            propertyId
        ] =
            StoredProperty({
                propertyId:
                    propertyId,

                key:
                    key,

                valueType:
                    valueType,

                value:
                    value,

                unit:
                    unit,

                createdAt:
                    timestamp,

                updatedAt:
                    timestamp,

                active:
                    true
            });

        _propertyExists[
            assetId
        ][
            propertyId
        ] =
            true;

        _propertyIds[
            assetId
        ].push(
            propertyId
        );

        emit PropertyCreated(
            assetId,
            propertyId,
            key,
            valueType,
            unit,
            msg.sender
        );
    }

    // =============================================================
    //                       PROPERTY UPDATE
    // =============================================================

    /**
     * @notice Updates an existing active property.
     *
     * @dev
     * The property key and propertyId remain immutable.
     *
     * The following may change:
     *
     * - value type
     * - value
     * - unit
     */
    function updateProperty(
        bytes32 assetId,
        bytes32 propertyId,
        NumenAssetTypes.PropertyValueType valueType,
        bytes calldata value,
        string calldata unit
    )
        external
    {
        _requireController(
            assetId
        );

        if (
            !_propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            revert PropertyNotFound(
                assetId,
                propertyId
            );
        }

        StoredProperty
            storage property =
            _properties[
                assetId
            ][
                propertyId
            ];

        if (
            !property.active
        ) {
            revert PropertyInactive(
                assetId,
                propertyId
            );
        }

        if (
            value.length ==
            0
        ) {
            revert EmptyValue();
        }

        property.valueType =
            valueType;

        property.value =
            value;

        property.unit =
            unit;

        property.updatedAt =
            uint64(
                block.timestamp
            );

        emit PropertyUpdated(
            assetId,
            propertyId,
            valueType,
            unit,
            msg.sender
        );
    }

    // =============================================================
    //                     PROPERTY ACTIVATION
    // =============================================================

    /**
     * @notice Deactivates a property without deleting history.
     */
    function deactivateProperty(
        bytes32 assetId,
        bytes32 propertyId
    )
        external
    {
        _requireController(
            assetId
        );

        if (
            !_propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            revert PropertyNotFound(
                assetId,
                propertyId
            );
        }

        StoredProperty
            storage property =
            _properties[
                assetId
            ][
                propertyId
            ];

        if (
            !property.active
        ) {
            revert PropertyAlreadyInactive(
                assetId,
                propertyId
            );
        }

        property.active =
            false;

        property.updatedAt =
            uint64(
                block.timestamp
            );

        emit PropertyDeactivated(
            assetId,
            propertyId,
            msg.sender
        );
    }

    /**
     * @notice Reactivates a previously deactivated property.
     */
    function reactivateProperty(
        bytes32 assetId,
        bytes32 propertyId
    )
        external
    {
        _requireController(
            assetId
        );

        if (
            !_propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            revert PropertyNotFound(
                assetId,
                propertyId
            );
        }

        StoredProperty
            storage property =
            _properties[
                assetId
            ][
                propertyId
            ];

        if (
            property.active
        ) {
            revert PropertyAlreadyActive(
                assetId,
                propertyId
            );
        }

        property.active =
            true;

        property.updatedAt =
            uint64(
                block.timestamp
            );

        emit PropertyReactivated(
            assetId,
            propertyId,
            msg.sender
        );
    }

    // =============================================================
    //                        PROPERTY READS
    // =============================================================

    /**
     * @notice Returns whether a property has ever been created.
     */
    function propertyExists(
        bytes32 assetId,
        bytes32 propertyId
    )
        external
        view
        returns (bool)
    {
        return
            _propertyExists[
                assetId
            ][
                propertyId
            ];
    }

    /**
     * @notice Returns whether a property currently exists
     *         and is active.
     */
    function isPropertyActive(
        bytes32 assetId,
        bytes32 propertyId
    )
        external
        view
        returns (bool)
    {
        if (
            !_propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            return false;
        }

        return
            _properties[
                assetId
            ][
                propertyId
            ].active;
    }

    /**
     * @notice Returns a property.
     */
    function getProperty(
        bytes32 assetId,
        bytes32 propertyId
    )
        external
        view
        returns (
            StoredProperty memory
        )
    {
        if (
            !_propertyExists[
                assetId
            ][
                propertyId
            ]
        ) {
            revert PropertyNotFound(
                assetId,
                propertyId
            );
        }

        return
            _properties[
                assetId
            ][
                propertyId
            ];
    }

    /**
     * @notice Returns the number of properties ever created
     *         for an asset.
     *
     * @dev
     * Deactivated properties remain included because protocol
     * history is intentionally preserved.
     */
    function propertyCount(
        bytes32 assetId
    )
        external
        view
        returns (uint256)
    {
        return
            _propertyIds[
                assetId
            ].length;
    }

    /**
     * @notice Returns a property ID by asset-specific index.
     */
    function propertyIdAt(
        bytes32 assetId,
        uint256 index
    )
        external
        view
        returns (bytes32)
    {
        if (
            index >=
            _propertyIds[
                assetId
            ].length
        ) {
            revert InvalidIndex();
        }

        return
            _propertyIds[
                assetId
            ][
                index
            ];
    }

    /**
     * @notice Returns all property IDs associated with an asset.
     *
     * @dev
     * Primarily intended for off-chain reads.
     * Large production datasets should be indexed from events.
     */
    function propertyIds(
        bytes32 assetId
    )
        external
        view
        returns (
            bytes32[] memory
        )
    {
        return
            _propertyIds[
                assetId
            ];
    }

    // =============================================================
    //                     PROPERTY IDENTIFIER
    // =============================================================

    /**
     * @notice Computes the deterministic property ID for an
     *         asset/key combination.
     *
     * @dev
     * Keys are case-sensitive.
     *
     * "Weight" and "weight" are different properties.
     *
     * Frontends should therefore normalize predefined property
     * names when consistent semantics are desired.
     */
    function getPropertyId(
        bytes32 assetId,
        string memory key
    )
        public
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    assetId,
                    keccak256(
                        bytes(key)
                    )
                )
            );
    }

    // =============================================================
    //                    AUTHORIZATION HELPERS
    // =============================================================

    /**
     * @dev
     * Ensures:
     *
     * 1. asset exists,
     * 2. asset is active,
     * 3. caller is current registry controller.
     *
     * Controller authority is read dynamically from
     * NumenAssetRegistry.
     *
     * Therefore if registry control is transferred, metadata
     * authority automatically follows the new controller without
     * requiring synchronization in this contract.
     */
    function _requireController(
        bytes32 assetId
    )
        internal
        view
    {
        if (
            !assetRegistry.assetExists(
                assetId
            )
        ) {
            revert AssetNotFound(
                assetId
            );
        }

        if (
            !assetRegistry.isAssetActive(
                assetId
            )
        ) {
            revert AssetInactive(
                assetId
            );
        }

        INumenAssetRegistry.AssetRecord
            memory record =
            assetRegistry.getAsset(
                assetId
            );

        if (
            record.controller !=
            msg.sender
        ) {
            revert Unauthorized(
                msg.sender,
                assetId
            );
        }
    }
}
contracts/assets/interfaces/INumenAssetRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "../libraries/NumenAssetTypes.sol";

/**
 * @title INumenAssetRegistry
 * @notice Canonical registry interface for the Numen Asset Protocol.
 *
 * Registration means that an asset record exists in the
 * Numen Asset Protocol.
 *
 * Registration does NOT by itself prove physical authenticity,
 * legal ownership, regulatory compliance, provenance, issuer
 * legitimacy or correctness of metadata.
 */
interface INumenAssetRegistry {
    // =============================================================
    // EVENTS
    // =============================================================

    event AssetRegistered(
        bytes32 indexed assetId,
        address indexed assetContract,
        address indexed creator,
        NumenAssetTypes.AssetScope scope,
        uint256 tokenId,
        NumenAssetTypes.AssetClass assetClass,
        NumenAssetTypes.AssetStandard standard,
        NumenAssetTypes.AssetCategory category,
        NumenAssetTypes.RepresentationType representation
    );

    event AssetClassificationUpdated(
        bytes32 indexed assetId,
        NumenAssetTypes.AssetCategory category,
        NumenAssetTypes.RepresentationType representation,
        address indexed updatedBy
    );

    event AssetMetadataUpdated(
        bytes32 indexed assetId,
        string metadataURI,
        bytes32 metadataHash,
        address indexed updatedBy
    );

    event AssetDeactivated(
        bytes32 indexed assetId,
        address indexed deactivatedBy
    );

    event AssetReactivated(
        bytes32 indexed assetId,
        address indexed reactivatedBy
    );

    /**
     * @notice Emitted when the current controller proposes a new
     *         controller.
     */
    event AssetControllerTransferProposed(
        bytes32 indexed assetId,
        address indexed currentController,
        address indexed proposedController
    );

    /**
     * @notice Emitted when a pending controller transfer is cancelled.
     */
    event AssetControllerTransferCancelled(
        bytes32 indexed assetId,
        address indexed controller,
        address indexed cancelledProposedController
    );

    /**
     * @notice Emitted only after the proposed controller explicitly
     *         accepts control.
     */
    event AssetControllerTransferred(
        bytes32 indexed assetId,
        address indexed previousController,
        address indexed newController
    );

    // =============================================================
    // REGISTRATION REQUEST
    // =============================================================

    struct RegisterAssetRequest {
        NumenAssetTypes.AssetClass assetClass;
        NumenAssetTypes.AssetStandard standard;
        NumenAssetTypes.AssetScope scope;
        NumenAssetTypes.AssetCategory category;
        NumenAssetTypes.RepresentationType representation;
        address assetContract;
        uint256 tokenId;
        address creator;
        address controller;
        string metadataURI;
        bytes32 metadataHash;
    }

    // =============================================================
    // REGISTRY RECORD
    // =============================================================

    struct AssetRecord {
        bytes32 assetId;
        NumenAssetTypes.AssetClass assetClass;
        NumenAssetTypes.AssetStandard standard;
        NumenAssetTypes.AssetScope scope;
        NumenAssetTypes.AssetCategory category;
        NumenAssetTypes.RepresentationType representation;
        address assetContract;
        uint256 tokenId;
        address creator;
        address controller;
        string metadataURI;
        bytes32 metadataHash;
        uint64 createdAt;
        uint64 updatedAt;
        bool active;
    }

    // =============================================================
    // REGISTRATION
    // =============================================================

    function registerAsset(
        RegisterAssetRequest calldata request
    )
        external
        returns (bytes32 assetId);

    // =============================================================
    // LOOKUPS
    // =============================================================

    function assetExists(
        bytes32 assetId
    )
        external
        view
        returns (bool);

    function isAssetActive(
        bytes32 assetId
    )
        external
        view
        returns (bool);

    function getAsset(
        bytes32 assetId
    )
        external
        view
        returns (AssetRecord memory);

    function getAssetId(
        address assetContract,
        NumenAssetTypes.AssetScope scope,
        uint256 tokenId
    )
        external
        view
        returns (bytes32);

    function isRegisteredAsset(
        address assetContract,
        NumenAssetTypes.AssetScope scope,
        uint256 tokenId
    )
        external
        view
        returns (bool);

    // =============================================================
    // COUNTERS
    // =============================================================

    function totalAssets()
        external
        view
        returns (uint256);

    function assetIdAt(
        uint256 index
    )
        external
        view
        returns (bytes32);

    // =============================================================
    // CREATOR / CONTROLLER INDEX
    // =============================================================

    function creatorAssetCount(
        address creator
    )
        external
        view
        returns (uint256);

    function creatorAssetIdAt(
        address creator,
        uint256 index
    )
        external
        view
        returns (bytes32);

    function controllerAssetCount(
        address controller
    )
        external
        view
        returns (uint256);

    function controllerAssetIdAt(
        address controller,
        uint256 index
    )
        external
        view
        returns (bytes32);

    // =============================================================
    // MUTABLE DATA
    // =============================================================

    function updateClassification(
        bytes32 assetId,
        NumenAssetTypes.AssetCategory category,
        NumenAssetTypes.RepresentationType representation
    )
        external;

    function updateMetadata(
        bytes32 assetId,
        string calldata metadataURI,
        bytes32 metadataHash
    )
        external;

    // =============================================================
    // CONTROLLER MANAGEMENT
    // =============================================================

    /**
     * @notice Proposes transfer of control to a new address.
     *
     * @dev The proposed controller receives no authority until
     *      acceptAssetController() is called by that address.
     */
    function proposeAssetController(
        bytes32 assetId,
        address newController
    )
        external;

    /**
     * @notice Accepts a pending controller transfer.
     *
     * @dev Only the currently proposed controller may accept.
     */
    function acceptAssetController(
        bytes32 assetId
    )
        external;

    /**
     * @notice Cancels the pending controller transfer.
     *
     * @dev Only the current controller may cancel.
     */
    function cancelAssetControllerTransfer(
        bytes32 assetId
    )
        external;

    /**
     * @notice Returns the currently proposed controller.
     *
     * @return Zero address when no transfer is pending.
     */
    function pendingAssetController(
        bytes32 assetId
    )
        external
        view
        returns (address);

    // =============================================================
    // ACTIVE STATUS
    // =============================================================

    function deactivateAsset(
        bytes32 assetId
    )
        external;

    function reactivateAsset(
        bytes32 assetId
    )
        external;

    // =============================================================
    // PROTOCOL INFORMATION
    // =============================================================

    function registryVersion()
        external
        pure
        returns (bytes32);
}
contracts/assets/libraries/NumenAssetTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

/**
 * @title NumenAssetTypes
 * @notice Shared data types for the Numen Asset Protocol.
 *
 * @dev
 * This library defines the common vocabulary used by:
 *
 * - Fungible assets
 * - Non-fungible assets
 * - Real-world assets (RWA)
 * - Digital twins
 * - Physical / 3D-linked assets
 * - Product passports
 * - Certificates
 * - Collections
 * - Future Numen Object Registry integrations
 *
 * IMPORTANT:
 *
 * A physical or 3D association does NOT by itself prove authenticity,
 * legal ownership, provenance, or physical-world identity.
 *
 * Verification and attestation states must be represented separately.
 */
library NumenAssetTypes {
    // =============================================================
    //                           ASSET CLASS
    // =============================================================

    /**
     * @notice Fundamental economic class of an asset.
     */
    enum AssetClass {
        FUNGIBLE,
        NON_FUNGIBLE
    }

    // =============================================================
    //                         ASSET STANDARD
    // =============================================================

    /**
     * @notice Technical representation used by an asset.
     *
     * NONE is useful for registry records that are not themselves
     * represented by a token contract.
     */
    enum AssetStandard {
        NONE,
        ERC20,
        ERC721,
        ERC1155
    }

    // =============================================================
    //                          ASSET SCOPE
    // =============================================================

    /**
     * @notice Defines whether a registry record represents an entire
     * token contract / collection or one individual token ID.
     *
     * CONTRACT:
     * - ERC20 assets
     * - ERC721 collection-level records
     * - ERC1155 collection-level records
     *
     * TOKEN:
     * - Individual ERC721 tokens
     * - Individual ERC1155 token types
     *
     * Scope is part of canonical Numen asset identity.
     *
     * This makes the following two identities distinct:
     *
     * contract = 0xABC...
     * scope    = CONTRACT
     * tokenId  = 0
     *
     * and:
     *
     * contract = 0xABC...
     * scope    = TOKEN
     * tokenId  = 0
     *
     * This distinction is required because NFT token ID 0 is valid.
     */
    enum AssetScope {
        CONTRACT,
        TOKEN
    }

    // =============================================================
    //                        ASSET CATEGORY
    // =============================================================

    /**
     * @notice High-level semantic category of an asset.
     *
     * CUSTOM allows applications to provide a human-readable
     * category through metadata without requiring a protocol upgrade.
     */
    enum AssetCategory {
        UNSPECIFIED,
        CURRENCY,
        PAYMENT,
        UTILITY,
        GOVERNANCE,
        COMMUNITY,
        GAMING,
        COMMODITY,
        REAL_ESTATE,
        PRECIOUS_METAL,
        PRECIOUS_STONE,
        COLLECTIBLE,
        ARTWORK,
        CULTURAL_HERITAGE,
        PRODUCT,
        VEHICLE,
        MACHINERY,
        INTELLECTUAL_PROPERTY,
        MEDIA,
        CERTIFICATE,
        IDENTITY,
        FINANCIAL_ASSET,
        CUSTOM
    }

    // =============================================================
    //                      REPRESENTATION TYPE
    // =============================================================

    /**
     * @notice Describes what the on-chain asset represents.
     *
     * This is deliberately separate from AssetCategory.
     *
     * Example:
     *
     * category       = REAL_ESTATE
     * representation = FRACTIONAL_INTEREST
     */
    enum RepresentationType {
        UNSPECIFIED,
        DIGITAL_ASSET,
        PHYSICAL_REFERENCE,
        DIGITAL_TWIN,
        FRACTIONAL_INTEREST,
        OWNERSHIP_CLAIM,
        USAGE_RIGHT,
        REVENUE_RIGHT,
        CERTIFICATE,
        PRODUCT_PASSPORT,
        MEMBERSHIP,
        LICENSE,
        CUSTOM
    }

    // =============================================================
    //                         SUPPLY MODEL
    // =============================================================

    /**
     * @notice Supply policy for fungible or multi-token assets.
     */
    enum SupplyModel {
        NOT_APPLICABLE,
        FIXED,
        CAPPED,
        UNCAPPED
    }

    // =============================================================
    //                       PROPERTY VALUE TYPE
    // =============================================================

    /**
     * @notice Supported value types for extensible asset properties.
     *
     * Properties are intended for data such as:
     *
     * Weight      -> DECIMAL
     * Serial No.  -> TEXT
     * Certified   -> BOOLEAN
     * Manufacture -> DATE
     * Document    -> URI / HASH
     */
    enum PropertyValueType {
        TEXT,
        INTEGER,
        DECIMAL,
        BOOLEAN,
        DATE,
        URI,
        HASH,
        ADDRESS,
        BYTES
    }

    // =============================================================
    //                       ATTESTATION TYPE
    // =============================================================

    /**
     * @notice Semantic purpose of an attestation.
     *
     * An attestation means that an identifiable party made a claim.
     * It does not automatically make that claim true.
     */
    enum AttestationType {
        CUSTOM,
        ISSUER,
        MANUFACTURER,
        OWNERSHIP,
        ORIGIN,
        INSPECTION,
        APPRAISAL,
        CUSTODY,
        AUDIT,
        LEGAL,
        DOCUMENT,
        MODEL,
        SCAN
    }

    // =============================================================
    //                     VERIFICATION STATUS
    // =============================================================

    /**
     * @notice Generic lifecycle for an independently verifiable claim.
     */
    enum VerificationStatus {
        NONE,
        PENDING,
        VERIFIED,
        REJECTED,
        REVOKED,
        EXPIRED
    }

    // =============================================================
    //                       OBJECT LINK TYPE
    // =============================================================

    /**
     * @notice Relationship between an asset and an object record.
     *
     * Multiple assets may reference the same object.
     *
     * Example:
     *
     * Object
     *   ├── DIGITAL_TWIN       -> ERC721
     *   ├── FRACTIONALIZATION -> ERC20
     *   └── CERTIFICATE       -> ERC721
     */
    enum ObjectLinkType {
        UNSPECIFIED,
        PRIMARY,
        DIGITAL_TWIN,
        FRACTIONALIZATION,
        CERTIFICATE,
        OWNERSHIP,
        USAGE_RIGHT,
        PROVENANCE,
        CUSTOM
    }

    // =============================================================
    //                        ASSET IDENTITY
    // =============================================================

    /**
     * @notice Core registry identity for an asset.
     *
     * assetId:
     * Protocol-generated identifier.
     *
     * assetContract:
     * ERC20 / ERC721 / ERC1155 contract address when applicable.
     *
     * scope:
     * CONTRACT when the record represents the whole token contract
     * or collection.
     *
     * TOKEN when the record represents one specific ERC721 or
     * ERC1155 token ID.
     *
     * tokenId:
     * Must be 0 for CONTRACT-scoped records.
     *
     * For TOKEN-scoped ERC721 / ERC1155 records, this is the
     * corresponding token ID. Token ID 0 is valid and is distinct
     * from a CONTRACT-scoped record because scope is part of the
     * canonical identity.
     */
    struct AssetIdentity {
        bytes32 assetId;
        AssetClass assetClass;
        AssetStandard standard;
        AssetScope scope;
        AssetCategory category;
        RepresentationType representation;
        address assetContract;
        uint256 tokenId;
        address creator;
        uint64 createdAt;
    }

    // =============================================================
    //                         ASSET METADATA
    // =============================================================

    /**
     * @notice Human-readable and external metadata references.
     *
     * Large files and metadata should generally remain off-chain.
     * Hashes can be committed on-chain independently.
     */
    struct AssetMetadata {
        string name;
        string symbol;
        string description;
        string metadataURI;
        bytes32 metadataHash;
    }

    // =============================================================
    //                       CUSTOM PROPERTY
    // =============================================================

    /**
     * @notice Extensible property attached to an asset.
     *
     * The value is encoded as bytes so the registry can support
     * additional property semantics without redeploying every asset.
     *
     * Example:
     *
     * key       = keccak256("weight")
     * name      = "Weight"
     * valueType = DECIMAL
     * value     = abi.encode("1.75388")
     * unit      = "kg"
     */
    struct AssetProperty {
        bytes32 key;
        string name;
        PropertyValueType valueType;
        bytes value;
        string unit;
        address addedBy;
        uint64 createdAt;
        uint64 updatedAt;
    }

    // =============================================================
    //                         3D MODEL DATA
    // =============================================================

    /**
     * @notice Information about a digital 3D model associated
     * with an asset or object.
     *
     * modelHash commits to the exact model bytes.
     *
     * spectralFingerprint may reference a separately generated
     * asset-oriented geometric fingerprint.
     *
     * This MUST NOT be interpreted as the PoScan mining work hash
     * and MUST NOT by itself be represented as proof of physical
     * authenticity.
     */
    struct ModelData {
        string modelURI;
        bytes32 modelHash;
        bytes32 spectralFingerprint;
        string spectralVersion;
        address submittedBy;
        uint64 createdAt;
    }

    // =============================================================
    //                         OBJECT RECORD
    // =============================================================

    /**
     * @notice Registry record for an object that may later be
     * associated with one or more digital assets.
     *
     * objectId is a protocol-level identifier.
     *
     * The existence of an ObjectRecord means that an object record
     * exists on-chain. It does NOT automatically mean the physical
     * object has been independently authenticated.
     */
    struct ObjectRecord {
        bytes32 objectId;
        address creator;
        bytes32 primaryModelHash;
        bytes32 spectralFingerprint;
        string metadataURI;
        uint64 createdAt;
        bool active;
    }

    // =============================================================
    //                         OBJECT BINDING
    // =============================================================

    /**
     * @notice Relationship between an object and an asset.
     */
    struct ObjectBinding {
        bytes32 objectId;
        bytes32 assetId;
        ObjectLinkType linkType;
        address createdBy;
        uint64 createdAt;
        bool active;
    }

    // =============================================================
    //                          ATTESTATION
    // =============================================================

    /**
     * @notice Signed/registered claim made about an asset or object.
     *
     * subjectId may be an assetId or objectId depending on the
     * registry context.
     *
     * evidenceHash can commit to a report, certificate, scan,
     * inspection, legal document, or other evidence.
     */
    struct Attestation {
        bytes32 attestationId;
        bytes32 subjectId;
        AttestationType attestationType;
        address attester;
        bytes32 evidenceHash;
        string evidenceURI;
        VerificationStatus status;
        uint64 issuedAt;
        uint64 expiresAt;
    }

    // =============================================================
    //                           DOCUMENT
    // =============================================================

    /**
     * @notice Document reference associated with an asset or object.
     *
     * Sensitive documents do not need to expose their contents.
     * documentHash can be recorded without publishing documentURI.
     */
    struct DocumentReference {
        bytes32 documentId;
        bytes32 subjectId;
        string documentType;
        string documentURI;
        bytes32 documentHash;
        address submittedBy;
        uint64 createdAt;
    }

    // =============================================================
    //                         PROVENANCE
    // =============================================================

    /**
     * @notice Generic historical event for an asset or object.
     *
     * eventType is intentionally bytes32 so applications can define
     * additional event types without modifying this library.
     */
    struct ProvenanceEvent {
        bytes32 eventId;
        bytes32 subjectId;
        bytes32 eventType;
        address actor;
        bytes32 dataHash;
        string dataURI;
        uint64 timestamp;
    }

    // =============================================================
    //                     FUNGIBLE CONFIGURATION
    // =============================================================

    /**
     * @notice Configuration recorded for fungible assets.
     *
     * Feature flags describe the deployed asset's capabilities.
     * They do not themselves grant permissions.
     */
    struct FungibleConfig {
        SupplyModel supplyModel;
        uint8 decimals;
        uint256 initialSupply;
        uint256 maxSupply;
        bool mintable;
        bool burnable;
        bool pausable;
        bool permitEnabled;
        bool votesEnabled;
    }

    // =============================================================
    //                  NON-FUNGIBLE CONFIGURATION
    // =============================================================

    /**
     * @notice Configuration recorded for NFT / multi-token assets.
     */
    struct NonFungibleConfig {
        bool multiToken;
        bool burnable;
        bool pausable;
        bool enumerable;
        bool royaltyEnabled;
        uint96 royaltyBps;
        address royaltyReceiver;
    }
}
ABI
[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "assetRegistry_",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "AssetInactive",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "AssetNotFound",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "EmptyKey",
    "type": "error",
    "inputs": []
  },
  {
    "name": "EmptyValue",
    "type": "error",
    "inputs": []
  },
  {
    "name": "InvalidIndex",
    "type": "error",
    "inputs": []
  },
  {
    "name": "PropertyAlreadyActive",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "PropertyAlreadyExists",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "PropertyAlreadyInactive",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "PropertyInactive",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "PropertyNotFound",
    "type": "error",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "Unauthorized",
    "type": "error",
    "inputs": [
      {
        "name": "caller",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ]
  },
  {
    "name": "ZeroAddress",
    "type": "error",
    "inputs": []
  },
  {
    "name": "PropertyCreated",
    "type": "event",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "key",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "valueType",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum NumenAssetTypes.PropertyValueType"
      },
      {
        "name": "unit",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "PropertyDeactivated",
    "type": "event",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "PropertyReactivated",
    "type": "event",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "PropertyUpdated",
    "type": "event",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "indexed": true,
        "internalType": "bytes32"
      },
      {
        "name": "valueType",
        "type": "uint8",
        "indexed": false,
        "internalType": "enum NumenAssetTypes.PropertyValueType"
      },
      {
        "name": "unit",
        "type": "string",
        "indexed": false,
        "internalType": "string"
      },
      {
        "name": "updatedBy",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "assetRegistry",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract INumenAssetRegistry"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "createProperty",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "key",
        "type": "string",
        "internalType": "string"
      },
      {
        "name": "valueType",
        "type": "uint8",
        "internalType": "enum NumenAssetTypes.PropertyValueType"
      },
      {
        "name": "value",
        "type": "bytes",
        "internalType": "bytes"
      },
      {
        "name": "unit",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "deactivateProperty",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "getProperty",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "tuple",
        "components": [
          {
            "name": "propertyId",
            "type": "bytes32",
            "internalType": "bytes32"
          },
          {
            "name": "key",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "valueType",
            "type": "uint8",
            "internalType": "enum NumenAssetTypes.PropertyValueType"
          },
          {
            "name": "value",
            "type": "bytes",
            "internalType": "bytes"
          },
          {
            "name": "unit",
            "type": "string",
            "internalType": "string"
          },
          {
            "name": "createdAt",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "updatedAt",
            "type": "uint64",
            "internalType": "uint64"
          },
          {
            "name": "active",
            "type": "bool",
            "internalType": "bool"
          }
        ],
        "internalType": "struct NumenMetadataRegistry.StoredProperty"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getPropertyId",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "key",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "name": "isPropertyActive",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "metadataRegistryVersion",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "pure"
  },
  {
    "name": "propertyCount",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "propertyExists",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "propertyIdAt",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "index",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "propertyIds",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes32[]",
        "internalType": "bytes32[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "reactivateProperty",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "updateProperty",
    "type": "function",
    "inputs": [
      {
        "name": "assetId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "propertyId",
        "type": "bytes32",
        "internalType": "bytes32"
      },
      {
        "name": "valueType",
        "type": "uint8",
        "internalType": "enum NumenAssetTypes.PropertyValueType"
      },
      {
        "name": "value",
        "type": "bytes",
        "internalType": "bytes"
      },
      {
        "name": "unit",
        "type": "string",
        "internalType": "string"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  }
]