Skip to content

Commit

Permalink
propagate dispute tags with parent arbitration policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Spablob committed Nov 25, 2024
1 parent 6f538db commit af9a593
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions contracts/modules/dispute/DisputeModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -290,25 +290,22 @@ contract DisputeModule is
Dispute memory parentDispute = $.disputes[parentDisputeId];
if (parentDispute.targetIpId != parentIpId) revert Errors.DisputeModule__ParentIpIdMismatch();

// a dispute current tag prior to being resolved can be in 3 states:
// a dispute current tag can be in 3 states:
// IN_DISPUTE, 0, or a tag (ie. "IMPROPER_REGISTRATION")
// by restricting IN_DISPUTE and 0 - it is ensured the parent has been tagged before resolving dispute
// by restricting IN_DISPUTE and 0 - it is ensured the parent has been tagged before tagging the derivative
if (parentDispute.currentTag == IN_DISPUTE || parentDispute.currentTag == bytes32(0))
revert Errors.DisputeModule__ParentNotTagged();

if (!LICENSE_REGISTRY.isParentIp(parentIpId, derivativeIpId)) revert Errors.DisputeModule__NotDerivative();

address arbitrationPolicy = $.arbitrationPolicies[derivativeIpId];
if (!$.isWhitelistedArbitrationPolicy[arbitrationPolicy]) arbitrationPolicy = $.baseArbitrationPolicy;

uint256 disputeId = ++$.disputeCounter;
uint256 disputeTimestamp = block.timestamp;

$.disputes[disputeId] = Dispute({
targetIpId: derivativeIpId,
disputeInitiator: msg.sender,
disputeTimestamp: disputeTimestamp,
arbitrationPolicy: arbitrationPolicy,
arbitrationPolicy: parentDispute.arbitrationPolicy,
disputeEvidenceHash: "",
targetTag: parentDispute.currentTag,
currentTag: parentDispute.currentTag,
Expand Down

0 comments on commit af9a593

Please sign in to comment.