Skip to content
Verified contractPartialMIT

TransferLockModule

Address0x0d34aaa5f2f1828ff3672b62cf0341ebc268f965
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.22

 

Same code

1 more contract

 

Details

Compiler
solc 0.8.22+commit.4fc1097e
Language
solidity
Optimization
Yes, 200 runs
EVM version
paris
Via IR
yes
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
26,415,108
Creation transaction
0xedd8c5eaa2…31d39e9194

src/contracts/modules/TransferLockModule.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import {IPartitionInfo} from "../interfaces/IPartitionInfo.sol";
import {BaseComplianceModule} from "../lib/BaseComplianceModule.sol";
import {ReasonCodes} from "../lib/ReasonCodes.sol";

/// @title TransferLockModule
/// @notice Universal absolute transfer lock — blocks any holder from selling until the
///         partition's configured lock period elapses from their own acquisition timestamp.
///         Jurisdiction-agnostic: applies to restricted-person and non-restricted holders alike (unlike the
///         lockup LockupModule which is restricted-class-only).
///
/// @dev    STATELESS READER — the per-holder clock (`transferLockEnd[holder][partition]`)
///         lives in Token (ERC-7201 storage) and is stamped FRESH at every acquisition
///         (mint via `_issueByPartition`, transfer-in via `_applyTransferPostHooks`).
///         This module only reads it via `IPartitionInfo.transferLockEnd`.
///         Pattern mirrors HoldingPeriodModule — no per-holder state here.
///
///         ABSOLUTE: no jurisdiction carve-out, no distributor bypass, no operator exception.
///         Operators mediate `from`'s transfer — the engine calls `canTransferByPartition`
///         with `from = tokenHolder` in both `transferByPartition` and
///         `operatorTransferByPartition`. This module sees `from` and vetoes the transfer
///         if the holder is locked, regardless of who the operator is.
///
///         MINT CARVE-OUT: `from == address(0)` is an acquisition that *starts* the
///         recipient's clock. The module passes; Token stamps `transferLockEnd[to]`.
///
///         NEVER REVERTS: `moduleCheck` always returns `(bool, bytes32)`. Uses direct
///         comparison `block.timestamp < lockEnd` — no subtraction, no underflow path.
///
///         ZERO MEANS UNLOCKED: `transferLockEnd == 0` → pass. This covers:
///         - partition created with `transferLockPeriod == 0`
///         - holder has never acquired under a locking partition
///         The Token's stamp invariant ensures any held balance acquired under a non-zero
///         period has a non-zero clock.
contract TransferLockModule is BaseComplianceModule {
    // ─────────────────────────── errors ───────────────────────────────────────

    error ZeroAddress();

    // ─────────────────────────── state ────────────────────────────────────────

    /// @notice Token view for `transferLockEnd(from, partition)` — the sender's per-holder clock.
    ///         `immutable` (address value type). Set once in constructor.
    IPartitionInfo public immutable token;

    // ─────────────────────────── constructor ──────────────────────────────────

    /// @param token_  IPartitionInfo for `transferLockEnd(from, partition)` reads.
    ///                Must be non-zero (ZeroAddress revert).
    constructor(IPartitionInfo token_) {
        if (address(token_) == address(0)) revert ZeroAddress();
        token = token_;
    }

    // ─────────────────────────── IComplianceModule ────────────────────────

    /// @notice Universal absolute transfer lock check.
    /// @dev    MINT CARVE-OUT: `from == address(0)` is a mint (acquisition), not a sale.
    ///         Returns `(true, bytes32(0))` immediately — Token stamps the clock for `to`.
    ///
    ///         ZERO MEANS UNLOCKED: `lockEnd == 0` → pass. No max-sentinel fail-safe
    ///         here (unlike `lockupEnd`) because 0 is a valid "no lock" state for this module.
    ///
    ///         Comparison: `block.timestamp < lockEnd` — direct, no subtraction, no underflow.
    ///
    ///         NEVER reverts (BaseComplianceModule invariant).
    function moduleCheck(
        bytes32 partition,
        address from,
        address, /* to — universal lock is sender-side only */
        uint256  /* amount */
    ) external view returns (bool ok, bytes32 reasonCode) {
        // mint is an acquisition, not a sale — pass and let Token stamp the recipient clock
        if (from == address(0)) return (true, bytes32(0));

        uint256 lockEnd = token.transferLockEnd(from, partition);
        // 0 = no lock (partition has no period, or holder never acquired)
        if (lockEnd != 0 && block.timestamp < lockEnd) {
            return (false, ReasonCodes.TRANSFER_LOCKED);
        }
        return (true, bytes32(0));
    }
}

@openzeppelin/contracts/utils/introspection/IERC165.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

src/contracts/interfaces/ICompliance.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

/// @title IComplianceEvents
/// @notice Shared governance events for all ERC-1400 compliance modules.
/// @dev    Single-owner discipline (same as ReasonCodes.sol): defined ONCE here,
///         consumed by KYCRequiredModule, SanctionsModule, ConcentrationCapModule.
///         The governance handler indexes topic0 of ComplianceRuleUpdated to detect any
///         compliance-parameter change across all modules — requires a single shared definition.
interface IComplianceEvents {
    /// @notice Emitted when a governance-gated compliance rule parameter is updated.
    /// @dev    Frozen signature: `param` is a bytes32 short-string (fits in 32 bytes),
    ///         `indexed` so consumers can topic-filter by rule without decoding calldata.
    ///         `param` naming (not `rule`) matches architecture §8 listing.
    ///         `uint256` arg type (not `uint64`) matches architecture generic form.
    ///         Modules inherit this interface — do NOT redeclare the event per-module.
    event ComplianceRuleUpdated(bytes32 indexed param, uint256 oldValue, uint256 newValue);

    /// @notice Emitted when a claim/cert type is added to or removed from a module's
    ///         governed claim-list set (e.g. restricted claim types, required cert types).
    /// @dev    `ComplianceRuleUpdated` doesn't fit this shape (scalar uint256 old/new only) —
    ///         mirrors `IdentityRegistry.RequiredCertificationUpdated`'s dedicated-event pattern.
    ///         `param` identifies which set on the module (e.g. "restrictedClaimTypes",
    ///         "accreditedRequiredCertTypes", "offshoreRequiredCertTypes").
    event ClaimSetUpdated(bytes32 indexed param, bytes32 indexed claimType, bool required);
}

/// @title IComplianceModule
/// @notice Partition-aware compliance module interface for ERC-1400.
/// @dev    ALWAYS returns (bool, bytes32 reasonCode) — NEVER reverts.
///         Partition `bytes32(0)` is the default single-tranche partition.
///         The engine calls moduleCheck; modules must not revert — revert crashes the
///         transfer pipeline.
///         An unset partition closeDate (sentinel type(uint256).max) causes LockupModule to
///         veto restricted-class recipients (period not started) rather than revert.
///         Zero-address `to` guard is CENTRALIZED in the engine — modules do NOT
///         repeat it.
interface IComplianceModule {
    /// @notice Partition-aware compliance check called by the engine for each attached module.
    /// @param  partition  The ERC-1410 partition. `bytes32(0)` = default single-tranche partition.
    /// @param  from       Sender. `address(0)` = mint path (modules may allow/deny mints per logic).
    /// @param  to         Recipient. Engine guarantees `to != address(0)` before this is called.
    /// @param  amount     Token amount (wei).
    /// @return ok         True if this module allows the transfer.
    /// @return reasonCode Opaque bytes32 reason code (from ReasonCodes.sol) when ok == false;
    ///                    bytes32(0) when ok == true.
    function moduleCheck(
        bytes32 partition,
        address from,
        address to,
        uint256 amount
    ) external view returns (bool ok, bytes32 reasonCode);
}

/// @title ICompliance
/// @notice Partition-native ERC-1400 compliance dispatch surface.
/// @dev    One instance per asset. No `asset` param — modules are bound
///         to a single asset's registry/token at construction.
///         `bytes32(0)` is the default single-tranche partition.
interface ICompliance {
    /// @notice Emitted when a compliance module is attached. Frozen signature.
    ///         `indexed` so the governance handler can topic-filter per module address.
    event ModuleAttached(address indexed module);

    /// @notice Emitted when a compliance module is detached. Frozen signature.
    ///         `indexed` so the governance handler can topic-filter per module address.
    event ModuleDetached(address indexed module);

    /// @notice Partition-native compliance check. Runs engine fast-path first, then module walk.
    /// @dev    View — does not revert under normal operation. If an attached module reverts inside
    ///         `moduleCheck`, the revert propagates (fail-closed): a reverting
    ///         module denies the transfer and never produces an allow. Callers must handle revert.
    ///         Returns `(false, reasonCode)` on any veto; `(true, bytes32(0))` on all-pass.
    /// @param  partition  ERC-1410 partition key; `bytes32(0)` = default single-tranche.
    /// @param  from       Sender. `address(0)` = mint — NOT rejected by the engine.
    /// @param  to         Recipient.
    /// @param  amount     Token amount (wei).
    function canTransferByPartition(
        bytes32 partition,
        address from,
        address to,
        uint256 amount
    ) external view returns (bool ok, bytes32 reasonCode);

    /// @notice Attach a compliance module (ordered; first-veto-wins walk order).
    function addModule(address module) external;

    /// @notice Detach a compliance module.
    function removeModule(address module) external;

    /// @notice Return the attached module list in attach order.
    function modules() external view returns (address[] memory);
}

src/contracts/interfaces/IPartitionInfo.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

/// @title IPartitionInfo
/// @notice Minimal view interface that ERC-1400 compliance modules call on the Token
///         to read per-partition and per-holder clocks.
/// @dev    First consumer — LockupModule reads `lockupEnd`. Both clock getters are
///         declared here in one shot so consumers only read — they do NOT extend or
///         redeclare the interface.
///
///         - `lockupEnd` — read by LockupModule.
///         - `holdingEnd` — read by HoldingPeriodModule.
///
///         `isRestricted` label is NOT here — modules gate purely on clocks; a washed
///         holding passes implicitly because the wash requires both clocks already cleared.
///         `isRestricted` is a Token getter for the off-chain read-model/UI.
///
///         Implemented by Token.
interface IPartitionInfo {
    /// @notice Partition pool discriminator. Framework-neutral values — descriptive of the
    ///         investor pool, no regulation named (S-1, decided 2026-07-22). `OFFSHORE` = 0
    ///         (default, back-compatible with every partition that predates this field);
    ///         `ACCREDITED` = 1. Declared here, not in `Token`, so `Token`'s config struct
    ///         references `IPartitionInfo.Tranche` instead of redeclaring an incompatible
    ///         second type — two independent `enum Tranche` declarations would not compile
    ///         against each other.
    enum Tranche { OFFSHORE, ACCREDITED }

    /// @notice Returns the partition's frozen tranche. Append-only addition — breaks no
    ///         existing implementor.
    /// @dev    Returns `Tranche.OFFSHORE` (enum default 0) for a partition that was NEVER
    ///         created — this is NOT proof the partition exists (S-2, decided 2026-07-22).
    ///         `tranche()` never answers "does this partition exist" — check partition
    ///         existence separately (e.g. via the Token's own creation-tracking) when that
    ///         question matters. Modules dispatch on this value; never infer existence from it.
    /// @param  partition  ERC-1410 partition key.
    /// @return            The partition's tranche.
    function tranche(bytes32 partition) external view returns (Tranche);

    /// @notice Returns the ERC-1400 lockup end timestamp for a partition.
    /// @dev    Returns `type(uint256).max` when:
    ///           - `closeDate` is unset (sentinel `type(uint256).max` = continuous partition), OR
    ///           - the partition is uncreated (stored `closeDate` default == 0).
    ///         Only computes `closeDate + lockupPeriod` for a genuinely-set, future/now closeDate.
    ///         Never returns the `0 + lockupPeriod ≈ 1971` fail-open, nor overflows.
    ///         LockupModule reads this to determine if a restricted-class recipient is blocked.
    /// @param  partition  ERC-1410 partition key.
    /// @return            Unix timestamp (seconds) after which lockup lifts. `type(uint256).max`
    ///                    means the lockup is indefinite (period not started or partition unknown).
    function lockupEnd(bytes32 partition) external view returns (uint256);

    /// @notice Returns the holding-period end timestamp for a holder in a partition.
    /// @dev    Returns 0 when no holding-period clock has been set for this holder/partition pair
    ///         (default mapping value). `holdingEnd(address(0), partition) == 0` so the mint path
    ///         passes HoldingPeriodModule implicitly.
    ///         HoldingPeriodModule reads this to enforce the holding period on the sender.
    /// @param  holder     Wallet address of the holder.
    /// @param  partition  ERC-1410 partition key.
    /// @return            Unix timestamp (seconds) after which the holding period is satisfied.
    ///                    0 means no holding-period restriction applies.
    function holdingEnd(address holder, bytes32 partition) external view returns (uint256);

    /// @notice Returns the universal absolute transfer lock end for a holder in a partition.
    /// @dev    Returns 0 when no transfer lock has been set (partition has no transferLockPeriod,
    ///         or the holder has never acquired). 0 = not locked (TransferLockModule passes).
    ///         Unlike `lockupEnd`, there is NO max-sentinel fail-safe — `0` means genuinely unlocked
    ///         (partition may have transferLockPeriod == 0 configured). Stored by the Token and
    ///         stamped FRESH (not tacked) at each acquisition: max(existing, now + period).
    ///         TransferLockModule reads this to enforce the universal lock.
    /// @param  holder     Wallet address of the holder.
    /// @param  partition  ERC-1410 partition key.
    /// @return            Unix timestamp (seconds) after which the absolute transfer lock lifts.
    ///                    0 means no transfer lock applies.
    function transferLockEnd(address holder, bytes32 partition) external view returns (uint256);
}

src/contracts/lib/BaseComplianceModule.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {IComplianceModule} from "../interfaces/ICompliance.sol";

/// @title BaseComplianceModule
/// @notice Abstract base for all ERC-1400 partition-aware compliance modules.
/// @dev    MODULE AUTHORING RULE — DEFAULT-BLOCK INVARIANT:
///
///         Every concrete module MUST uphold all three invariants:
///
///         1. NEVER DEFAULT TO ALLOW.
///            When a required claim is missing, unverifiable, or stale, return
///            `(false, <reasonCode>)`. Never return `(true, bytes32(0))` on absent
///            or unverifiable data. The pipeline MUST default to block.
///
///         2. NEVER REVERT.
///            `moduleCheck` MUST be a pure `view` that returns a `(bool, bytes32)` tuple
///            under all inputs. A revert inside `moduleCheck` crashes the whole transfer
///            pipeline (the engine does not catch module reverts). Unset partition state
///            (e.g. closeDate == type(uint256).max) is a veto via RESTRICTED_RECIPIENT_LOCKUP,
///            NOT a revert. `MISSING_COMPLIANCE_ANCHOR` is retired.
///
///         3. FRESHNESS CHECK: USE ADDITION FORM.
///            Stale-claim checks MUST use the addition form:
///              `claimTimestamp + freshnessWindow < block.timestamp`
///            NOT the subtraction form `block.timestamp - claimTimestamp > window`
///            because the subtraction reverts (checked arithmetic) on a future `claimTimestamp`.
///            A future timestamp must NOT revert — it simply hasn't expired yet, so the
///            check passes. Mirror `SanctionsModule` exactly.
///
///         4. CENTRAL ZERO-TO GUARD IS IN THE ENGINE, NOT MODULES.
///            `to == address(0)` is caught by the engine fast-path.
///            Module `moduleCheck` is only called after that guard passes, so `to` is
///            guaranteed non-zero. Modules do NOT repeat the zero-address check.
///
///         MINT PATH (`from == address(0)`):
///            The engine does not reject the zero `from` — that is a legitimate mint.
///            Per the mint-applicability matrix, each module
///            specifies whether it gates mint. See the module-level NatSpec for details.
abstract contract BaseComplianceModule is IERC165, IComplianceModule {
    // Concrete modules implement moduleCheck() and inherit these invariants.
    // No shared state is defined here — modules own their own storage.

    /// @notice ERC-165 introspection — allows `ModularCompliance.addModule` to validate that
    ///         an attached address genuinely implements `IComplianceModule`.
    ///         All concrete modules inherit this automatically — no per-module override needed.
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == type(IComplianceModule).interfaceId ||
            interfaceId == type(IERC165).interfaceId;
    }
}

src/contracts/lib/ReasonCodes.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

/// @title ReasonCodes
/// @notice Canonical bytes32 reason-code constants for the ERC-1400 compliance pipeline.
/// @dev    Contains the engine fast-path codes plus the full framework-neutral reason set
///         and the optional ERC-1066 `reasonToStatusByte` view helper.
///
///         Codes are keccak256 hashes of their human-readable label strings.
///         Framework-neutral: they describe the mechanism (preserving the auditor/regulator evidence
///         trail) and map to ERC-1066 status bytes for wallet/explorer display.
///         The Token maps a non-success reasonCode to a named revert.
///
///         OMITTED by design:
///         - `MISSING_COMPLIANCE_ANCHOR` — retired; greenfield build has no legacy slot.
///           Unset partition closeDate (type(uint256).max) vetoes via RESTRICTED_RECIPIENT_LOCKUP.
///         - `CERTIFICATION_NOT_SIGNED` — Token-level named error in purchaseByPartition
///           (parallel to BelowMinimumPurchase), not a compliance-module reason code.
library ReasonCodes {
    // ─── Fast-path codes ──────────────────────────────────

    /// @notice Sender is on a sanctions list or another sanctions-basis block.
    /// @dev    ERC-1066: 0x50 (Disallowed/Stop)
    bytes32 internal constant SANCTIONS_BLOCKED = keccak256("SANCTIONS_BLOCKED");

    /// @notice Sender is blocked for a non-sanctions reason (AFFILIATE / ADMIN bit).
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant SENDER_BLOCKED = keccak256("SENDER_BLOCKED");

    /// @notice Recipient is blocked or is the zero address (central zero-to guard).
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant RECIPIENT_BLOCKED = keccak256("RECIPIENT_BLOCKED");

    // ─── Module reason codes ───────────────────────────

    /// @notice Recipient is a restricted class (e.g. US_PERSON) and the lockup
    ///         period has not yet elapsed for this partition.
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant RESTRICTED_RECIPIENT_LOCKUP = keccak256("RESTRICTED_RECIPIENT_LOCKUP");

    /// @notice Holding period not met for the sender in this partition.
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant HOLDING_PERIOD_NOT_MET = keccak256("HOLDING_PERIOD_NOT_MET");

    /// @notice Sanctions screening for this wallet has exceeded the freshness window (30-day).
    /// @dev    ERC-1066: 0x57 (Expired)
    bytes32 internal constant SANCTIONS_SCREENING_STALE = keccak256("SANCTIONS_SCREENING_STALE");

    /// @notice Recipient is not KYC-verified or not registered in the IdentityRegistry.
    /// @dev    ERC-1066: 0x56 (Awaiting / not found) — KYC
    bytes32 internal constant KYC_NOT_VERIFIED = keccak256("KYC_NOT_VERIFIED");

    /// @notice Recipient's KYC verification has exceeded the freshness window (default 12 months).
    /// @dev    ERC-1066: 0x57 (Expired)
    bytes32 internal constant KYC_EXPIRED = keccak256("KYC_EXPIRED");

    /// @notice Recipient's aggregate holding would exceed the concentration cap
    ///         (9.99% cross-partition affiliate cap).
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant CONCENTRATION_CAP_EXCEEDED = keccak256("CONCENTRATION_CAP_EXCEEDED");

    /// @notice Recipient is on the destination blocklist (hedging venue / prohibited destination).
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant RECIPIENT_BLOCKLISTED = keccak256("RECIPIENT_BLOCKLISTED");

    /// @notice Required certification is absent for the recipient
    ///         (purchaser certification, resale/hedging covenants).
    /// @dev    ERC-1066: 0x56
    bytes32 internal constant CERTIFICATION_MISSING = keccak256("CERTIFICATION_MISSING");

    /// @notice Universal absolute transfer lock — holder has not held for the partition's
    ///         transferLockPeriod (5y principal / 1y distribution). Jurisdiction-agnostic.
    /// @dev    ERC-1066: 0x50
    bytes32 internal constant TRANSFER_LOCKED = keccak256("TRANSFER_LOCKED");

    /// @notice Recipient does not hold the claim a gated partition requires
    ///         (e.g. a tranche restricted to a specific recipient class).
    /// @dev    ERC-1066: 0x10 (Disallowed, generic)
    bytes32 internal constant RECIPIENT_CLASS_INELIGIBLE = keccak256("RECIPIENT_CLASS_INELIGIBLE");

    /// @notice Recipient lacks a required verified-eligibility attestation
    ///         (claim absent, or present but never verified).
    /// @dev    ERC-1066: 0x56 (Awaiting/not found)
    bytes32 internal constant ACCREDITATION_NOT_VERIFIED = keccak256("ACCREDITATION_NOT_VERIFIED");

    /// @notice Recipient's verified-eligibility attestation has exceeded its freshness window.
    /// @dev    ERC-1066: 0x57 (Expired)
    bytes32 internal constant ACCREDITATION_EXPIRED = keccak256("ACCREDITATION_EXPIRED");

    // ─── ERC-1066 view helper (display-only, not in the transfer hot path) ───

    /// @notice Maps a framework-neutral bytes32 reason code to its ERC-1066 status byte.
    /// @dev    Display-only — for wallet and block-explorer integrations.
    ///         Returns 0x10 (Disallowed, generic) for any unknown code.
    ///         Pure — safe to call in view contexts; no state access, no side effects.
    function reasonToStatusByte(bytes32 code) internal pure returns (bytes1) {
        // KYC codes → 0x56 (Awaiting/not found) or 0x57 (Expired)
        if (code == KYC_NOT_VERIFIED) return 0x56;
        if (code == KYC_EXPIRED) return 0x57;
        if (code == CERTIFICATION_MISSING) return 0x56;
        // Freshness staleness → 0x57 (Expired)
        if (code == SANCTIONS_SCREENING_STALE) return 0x57;
        // All hard-block codes → 0x50 (Disallowed/Stop)
        if (code == SANCTIONS_BLOCKED) return 0x50;
        if (code == SENDER_BLOCKED) return 0x50;
        if (code == RECIPIENT_BLOCKED) return 0x50;
        if (code == RESTRICTED_RECIPIENT_LOCKUP) return 0x50;
        if (code == HOLDING_PERIOD_NOT_MET) return 0x50;
        if (code == CONCENTRATION_CAP_EXCEEDED) return 0x50;
        if (code == RECIPIENT_BLOCKLISTED) return 0x50;
        if (code == TRANSFER_LOCKED) return 0x50;
        // Accreditation-gate codes
        if (code == RECIPIENT_CLASS_INELIGIBLE) return 0x10;
        if (code == ACCREDITATION_NOT_VERIFIED) return 0x56;
        if (code == ACCREDITATION_EXPIRED) return 0x57;
        // Success (bytes32(0) from all-pass) → 0x51 (Success)
        if (code == bytes32(0)) return 0x51;
        // Unknown code → generic 0x00 (failure default)
        return 0x00;
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "useLiteralContent": true
  },
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "paris"
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.