// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "../interfaces/INumenAssetRegistry.sol";
/**
* @title NumenProvenanceRegistry
* @notice Append-only provenance history for assets registered in the
* Numen Asset Registry.
*
* @dev
* - Provenance entries are immutable after creation.
* - Entries can only be created for active registered Numen assets.
* - This contract does not determine whether a claim is true.
* - This contract does not prove authenticity, legal ownership,
* custody, origin, inspection quality, or regulatory compliance.
* - The address that records an event is permanently stored as the
* recorder of that claim.
*
* The registry is intentionally permissionless at the protocol level.
* Applications may use NumenAttestationRegistry or another trust layer
* to determine which recorders they consider authoritative.
*/
contract NumenProvenanceRegistry {
// =============================================================
// ERRORS
// =============================================================
error ZeroAddress();
error InvalidAssetId();
error AssetNotRegistered(bytes32 assetId);
error AssetNotActive(bytes32 assetId);
error EmptyEventType();
error EmptyData();
error InvalidRelatedAddress();
error ProvenanceEntryNotFound(uint256 entryId);
// =============================================================
// EVENTS
// =============================================================
event ProvenanceRecorded(
uint256 indexed entryId,
bytes32 indexed assetId,
address indexed recorder,
bytes32 eventType,
address relatedAddress,
uint64 recordedAt,
string dataURI,
bytes32 dataHash
);
// =============================================================
// STRUCTS
// =============================================================
/**
* @notice Immutable provenance entry.
*
* @param entryId Unique sequential provenance entry ID.
* @param assetId Numen Asset ID this entry refers to.
* @param eventType Application-defined event classification.
* @param recorder Address that submitted the claim.
* @param relatedAddress Optional address related to the event.
* @param recordedAt Block timestamp when the claim was recorded.
* @param dataURI Optional URI containing additional off-chain data.
* @param dataHash Optional hash committing to provenance data.
*/
struct ProvenanceEntry {
uint256 entryId;
bytes32 assetId;
bytes32 eventType;
address recorder;
address relatedAddress;
uint64 recordedAt;
string dataURI;
bytes32 dataHash;
}
// =============================================================
// IMMUTABLE STORAGE
// =============================================================
INumenAssetRegistry public immutable assetRegistry;
// =============================================================
// STORAGE
// =============================================================
uint256 private _nextEntryId = 1;
mapping(uint256 => ProvenanceEntry) private _entries;
mapping(bytes32 => uint256[]) private _assetEntries;
mapping(address => uint256[]) private _recorderEntries;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(address assetRegistry_) {
if (assetRegistry_ == address(0)) {
revert ZeroAddress();
}
assetRegistry = INumenAssetRegistry(assetRegistry_);
}
// =============================================================
// WRITE FUNCTIONS
// =============================================================
/**
* @notice Records a new immutable provenance claim.
*
* @dev
* Anyone may record provenance for an active registered asset.
*
* The caller is permanently stored as the recorder. Consumers
* should independently decide whether that recorder is trusted.
*
* At least one of dataURI or dataHash must be supplied.
*
* @param assetId Numen Asset ID.
* @param eventType Application-defined event type.
* @param relatedAddress Optional related account.
* @param dataURI Optional URI for supporting information.
* @param dataHash Optional hash commitment to supporting data.
*
* @return entryId Newly created provenance entry ID.
*/
function recordProvenance(
bytes32 assetId,
bytes32 eventType,
address relatedAddress,
string calldata dataURI,
bytes32 dataHash
)
external
returns (uint256 entryId)
{
if (assetId == bytes32(0)) {
revert InvalidAssetId();
}
if (eventType == bytes32(0)) {
revert EmptyEventType();
}
if (
bytes(dataURI).length == 0 &&
dataHash == bytes32(0)
) {
revert EmptyData();
}
_requireActiveAsset(assetId);
entryId = _nextEntryId;
unchecked {
_nextEntryId = entryId + 1;
}
uint64 timestamp = uint64(block.timestamp);
_entries[entryId] = ProvenanceEntry({
entryId: entryId,
assetId: assetId,
eventType: eventType,
recorder: msg.sender,
relatedAddress: relatedAddress,
recordedAt: timestamp,
dataURI: dataURI,
dataHash: dataHash
});
_assetEntries[assetId].push(entryId);
_recorderEntries[msg.sender].push(entryId);
emit ProvenanceRecorded(
entryId,
assetId,
msg.sender,
eventType,
relatedAddress,
timestamp,
dataURI,
dataHash
);
}
// =============================================================
// READ FUNCTIONS
// =============================================================
/**
* @notice Returns one provenance entry.
*/
function getProvenanceEntry(
uint256 entryId
)
external
view
returns (ProvenanceEntry memory)
{
ProvenanceEntry storage entry = _entries[entryId];
if (entry.entryId == 0) {
revert ProvenanceEntryNotFound(entryId);
}
return entry;
}
/**
* @notice Returns all provenance entry IDs for an asset.
*/
function getAssetEntryIds(
bytes32 assetId
)
external
view
returns (uint256[] memory)
{
return _assetEntries[assetId];
}
/**
* @notice Returns all provenance entry IDs submitted by a recorder.
*/
function getRecorderEntryIds(
address recorder
)
external
view
returns (uint256[] memory)
{
return _recorderEntries[recorder];
}
/**
* @notice Returns the number of provenance entries for an asset.
*/
function getAssetEntryCount(
bytes32 assetId
)
external
view
returns (uint256)
{
return _assetEntries[assetId].length;
}
/**
* @notice Returns the number of provenance entries submitted by
* a recorder.
*/
function getRecorderEntryCount(
address recorder
)
external
view
returns (uint256)
{
return _recorderEntries[recorder].length;
}
/**
* @notice Returns an asset provenance entry ID by index.
*/
function getAssetEntryIdAt(
bytes32 assetId,
uint256 index
)
external
view
returns (uint256)
{
return _assetEntries[assetId][index];
}
/**
* @notice Returns a recorder provenance entry ID by index.
*/
function getRecorderEntryIdAt(
address recorder,
uint256 index
)
external
view
returns (uint256)
{
return _recorderEntries[recorder][index];
}
/**
* @notice Returns the next provenance entry ID.
*/
function nextEntryId()
external
view
returns (uint256)
{
return _nextEntryId;
}
/**
* @notice Returns this contract's protocol version identifier.
*/
function provenanceVersion()
external
pure
returns (bytes32)
{
return
keccak256(
"NUMEN_PROVENANCE_REGISTRY_V1"
);
}
// =============================================================
// INTERNAL FUNCTIONS
// =============================================================
function _requireActiveAsset(
bytes32 assetId
)
internal
view
{
INumenAssetRegistry.AssetRecord memory record =
assetRegistry.getAsset(assetId);
if (
record.assetId == bytes32(0) ||
record.assetContract == address(0)
) {
revert AssetNotRegistered(assetId);
}
if (!record.active) {
revert AssetNotActive(assetId);
}
}
}// 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);
}// 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;
}
}[
{
"type": "constructor",
"inputs": [
{
"name": "assetRegistry_",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"name": "AssetNotActive",
"type": "error",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"name": "AssetNotRegistered",
"type": "error",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"name": "EmptyData",
"type": "error",
"inputs": []
},
{
"name": "EmptyEventType",
"type": "error",
"inputs": []
},
{
"name": "InvalidAssetId",
"type": "error",
"inputs": []
},
{
"name": "InvalidRelatedAddress",
"type": "error",
"inputs": []
},
{
"name": "ProvenanceEntryNotFound",
"type": "error",
"inputs": [
{
"name": "entryId",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "ZeroAddress",
"type": "error",
"inputs": []
},
{
"name": "ProvenanceRecorded",
"type": "event",
"inputs": [
{
"name": "entryId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "assetId",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "recorder",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "eventType",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "relatedAddress",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "recordedAt",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "dataURI",
"type": "string",
"indexed": false,
"internalType": "string"
},
{
"name": "dataHash",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"name": "assetRegistry",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract INumenAssetRegistry"
}
],
"stateMutability": "view"
},
{
"name": "getAssetEntryCount",
"type": "function",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getAssetEntryIdAt",
"type": "function",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getAssetEntryIds",
"type": "function",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "getProvenanceEntry",
"type": "function",
"inputs": [
{
"name": "entryId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "tuple",
"components": [
{
"name": "entryId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "eventType",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "recorder",
"type": "address",
"internalType": "address"
},
{
"name": "relatedAddress",
"type": "address",
"internalType": "address"
},
{
"name": "recordedAt",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "dataURI",
"type": "string",
"internalType": "string"
},
{
"name": "dataHash",
"type": "bytes32",
"internalType": "bytes32"
}
],
"internalType": "struct NumenProvenanceRegistry.ProvenanceEntry"
}
],
"stateMutability": "view"
},
{
"name": "getRecorderEntryCount",
"type": "function",
"inputs": [
{
"name": "recorder",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getRecorderEntryIdAt",
"type": "function",
"inputs": [
{
"name": "recorder",
"type": "address",
"internalType": "address"
},
{
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getRecorderEntryIds",
"type": "function",
"inputs": [
{
"name": "recorder",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "nextEntryId",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "provenanceVersion",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "pure"
},
{
"name": "recordProvenance",
"type": "function",
"inputs": [
{
"name": "assetId",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "eventType",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "relatedAddress",
"type": "address",
"internalType": "address"
},
{
"name": "dataURI",
"type": "string",
"internalType": "string"
},
{
"name": "dataHash",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "entryId",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "nonpayable"
}
]