Documentation Index
Fetch the complete documentation index at: https://docs.story.foundation/llms.txt
Use this file to discover all available pages before exploring further.
The Dispute Module acts as an enforcement layer for IP assets that allows raising and resolving disputes through arbitration by judges. It enables users to challenge IP assets that may violate rules or infringe on other IP rights.
State Variables
name
string public constant override name = DISPUTE_MODULE_KEY
Returns the name of the module.
IN_DISPUTE
bytes32 public constant IN_DISPUTE = bytes32("IN_DISPUTE")
Tag to represent the dispute is in dispute state waiting for judgement.
LICENSE_REGISTRY
ILicenseRegistry public immutable LICENSE_REGISTRY
Returns the protocol-wide license registry.
GROUP_IP_ASSET_REGISTRY
IGroupIPAssetRegistry public immutable GROUP_IP_ASSET_REGISTRY
Returns the protocol-wide group IP asset registry.
IP_GRAPH_ACL
IPGraphACL public immutable IP_GRAPH_ACL
Returns the protocol-wide IP Graph Access Control List.
Functions
initialize
function initialize(address accessManager) external initializer
Initializer for this implementation contract.
Parameters:
accessManager: The address of the protocol admin roles contract.
whitelistDisputeTag
function whitelistDisputeTag(bytes32 tag, bool allowed) external restricted
Whitelists a dispute tag.
Parameters:
tag: The dispute tag.
allowed: Indicates if the dispute tag is whitelisted or not.
whitelistArbitrationPolicy
function whitelistArbitrationPolicy(address arbitrationPolicy, bool allowed) external restricted
Whitelists an arbitration policy.
Parameters:
arbitrationPolicy: The address of the arbitration policy.
allowed: Indicates if the arbitration policy is whitelisted or not.
setArbitrationRelayer
function setArbitrationRelayer(address arbitrationPolicy, address arbPolicyRelayer) external restricted
Sets the arbitration relayer for a given arbitration policy.
Parameters:
arbitrationPolicy: The address of the arbitration policy.
arbPolicyRelayer: The address of the arbitration relayer.
setBaseArbitrationPolicy
function setBaseArbitrationPolicy(address arbitrationPolicy) external restricted
Sets the base arbitration policy.
Parameters:
arbitrationPolicy: The address of the arbitration policy.
setArbitrationPolicyCooldown
function setArbitrationPolicyCooldown(uint256 cooldown) external restricted
Sets the arbitration policy cooldown.
Parameters:
cooldown: The cooldown in seconds.
setArbitrationPolicy
function setArbitrationPolicy(
address ipId,
address nextArbitrationPolicy
) external whenNotPaused verifyPermission(ipId)
Sets the arbitration policy for an ipId.
Parameters:
ipId: The ipId.
nextArbitrationPolicy: The address of the arbitration policy.
raiseDispute
function raiseDispute(
address targetIpId,
bytes32 disputeEvidenceHash,
bytes32 targetTag,
bytes calldata data
) external nonReentrant whenNotPaused returns (uint256)
Raises a dispute on a given ipId.
Parameters:
targetIpId: The ipId that is the target of the dispute.
disputeEvidenceHash: The hash pointing to the dispute evidence.
targetTag: The target tag of the dispute.
data: The data to initialize the policy.
Returns:
disputeId: The id of the newly raised dispute.
setDisputeJudgement
function setDisputeJudgement(
uint256 disputeId,
bool decision,
bytes calldata data
) external nonReentrant whenNotPaused
Sets the dispute judgement on a given dispute. Only whitelisted arbitration relayers can call to judge.
Parameters:
disputeId: The dispute id.
decision: The decision of the dispute.
data: The data to set the dispute judgement.
cancelDispute
function cancelDispute(uint256 disputeId, bytes calldata data) external nonReentrant whenNotPaused
Cancels an ongoing dispute.
Parameters:
disputeId: The dispute id.
data: The data to cancel the dispute.
function tagIfRelatedIpInfringed(address ipIdToTag, uint256 infringerDisputeId) external whenNotPaused
Tags a derivative if a parent has been tagged with an infringement tag or a group ip if a group member has been tagged with an infringement tag.
Parameters:
ipIdToTag: The ipId to tag.
infringerDisputeId: The dispute id that tagged the related infringing ipId.
resolveDispute
function resolveDispute(uint256 disputeId, bytes calldata data) external nonReentrant whenNotPaused
Resolves a dispute after it has been judged.
Parameters:
disputeId: The dispute id.
data: The data to resolve the dispute.
updateActiveArbitrationPolicy
function updateActiveArbitrationPolicy(address ipId) external whenNotPaused returns (address arbitrationPolicy)
Updates the active arbitration policy for a given ipId.
Parameters:
Returns:
arbitrationPolicy: The address of the arbitration policy.
isIpTagged
function isIpTagged(address ipId) external view returns (bool)
Returns true if the ipId is tagged with any tag (meaning at least one dispute went through).
Parameters:
Returns:
isTagged: True if the ipId is tagged.
disputeCounter
function disputeCounter() external view returns (uint256)
Returns the dispute ID counter.
Returns:
uint256: The current dispute counter value.
arbitrationPolicyCooldown
function arbitrationPolicyCooldown() external view returns (uint256)
Returns the arbitration policy cooldown.
Returns:
uint256: The cooldown in seconds.
baseArbitrationPolicy
function baseArbitrationPolicy() external view returns (address)
Returns the address of the base arbitration policy.
Returns:
address: The base arbitration policy address.
disputes
function disputes(
uint256 disputeId
)
external
view
returns (
address targetIpId,
address disputeInitiator,
uint256 disputeTimestamp,
address arbitrationPolicy,
bytes32 disputeEvidenceHash,
bytes32 targetTag,
bytes32 currentTag,
uint256 infringerDisputeId
)
Returns the dispute information for a given dispute id.
Parameters:
disputeId: The dispute id.
Returns:
targetIpId: The ipId that is the target of the dispute.
disputeInitiator: The address of the dispute initiator.
disputeTimestamp: The timestamp of the dispute.
arbitrationPolicy: The address of the arbitration policy.
disputeEvidenceHash: The hash pointing to the dispute evidence.
targetTag: The target tag of the dispute.
currentTag: The current tag of the dispute.
infringerDisputeId: The infringer dispute id.
isWhitelistedDisputeTag
function isWhitelistedDisputeTag(bytes32 tag) external view returns (bool allowed)
Indicates if a dispute tag is whitelisted.
Parameters:
Returns:
allowed: True if the tag is whitelisted.
isWhitelistedArbitrationPolicy
function isWhitelistedArbitrationPolicy(address arbitrationPolicy) external view returns (bool allowed)
Indicates if an arbitration policy is whitelisted.
Parameters:
arbitrationPolicy: The address of the arbitration policy.
Returns:
allowed: True if the policy is whitelisted.
arbitrationRelayer
function arbitrationRelayer(address arbitrationPolicy) external view returns (address)
Returns the arbitration relayer for a given arbitration policy.
Parameters:
arbitrationPolicy: The address of the arbitration policy.
Returns:
address: The arbitration relayer address.
arbitrationPolicies
function arbitrationPolicies(address ipId) external view returns (address policy)
Returns the arbitration policy for a given ipId.
Parameters:
Returns:
policy: The arbitration policy address.
nextArbitrationPolicies
function nextArbitrationPolicies(address ipId) external view returns (address policy)
Returns the next arbitration policy for a given ipId.
Parameters:
Returns:
policy: The next arbitration policy address.
nextArbitrationUpdateTimestamps
function nextArbitrationUpdateTimestamps(address ipId) external view returns (uint256 timestamp)
Returns the next arbitration update timestamp for a given ipId.
Parameters:
Returns:
timestamp: The update timestamp.