Skip to content

Commit

Permalink
feat(script): add ToggleDispute script
Browse files Browse the repository at this point in the history
  • Loading branch information
nlecoufl committed Dec 5, 2024
1 parent bbda62b commit 82df8f0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/Disputer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,23 @@ contract WithdrawFunds is DisputerScript {
}
}
}

// ToggleDispute script
contract ToggleDispute is DisputerScript {
function run(string memory reason) external {
_run(reason);
}

function run() external {
// MODIFY THIS VALUE TO SET THE DISPUTE REASON TO TOGGLE
string memory reason = "test";
_run(reason);
}

function _run(string memory _reason) internal broadcast {
uint256 chainId = block.chainid;
address disputerAddress = readAddress(chainId, "Merkl.Disputer");
Disputer(disputerAddress).toggleDispute(_reason);
console.log("Toggled dispute for:", _reason);
}
}

0 comments on commit 82df8f0

Please sign in to comment.