{
  "tool_id": "art-608-erc2981-royalty-calculator",
  "note": "golden_hash filled by `node golden-parity.test.mjs --update`.",
  "vectors": [
    {
      "name": "malformed-missing-fields",
      "policy_parameters": {},
      "output_payload": {
        "overall_determination": "INDETERMINATE",
        "findings": [
          {
            "check": "input_validation",
            "verdict": "INDETERMINATE",
            "detail": "sale_price is required; royalty_fraction_bps is required"
          }
        ],
        "sale_price": null,
        "royalty_fraction_bps": null,
        "effective_royalty_pct": null,
        "computed_royalty_amount": null,
        "claimed_royalty_amount": null,
        "receiver": null,
        "related_tools": [
          {
            "tool_id": "528-nft-metadata-validator",
            "relation": "Validates the token metadata JSON this royalty figure would accompany."
          },
          {
            "tool_id": "521-cant-be-evil-nft-license-picker",
            "relation": "Picks the license terms a royalty-bearing NFT is minted under."
          }
        ],
        "not_proven": [
          {
            "item": "On-chain royaltyInfo() response",
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state."
          },
          {
            "item": "Marketplace enforcement",
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it."
          },
          {
            "item": "Per-token royalty override correctness",
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares."
          }
        ],
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      },
      "golden_hash": "6752c7b80ece243dd1510074c5a41eb63b0f864589c5b3f004ddf91fd0ca52b2"
    },
    {
      "name": "consistent-2.5pct-with-claim",
      "policy_parameters": {
        "sale_price": "1000000000000000000",
        "royalty_fraction_bps": 250,
        "claimed_royalty_amount": "25000000000000000",
        "receiver": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4"
      },
      "output_payload": {
        "overall_determination": "CONSISTENT",
        "findings": [
          {
            "check": "bps_range_validity",
            "verdict": "CONSISTENT",
            "detail": "royalty_fraction_bps (250) is within the 0-10000 (0-100%) range the OpenZeppelin reference ERC2981 implementation enforces."
          },
          {
            "check": "claimed_amount_match",
            "verdict": "CONSISTENT",
            "detail": "claimed_royalty_amount matches the recomputed value."
          }
        ],
        "sale_price": "1000000000000000000",
        "royalty_fraction_bps": "250",
        "effective_royalty_pct": "2.5%",
        "computed_royalty_amount": "25000000000000000",
        "claimed_royalty_amount": "25000000000000000",
        "receiver": "0x5B38Da6a701c568545dCfcB03FcB875f56beddC4",
        "related_tools": [
          {
            "tool_id": "528-nft-metadata-validator",
            "relation": "Validates the token metadata JSON this royalty figure would accompany."
          },
          {
            "tool_id": "521-cant-be-evil-nft-license-picker",
            "relation": "Picks the license terms a royalty-bearing NFT is minted under."
          }
        ],
        "not_proven": [
          {
            "item": "On-chain royaltyInfo() response",
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state."
          },
          {
            "item": "Marketplace enforcement",
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it."
          },
          {
            "item": "Per-token royalty override correctness",
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares."
          }
        ],
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      },
      "golden_hash": "3d0b05539205d2233f70d9de3a4d822bf4d545d4e8f637ffdc6f7b3ef4191e9f"
    },
    {
      "name": "mismatch-claimed-vs-computed",
      "policy_parameters": {
        "sale_price": "1000000000000000000",
        "royalty_fraction_bps": 500,
        "claimed_royalty_amount": "1"
      },
      "output_payload": {
        "overall_determination": "INCONSISTENT",
        "findings": [
          {
            "check": "bps_range_validity",
            "verdict": "CONSISTENT",
            "detail": "royalty_fraction_bps (500) is within the 0-10000 (0-100%) range the OpenZeppelin reference ERC2981 implementation enforces."
          },
          {
            "check": "claimed_amount_match",
            "verdict": "INCONSISTENT",
            "detail": "claimed_royalty_amount (1) does NOT match the recomputed value (50000000000000000)."
          }
        ],
        "sale_price": "1000000000000000000",
        "royalty_fraction_bps": "500",
        "effective_royalty_pct": "5%",
        "computed_royalty_amount": "50000000000000000",
        "claimed_royalty_amount": "1",
        "receiver": null,
        "related_tools": [
          {
            "tool_id": "528-nft-metadata-validator",
            "relation": "Validates the token metadata JSON this royalty figure would accompany."
          },
          {
            "tool_id": "521-cant-be-evil-nft-license-picker",
            "relation": "Picks the license terms a royalty-bearing NFT is minted under."
          }
        ],
        "not_proven": [
          {
            "item": "On-chain royaltyInfo() response",
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state."
          },
          {
            "item": "Marketplace enforcement",
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it."
          },
          {
            "item": "Per-token royalty override correctness",
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares."
          }
        ],
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      },
      "golden_hash": "a90e5762ce034b846cfa29aeab45ce7d4971e619ab63416faae365be3aef4bdb"
    },
    {
      "name": "bps-out-of-range",
      "policy_parameters": {
        "sale_price": "100",
        "royalty_fraction_bps": 12000
      },
      "output_payload": {
        "overall_determination": "INCONSISTENT",
        "findings": [
          {
            "check": "bps_range_validity",
            "verdict": "INCONSISTENT",
            "detail": "royalty_fraction_bps (12000) exceeds 10000 (100%) -- the OpenZeppelin reference ERC2981 implementation reverts on this value (\"ERC2981: royalty fee will exceed salePrice\"). The recompute below still reports the raw arithmetic."
          },
          {
            "check": "claimed_amount_match",
            "verdict": "INDETERMINATE",
            "detail": "No claimed_royalty_amount was supplied to compare against."
          }
        ],
        "sale_price": "100",
        "royalty_fraction_bps": "12000",
        "effective_royalty_pct": "120%",
        "computed_royalty_amount": "120",
        "claimed_royalty_amount": null,
        "receiver": null,
        "related_tools": [
          {
            "tool_id": "528-nft-metadata-validator",
            "relation": "Validates the token metadata JSON this royalty figure would accompany."
          },
          {
            "tool_id": "521-cant-be-evil-nft-license-picker",
            "relation": "Picks the license terms a royalty-bearing NFT is minted under."
          }
        ],
        "not_proven": [
          {
            "item": "On-chain royaltyInfo() response",
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state."
          },
          {
            "item": "Marketplace enforcement",
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it."
          },
          {
            "item": "Per-token royalty override correctness",
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares."
          }
        ],
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      },
      "golden_hash": "f5f0b382d2ab466b459509846b603a9e6dd4597bf6ebbf2211d72dc6ac2527c5"
    },
    {
      "name": "zero-sale-price-no-claim",
      "policy_parameters": {
        "sale_price": "0",
        "royalty_fraction_bps": 750
      },
      "output_payload": {
        "overall_determination": "INDETERMINATE",
        "findings": [
          {
            "check": "bps_range_validity",
            "verdict": "CONSISTENT",
            "detail": "royalty_fraction_bps (750) is within the 0-10000 (0-100%) range the OpenZeppelin reference ERC2981 implementation enforces."
          },
          {
            "check": "claimed_amount_match",
            "verdict": "INDETERMINATE",
            "detail": "No claimed_royalty_amount was supplied to compare against."
          }
        ],
        "sale_price": "0",
        "royalty_fraction_bps": "750",
        "effective_royalty_pct": "7.5%",
        "computed_royalty_amount": "0",
        "claimed_royalty_amount": null,
        "receiver": null,
        "related_tools": [
          {
            "tool_id": "528-nft-metadata-validator",
            "relation": "Validates the token metadata JSON this royalty figure would accompany."
          },
          {
            "tool_id": "521-cant-be-evil-nft-license-picker",
            "relation": "Picks the license terms a royalty-bearing NFT is minted under."
          }
        ],
        "not_proven": [
          {
            "item": "On-chain royaltyInfo() response",
            "detail": "This tool never calls a contract's royaltyInfo(tokenId, salePrice). sale_price and royalty_fraction_bps are caller-declared, not read from chain state."
          },
          {
            "item": "Marketplace enforcement",
            "detail": "ERC-2981 is a voluntary signalling standard. A computed royalty amount is what the formula yields, not a guarantee any marketplace will pay it."
          },
          {
            "item": "Per-token royalty override correctness",
            "detail": "Many ERC-2981 implementations allow a per-token royalty that overrides a contract default. This tool has no way to know which one governs a given tokenId -- royalty_fraction_bps is exactly what the caller declares."
          }
        ],
        "scope_note": "Recomputes an ERC-2981 royalty amount as floor(sale_price * royalty_fraction_bps / 10000), the same integer-division convention the OpenZeppelin reference ERC2981 implementation uses. Zero network calls -- this tool never queries a contract's actual royaltyInfo() return value; sale_price, royalty_fraction_bps, and receiver are all caller-declared. ERC-2981 royalty payment is a voluntary off-chain convention: most marketplaces are not required to honor it, and this tool makes no claim that any marketplace will actually pay the computed amount."
      },
      "golden_hash": "66e832a267afd9617fd10ed36aa4b6953441c88cbe1a4816631d7e593a3dd16d"
    }
  ]
}
