From 9998665871ad2a3f1a2e11c5807a4298bcf266bf Mon Sep 17 00:00:00 2001 From: rymnc <43716372+rymnc@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:54:59 +0530 Subject: [PATCH] fix: withdraw is NotImplemented too --- contracts/WakuRln.sol | 4 ++++ docs/index.md | 8 ++++++++ test/WakuRln.t.sol | 2 ++ 3 files changed, 14 insertions(+) diff --git a/contracts/WakuRln.sol b/contracts/WakuRln.sol index a51725c..8ce7891 100644 --- a/contracts/WakuRln.sol +++ b/contracts/WakuRln.sol @@ -50,4 +50,8 @@ contract WakuRln is Ownable, RlnBase { { revert NotImplemented(); } + + function withdraw() external pure override { + revert NotImplemented(); + } } diff --git a/docs/index.md b/docs/index.md index 61afdb2..042c5b2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -77,3 +77,11 @@ _Inheriting contracts MUST override this function_ ```solidity function _validateSlash(uint256 idCommitment, address payable receiver, uint256[8] proof) internal pure ``` + +### withdraw + +```solidity +function withdraw() external pure +``` + +Allows a user to withdraw funds allocated to them upon slashing a member diff --git a/test/WakuRln.t.sol b/test/WakuRln.t.sol index f9aa125..27309af 100644 --- a/test/WakuRln.t.sol +++ b/test/WakuRln.t.sol @@ -64,5 +64,7 @@ contract WakuRlnTest is Test { wakuRln.register(idCommitment); vm.expectRevert(NotImplemented.selector); wakuRln.slash(idCommitment, payable(address(0)), zeroedProof); + vm.expectRevert(NotImplemented.selector); + wakuRln.withdraw(); } }