Local Solidity source and ABI fingerprints with the deployment manifest, and links to PolygonScan for official source-code verification.
This is a local integrity check. Use https://polygonscan.com/login?ref=verifyContract for mainnet validation.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/// @title Zarina Hendrix Provenance Anchor
/// @notice Anchors tamper-evident artwork ownership records to Polygon.
contract ZarinaProvenanceAnchor {
address public owner;
mapping(address => bool) public authorized;
mapping(bytes32 => bool) public anchored;
event AuthorizationChanged(address indexed account, bool authorized);
event OwnershipAnchored(
uint256 indexed artworkId,
bytes32 indexed recordHash,
bytes32 indexed ownerHash,
bytes32 certificateHash,
string metadataURI,
address publisher,
uint256 timestamp
);
modifier onlyOwner() {
require(msg.sender == owner, "NOT_OWNER");
_;
}
modifier onlyAuthorized() {
require(msg.sender == owner || authorized[msg.sender], "NOT_AUTHORIZED");
_;
}
constructor() {
owner = msg.sender;
authorized[msg.sender] = true;
emit AuthorizationChanged(msg.sender, true);
}
function setAuthorized(address account, bool value) external onlyOwner {
authorized[account] = value;
emit AuthorizationChanged(account, value);
}
function anchor(
uint256 artworkId,
bytes32 recordHash,
bytes32 ownerHash,
bytes32 certificateHash,
string calldata metadataURI
) external onlyAuthorized {
require(recordHash != bytes32(0), "EMPTY_RECORD_HASH");
require(!anchored[recordHash], "ALREADY_ANCHORED");
anchored[recordHash] = true;
emit OwnershipAnchored(artworkId, recordHash, ownerHash, certificateHash, metadataURI, msg.sender, block.timestamp);
}
}