mirror of
https://github.com/logos-messaging/waku-rlnv1-contract.git
synced 2026-01-07 16:53:09 +00:00
fix(rln): no need to expose hash in Rln.sol
This commit is contained in:
parent
c30913520f
commit
20d98afcda
@ -79,7 +79,7 @@ contract RLN {
|
|||||||
require(receiver != address(0), "RLN, _withdraw: empty receiver address");
|
require(receiver != address(0), "RLN, _withdraw: empty receiver address");
|
||||||
|
|
||||||
// derive public key
|
// derive public key
|
||||||
uint256 pubkey = _hash(secret);
|
uint256 pubkey = hash(secret);
|
||||||
require(members[_pubkeyIndex] == pubkey, "RLN, _withdraw: not verified");
|
require(members[_pubkeyIndex] == pubkey, "RLN, _withdraw: not verified");
|
||||||
|
|
||||||
// delete member
|
// delete member
|
||||||
@ -92,13 +92,7 @@ contract RLN {
|
|||||||
emit MemberWithdrawn(pubkey, _pubkeyIndex);
|
emit MemberWithdrawn(pubkey, _pubkeyIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hash(
|
function hash(uint256 input) internal view returns (uint256) {
|
||||||
uint256 value
|
|
||||||
) external returns (uint256) {
|
|
||||||
return poseidonHasher.hash(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
function _hash(uint256 input) internal view returns (uint256) {
|
|
||||||
return poseidonHasher.hash(input);
|
return poseidonHasher.hash(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user