DisputeModule.sol

The dispute module acts as an enforcement layer for IP assets that allows raising and resolving disputes
through arbitration by judges.

name

string name

Returns the string identifier associated with the module.

IN_DISPUTE

bytes32 IN_DISPUTE

Tag to represent the dispute is in dispute state waiting for judgement

IP_ASSET_REGISTRY

contract IIPAssetRegistry IP_ASSET_REGISTRY

Protocol-wide IP asset registry

disputeCounter

uint256 disputeCounter

Dispute ID counter

baseArbitrationPolicy

address baseArbitrationPolicy

The address of the base arbitration policy

disputes

mapping(uint256 => struct IDisputeModule.Dispute) disputes

Returns the dispute information for a given dispute id

isWhitelistedDisputeTag

mapping(bytes32 => bool) isWhitelistedDisputeTag

Indicates if a dispute tag is whitelisted

isWhitelistedArbitrationPolicy

mapping(address => bool) isWhitelistedArbitrationPolicy

Indicates if an arbitration policy is whitelisted

isWhitelistedArbitrationRelayer

mapping(address => mapping(address => bool)) isWhitelistedArbitrationRelayer

Indicates if an arbitration relayer is whitelisted for a given arbitration policy

arbitrationPolicies

mapping(address => address) arbitrationPolicies

Arbitration policy for a given ipId

constructor

constructor(address _controller, address _assetRegistry, address _governance) public

whitelistDisputeTag

function whitelistDisputeTag(bytes32 tag, bool allowed) external

Whitelists a dispute tag

Parameters

NameTypeDescription
tagbytes32The dispute tag
allowedboolIndicates if the dispute tag is whitelisted or not

whitelistArbitrationPolicy

function whitelistArbitrationPolicy(address arbitrationPolicy, bool allowed) external

Whitelists an arbitration policy

Parameters

NameTypeDescription
arbitrationPolicyaddressThe address of the arbitration policy
allowedboolIndicates if the arbitration policy is whitelisted or not

whitelistArbitrationRelayer

function whitelistArbitrationRelayer(address arbitrationPolicy, address arbPolicyRelayer, bool allowed) external

Whitelists an arbitration relayer for a given arbitration policy

Parameters

NameTypeDescription
arbitrationPolicyaddressThe address of the arbitration policy
arbPolicyRelayeraddressThe address of the arbitration relayer
allowedboolIndicates if the arbitration relayer is whitelisted or not

setBaseArbitrationPolicy

function setBaseArbitrationPolicy(address arbitrationPolicy) external

Sets the base arbitration policy

Parameters

NameTypeDescription
arbitrationPolicyaddressThe address of the arbitration policy

setArbitrationPolicy

function setArbitrationPolicy(address ipId, address arbitrationPolicy) external

Sets the arbitration policy for an ipId

Parameters

NameTypeDescription
ipIdaddressThe ipId
arbitrationPolicyaddressThe address of the arbitration policy

raiseDispute

function raiseDispute(address targetIpId, string linkToDisputeEvidence, bytes32 targetTag, bytes data) external returns (uint256)

Raises a dispute on a given ipId

Parameters

NameTypeDescription
targetIpIdaddressThe ipId that is the target of the dispute
linkToDisputeEvidencestringThe link of the dispute evidence
targetTagbytes32The target tag of the dispute
databytesThe data to initialize the policy

Return Values

NameTypeDescription
[0]uint256disputeId The id of the newly raised dispute

setDisputeJudgement

function setDisputeJudgement(uint256 disputeId, bool decision, bytes data) external

Sets the dispute judgement on a given dispute. Only whitelisted arbitration relayers can call to judge.

Parameters

NameTypeDescription
disputeIduint256The dispute id
decisionboolThe decision of the dispute
databytesThe data to set the dispute judgement

cancelDispute

function cancelDispute(uint256 disputeId, bytes data) external

Cancels an ongoing dispute

Parameters

NameTypeDescription
disputeIduint256The dispute id
databytesThe data to cancel the dispute

resolveDispute

function resolveDispute(uint256 disputeId) external

Resolves a dispute after it has been judged

Parameters

NameTypeDescription
disputeIduint256The dispute id

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

NameTypeDescription
ipIdaddressThe ipId

Return Values

NameTypeDescription
[0]boolisTagged True if the ipId is tagged