mirror of
https://github.com/logos-messaging/waku-rlnv1-contract.git
synced 2026-01-03 06:43:09 +00:00
3.3 KiB
3.3 KiB
Solidity API
NotImplemented
error NotImplemented()
WakuRln
contractIndex
uint16 contractIndex
constructor
constructor(address _poseidonHasher, uint16 _contractIndex) public
_register
function _register(uint256 idCommitment) internal
Registers a member
Parameters
| Name | Type | Description |
|---|---|---|
| idCommitment | uint256 | The idCommitment of the member |
register
function register(uint256[] idCommitments) external
register
function register(uint256 idCommitment) external payable
Allows a user to register as a member
Parameters
| Name | Type | Description |
|---|---|---|
| idCommitment | uint256 | The idCommitment of the member |
slash
function slash(uint256 idCommitment, address payable receiver, uint256[8] proof) external pure
Allows a user to slash a member
Parameters
| Name | Type | Description |
|---|---|---|
| idCommitment | uint256 | The idCommitment of the member |
| receiver | address payable | |
| proof | uint256[8] |
_validateRegistration
function _validateRegistration(uint256 idCommitment) internal view
Inheriting contracts MUST override this function
_validateSlash
function _validateSlash(uint256 idCommitment, address payable receiver, uint256[8] proof) internal pure
withdraw
function withdraw() external pure
Allows a user to withdraw funds allocated to them upon slashing a member
StorageAlreadyExists
error StorageAlreadyExists(address storageAddress)
NoStorageContractAvailable
error NoStorageContractAvailable()
IncompatibleStorage
error IncompatibleStorage()
IncompatibleStorageIndex
error IncompatibleStorageIndex()
WakuRlnRegistry
nextStorageIndex
uint16 nextStorageIndex
storages
mapping(uint16 => address) storages
usingStorageIndex
uint16 usingStorageIndex
poseidonHasher
contract IPoseidonHasher poseidonHasher
NewStorageContract
event NewStorageContract(uint16 index, address storageAddress)
onlyUsableStorage
modifier onlyUsableStorage()
constructor
constructor(address _poseidonHasher) public
_insertIntoStorageMap
function _insertIntoStorageMap(address storageAddress) internal
registerStorage
function registerStorage(address storageAddress) external
newStorage
function newStorage() external
register
function register(uint256[] commitments) external payable
register
function register(uint16 storageIndex, uint256[] commitments) external payable
register
function register(uint16 storageIndex, uint256 commitment) external payable
forceProgress
function forceProgress() external