fix: remove payable modifier

This commit is contained in:
rymnc 2023-08-23 18:26:20 +05:30
parent 44224b1dca
commit 1f1ec9c0bc
No known key found for this signature in database
GPG Key ID: AAA088D5C68ECD34
2 changed files with 6 additions and 6 deletions

View File

@ -48,7 +48,7 @@ contract WakuRlnRegistry is Ownable {
_insertIntoStorageMap(address(newStorageContract)); _insertIntoStorageMap(address(newStorageContract));
} }
function register(uint256[] calldata commitments) external payable onlyUsableStorage { function register(uint256[] calldata commitments) external onlyUsableStorage {
// iteratively check if the storage contract is full, and increment the usingStorageIndex if it is // iteratively check if the storage contract is full, and increment the usingStorageIndex if it is
while (true) { while (true) {
try WakuRln(storages[usingStorageIndex]).register(commitments) { try WakuRln(storages[usingStorageIndex]).register(commitments) {
@ -67,12 +67,12 @@ contract WakuRlnRegistry is Ownable {
} }
} }
function register(uint16 storageIndex, uint256[] calldata commitments) external payable { function register(uint16 storageIndex, uint256[] calldata commitments) external {
if (storageIndex >= nextStorageIndex) revert NoStorageContractAvailable(); if (storageIndex >= nextStorageIndex) revert NoStorageContractAvailable();
WakuRln(storages[storageIndex]).register(commitments); WakuRln(storages[storageIndex]).register(commitments);
} }
function register(uint16 storageIndex, uint256 commitment) external payable { function register(uint16 storageIndex, uint256 commitment) external {
if (storageIndex >= nextStorageIndex) revert NoStorageContractAvailable(); if (storageIndex >= nextStorageIndex) revert NoStorageContractAvailable();
// optimize the gas used below // optimize the gas used below
uint256[] memory commitments = new uint256[](1); uint256[] memory commitments = new uint256[](1);

View File

@ -181,19 +181,19 @@ function newStorage() external
### register ### register
```solidity ```solidity
function register(uint256[] commitments) external payable function register(uint256[] commitments) external
``` ```
### register ### register
```solidity ```solidity
function register(uint16 storageIndex, uint256[] commitments) external payable function register(uint16 storageIndex, uint256[] commitments) external
``` ```
### register ### register
```solidity ```solidity
function register(uint16 storageIndex, uint256 commitment) external payable function register(uint16 storageIndex, uint256 commitment) external
``` ```
### forceProgress ### forceProgress