From 82df8f052e1fb8dc68a772b348765c6a6d216308 Mon Sep 17 00:00:00 2001 From: Nicolas Lecouflet Date: Thu, 5 Dec 2024 14:24:02 +0100 Subject: [PATCH] feat(script): add ToggleDispute script --- scripts/Disputer.s.sol | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/scripts/Disputer.s.sol b/scripts/Disputer.s.sol index 3b164a8..1b6d08a 100644 --- a/scripts/Disputer.s.sol +++ b/scripts/Disputer.s.sol @@ -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); + } +}