IGovernanceArbitrator

Git Source

Title: IGovernanceArbitrator

Interface for third-party dispute arbitration (no governance)

Manages license disputes with 30-day resolution deadline via designated arbitrators

Functions

initialize

Initializes the GovernanceArbitrator contract (proxy pattern)

Sets up admin roles and contract references

function initialize(address admin, address licenseToken, address ipAsset, address revenueDistributor) external;

Parameters

NameTypeDescription
adminaddressAddress to receive admin role
licenseTokenaddressAddress of LicenseToken contract
ipAssetaddressAddress of IPAsset contract
revenueDistributoraddressAddress of RevenueDistributor contract

submitDispute

Submits a new dispute for a license

Can be submitted by any party (licensee, IP owner, third party)

function submitDispute(uint256 licenseId, string memory reason, string memory proofURI)
    external
    returns (uint256 disputeId);

Parameters

NameTypeDescription
licenseIduint256The license being disputed
reasonstringHuman-readable dispute reason
proofURIstringURI pointing to evidence/documentation

Returns

NameTypeDescription
disputeIduint256Unique identifier for the dispute

resolveDispute

Resolves a dispute

Only callable by ARBITRATOR_ROLE

function resolveDispute(uint256 disputeId, bool approved, string memory resolutionReason) external;

Parameters

NameTypeDescription
disputeIduint256The dispute to resolve
approvedboolWhether to approve (true) or reject (false) the dispute
resolutionReasonstringExplanation of the resolution

executeRevocation

Executes license revocation for an approved dispute

Calls LicenseToken.revokeLicense() and updates dispute status

function executeRevocation(uint256 disputeId) external;

Parameters

NameTypeDescription
disputeIduint256The approved dispute to execute

getDispute

Gets full dispute information

function getDispute(uint256 disputeId) external view returns (Dispute memory dispute);

Parameters

NameTypeDescription
disputeIduint256The dispute ID

Returns

NameTypeDescription
disputeDisputeThe complete dispute struct

getDisputesForLicense

Gets all dispute IDs for a specific license

function getDisputesForLicense(uint256 licenseId) external view returns (uint256[] memory disputeIds);

Parameters

NameTypeDescription
licenseIduint256The license ID

Returns

NameTypeDescription
disputeIdsuint256[]Array of dispute IDs

isDisputeOverdue

Checks if a dispute is overdue (past 30-day deadline)

function isDisputeOverdue(uint256 disputeId) external view returns (bool overdue);

Parameters

NameTypeDescription
disputeIduint256The dispute ID

Returns

NameTypeDescription
overdueboolWhether the dispute is overdue

getTimeRemaining

Gets time remaining for dispute resolution

function getTimeRemaining(uint256 disputeId) external view returns (uint256 timeRemaining);

Parameters

NameTypeDescription
disputeIduint256The dispute ID

Returns

NameTypeDescription
timeRemaininguint256Seconds remaining (0 if overdue)

getDisputeCount

Gets the total number of disputes submitted

function getDisputeCount() external view returns (uint256 count);

Returns

NameTypeDescription
countuint256Total dispute count

pause

Pauses dispute submissions

Only callable by DEFAULT_ADMIN_ROLE

function pause() external;

unpause

Unpauses dispute submissions

Only callable by DEFAULT_ADMIN_ROLE

function unpause() external;

Events

DisputeSubmitted

Emitted when a new dispute is submitted

event DisputeSubmitted(
    uint256 indexed disputeId, uint256 indexed licenseId, address indexed submitter, string reason
);

Parameters

NameTypeDescription
disputeIduint256Unique dispute identifier
licenseIduint256The license being disputed
submitteraddressAddress submitting the dispute
reasonstringDispute reason

DisputeResolved

Emitted when a dispute is resolved

event DisputeResolved(uint256 indexed disputeId, bool approved, address indexed resolver, string reason);

Parameters

NameTypeDescription
disputeIduint256The dispute that was resolved
approvedboolWhether dispute was approved (true) or rejected (false)
resolveraddressAddress that resolved the dispute
reasonstringResolution reasoning

LicenseRevoked

Emitted when a license is revoked due to dispute

event LicenseRevoked(uint256 indexed licenseId, uint256 indexed disputeId);

Parameters

NameTypeDescription
licenseIduint256The license that was revoked
disputeIduint256The dispute that caused revocation

Errors

EmptyReason

Thrown when dispute reason is empty (BR-005.3)

error EmptyReason();

LicenseNotActive

Thrown when attempting to dispute an inactive license (BR-005.2)

error LicenseNotActive();

DisputeAlreadyResolved

Thrown when attempting to resolve an already resolved dispute

error DisputeAlreadyResolved();

DisputeResolutionOverdue

Thrown when attempting to resolve a dispute after 30-day deadline (BR-005.8)

error DisputeResolutionOverdue();

DisputeNotApproved

Thrown when attempting to execute a dispute that is not approved

error DisputeNotApproved();

NotArbitrator

Thrown when caller does not have ARBITRATOR_ROLE

error NotArbitrator();

NotAuthorizedToDispute

Thrown when caller is neither IP owner nor licensee

error NotAuthorizedToDispute();

Structs

Dispute

Complete dispute information

struct Dispute {
    uint256 licenseId;
    address submitter;
    address ipOwner;
    string reason;
    string proofURI;
    DisputeStatus status;
    uint256 submittedAt;
    uint256 resolvedAt;
    address resolver;
    string resolutionReason;
}

Properties

NameTypeDescription
licenseIduint256The license being disputed
submitteraddressAddress that submitted the dispute (BR-005.1: any party)
ipOwneraddressIP asset owner (cached from license data)
reasonstringHuman-readable dispute reason (BR-005.3: required)
proofURIstringOptional URI to supporting evidence (BR-005.1: optional)
statusDisputeStatusCurrent dispute status
submittedAtuint256Timestamp when dispute was submitted
resolvedAtuint256Timestamp when dispute was resolved (0 if pending)
resolveraddressAddress of arbitrator who resolved the dispute
resolutionReasonstringHuman-readable resolution explanation

Enums

DisputeStatus

Possible states of a dispute

enum DisputeStatus {
    Pending,
    Approved,
    Rejected,
    Executed
}

Variants

NameDescription
PendingDispute submitted, awaiting resolution
ApprovedDispute resolved in favor of submitter
RejectedDispute resolved against submitter
ExecutedApproved dispute has been executed (license revoked)