-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: waku-rln test deployment with LazyIMT
- Loading branch information
Showing
4 changed files
with
133 additions
and
32 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity >=0.8.19; | ||
|
||
import "./RlnBase.sol"; | ||
|
||
contract WakuRln is RlnBase { | ||
uint16 public usingStorageIndex = 0; | ||
|
||
function storages(uint16 index) public view returns (address) { | ||
return address(this); | ||
} | ||
|
||
function register(uint16 storageIndex, uint256[] calldata commitments) public { | ||
for (uint i = 0; i < commitments.length; i++) { | ||
_register(commitments[i], 0); | ||
} | ||
} | ||
|
||
function register(uint256[] calldata commitments) public { | ||
register(usingStorageIndex, commitments); | ||
} | ||
|
||
function register(uint16 storageIndex, uint256 commitment) public { | ||
_register(commitment, 0); | ||
} | ||
|
||
constructor( | ||
uint256 membershipDeposit, | ||
uint256 depth, | ||
address _verifier | ||
) | ||
RlnBase(membershipDeposit, depth, _verifier) | ||
{ } | ||
|
||
function _validateRegistration(uint256 idCommitment) internal pure override { } | ||
|
||
function _validateSlash( | ||
uint256 idCommitment, | ||
address payable receiver, | ||
uint256[8] calldata proof | ||
) | ||
internal | ||
pure | ||
override | ||
{ } | ||
} |