Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: membership #13

Merged
merged 21 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 29 additions & 14 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
WakuRlnV2Test:test__IdCommitmentToMetadata__DoesntExist() (gas: 16726)
WakuRlnV2Test:test__InvalidPaginationQuery__EndIndexGTcommitmentIndex() (gas: 18249)
WakuRlnV2Test:test__InvalidPaginationQuery__StartIndexGTEndIndex() (gas: 16130)
WakuRlnV2Test:test__InvalidRegistration__DuplicateIdCommitment() (gas: 99502)
WakuRlnV2Test:test__InvalidRegistration__FullTree() (gas: 14328)
WakuRlnV2Test:test__InvalidRegistration__InvalidIdCommitment__LargerThanField() (gas: 15229)
WakuRlnV2Test:test__InvalidRegistration__InvalidIdCommitment__Zero() (gas: 14004)
WakuRlnV2Test:test__InvalidRegistration__InvalidUserMessageLimit__LargerThanMax() (gas: 17703)
WakuRlnV2Test:test__InvalidRegistration__InvalidUserMessageLimit__Zero() (gas: 14085)
WakuRlnV2Test:test__Upgrade() (gas: 3791109)
WakuRlnV2Test:test__ValidPaginationQuery(uint32) (runs: 1000, μ: 445155, ~: 159972)
WakuRlnV2Test:test__ValidPaginationQuery__OneElement() (gas: 119773)
WakuRlnV2Test:test__ValidRegistration(uint256,uint32) (runs: 1000, μ: 124408, ~: 124408)
WakuRlnV2Test:test__ValidRegistration__kats() (gas: 96616)
WakuRlnV2Test:test__IdCommitmentToMetadata__DoesntExist() (gas: 27535)
WakuRlnV2Test:test__InsertionNormalOrder(uint32) (runs: 1004, μ: 1093558, ~: 496185)
WakuRlnV2Test:test__InvalidETHAmount(uint256,uint32) (runs: 1004, μ: 322023, ~: 322023)
WakuRlnV2Test:test__InvalidPaginationQuery__EndIndexGTcommitmentIndex() (gas: 18378)
WakuRlnV2Test:test__InvalidPaginationQuery__StartIndexGTEndIndex() (gas: 16225)
WakuRlnV2Test:test__InvalidRegistration__DuplicateIdCommitment() (gas: 249303)
WakuRlnV2Test:test__InvalidRegistration__FullTree() (gas: 162941)
WakuRlnV2Test:test__InvalidRegistration__InvalidIdCommitment__LargerThanField() (gas: 13471)
WakuRlnV2Test:test__InvalidRegistration__InvalidIdCommitment__Zero() (gas: 12182)
WakuRlnV2Test:test__InvalidRegistration__InvalidUserMessageLimit__MinMax() (gas: 63423)
WakuRlnV2Test:test__LinearPriceCalculation(uint32) (runs: 1015, μ: 25964, ~: 25964)
WakuRlnV2Test:test__RegistrationWhenMaxRateLimitIsReached() (gas: 547839)
WakuRlnV2Test:test__RegistrationWhenMaxRateLimitIsReachedAndMultipleExpiredMembersAvailable() (gas: 739752)
WakuRlnV2Test:test__RegistrationWhenMaxRateLimitIsReachedAndSingleExpiredMemberAvailable() (gas: 388429)
WakuRlnV2Test:test__RegistrationWhenMaxRateLimitReachedAndMultipleExpiredMembersAvailableWithoutEnoughRateLimit() (gas: 748699)
WakuRlnV2Test:test__RegistrationWithTokens(uint256,uint32) (runs: 1004, μ: 318681, ~: 318681)
WakuRlnV2Test:test__RemoveAllExpiredMemberships(uint32) (runs: 1004, μ: 6262152, ~: 1315256)
WakuRlnV2Test:test__RemoveExpiredMemberships(uint32) (runs: 1003, μ: 1075445, ~: 1075445)
WakuRlnV2Test:test__Upgrade() (gas: 6990368)
WakuRlnV2Test:test__ValidPaginationQuery(uint32) (runs: 1005, μ: 222425, ~: 53007)
WakuRlnV2Test:test__ValidPaginationQuery__OneElement() (gas: 262398)
WakuRlnV2Test:test__ValidRegistration(uint32) (runs: 1003, μ: 267715, ~: 267715)
WakuRlnV2Test:test__ValidRegistrationExpiry(uint32) (runs: 1003, μ: 1280765, ~: 1280765)
WakuRlnV2Test:test__ValidRegistrationExtend(uint32) (runs: 1003, μ: 1123986, ~: 1123986)
WakuRlnV2Test:test__ValidRegistrationExtendSingleMembership(uint32) (runs: 1003, μ: 257339, ~: 257339)
WakuRlnV2Test:test__ValidRegistration__kats() (gas: 238726)
WakuRlnV2Test:test__WithdrawETH(uint32) (runs: 1003, μ: 243355, ~: 243356)
WakuRlnV2Test:test__WithdrawToken(uint32) (runs: 1003, μ: 314604, ~: 314605)
WakuRlnV2Test:test__indexReuse_eraseMemberships(uint32) (runs: 1004, μ: 2187085, ~: 964428)
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ $ forge coverage
#### Deploy to Anvil:

```sh
$ forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545
$ TOKEN_ADDRESS=0x1122334455667788990011223344556677889900 forge script script/Deploy.s.sol --broadcast --rpc-url localhost --tc Deploy
```

Replace the `TOKEN_ADDRESS` value by a token address you have deployed on anvil. A `TestToken` is available in
`test/TestToken.sol` and can be deployed with

```sh
forge script test/TestToken.sol --broadcast --rpc-url localhost --tc TestTokenFactory
```

For this script to work, you need to have a `MNEMONIC` environment variable set to a valid
Expand Down
Loading
Loading