35 Commits

Author SHA1 Message Date
Richard Ramos
66a1a6c48c
code review 2024-10-07 16:16:57 -04:00
Richard Ramos
6db38e367f
refactor: do not keep track of membership registration order
* unify terminology for mdetails
* more DRY in LinearPriceCalculator
* improve terminology consistency (#16)
* refactor, minor fixes
* do not reset ongoing grace period on extension (cf. spec change)
* minor renaming, comments
* refactor, group functions by funcitonality
* extract membership expiration calculation to internal function
* save active duration per membership (must carry over after extension)
* optional lazy erasure from membership set
* minor fixes in tests
* fix: off-by-one: end index can't be equal to next free index
* minor refactoring, comments
* define period boundaries: start inclusive, end exclusive
* separate eraseMembership functions to user-focused (lazy) and admin-focused (tree cleanup)
* minor fix to maintain line lengths
* unify membership-related events
* add test for  zero grace period
* fix typo in comment

Co-authored-by: richΛrd <info@richardramos.me>

---------

Co-authored-by: richΛrd <info@richardramos.me>
2024-10-07 16:01:05 -04:00
Richard Ramos
522599c704
fix: more efficient duplicate members check 2024-09-23 17:18:54 -04:00
Richard Ramos
df502c78ff
fix: code review 2024-09-18 16:42:57 -04:00
Richard Ramos
3fbcbfe624
chore: update readme and script to allow running on anvil 2024-09-11 12:21:25 -04:00
Richard Ramos
a658315e03
chore: rename commitmentIndex to nextCommitmentIndex 2024-09-11 10:36:02 -04:00
Richard Ramos
22ddb35d34
chore: more test units 2024-09-10 10:43:31 -04:00
Richard Ramos
12e837a1e2
feat: allow choosing automatic membership erases and specific membership removal on register 2024-09-09 22:01:50 -04:00
Richard Ramos
c66f72897b
fix: type for rate limit in price calculator 2024-09-09 17:23:43 -04:00
Richard Ramos
6ba9a5b6d8
fix: lint 2024-09-09 15:11:05 -04:00
Richard Ramos
7f60c538b3
fix: remove ETH support 2024-09-09 14:58:28 -04:00
Richard Ramos
0cd80d639c
refactor: use expiration term instead of billing period 2024-09-09 12:20:58 -04:00
Richard Ramos
251d8907d4
chore: more tests 2024-09-07 17:58:19 -04:00
Richard Ramos
f91269a1b0
fix: lint 2024-09-06 19:32:03 -04:00
Richard Ramos
0d2f43e98b
fix: fulltree test 2024-09-06 19:06:03 -04:00
Richard Ramos
a369de965d
chore: more tests 2024-09-06 16:52:57 -04:00
Richard Ramos
9251400051
chore: some fixes and gas optimizations 2024-09-06 16:12:19 -04:00
Richard Ramos
9a1c1dc33d
refactor: minor optimization when expiring memberships 2024-09-06 12:09:04 -04:00
Richard Ramos
5ddfc3554d
chore: more test units and fixes 2024-09-06 11:31:43 -04:00
Richard Ramos
fe018930dc
chore: more test units and fixes 2024-09-06 09:58:56 -04:00
Richard Ramos
f3d085df8d
feat: membership 2024-09-05 17:17:49 -04:00
rymnc
64df4593c6
fix: update gitpkg url for zk-kit, default max msg limit 100 2024-06-27 13:59:24 +05:30
rymnc
28a8cc00b5
chore: add linea sepolia deployment 2024-06-26 14:29:18 +05:30
rymnc
89ea39b6fc
fix: appropriate hardfork for cardona 2024-06-04 19:32:13 +05:30
Aaryamann Challani
a576a8949c
chore: emit rate commitment instead of idcommitment (#9)
chore: emit rate commitment instead of idcommitment

chore

chore

forge install: openzeppelin-contracts

v4.9.6

forge install: openzeppelin-contracts-upgradeable

v4.9.6

fix: use oz v4.9.6
2024-06-03 21:09:11 +05:30
Aaryamann Challani
48542f3f04
chore: integrate proxy (#8)
* forge install: openzeppelin-foundry-upgrades

v0.3.1

* forge install: openzeppelin-contracts-upgradeable

v5.0.2

* test: integrate transparent proxy

* test: patch

* fix 

* fix: adorno

* fix: add cardona deployment

* fix: broken test for upgrade

* fix: cleanup

* fix: cleanup

* fix: lint

* fix: remove upgrade from Deploy.s.sol

* fix: envCheck
2024-05-30 19:21:55 +05:30
Aaryamann Challani
5f0d62d52e
chore(tests): add kats test for merkle proof (#7)
* chore(tests): add kats test for merkle proof

fix: cleanup, snapshot

* fix: fixed size return for proof

* fix: remove redundant size check
2024-05-28 18:51:01 +05:30
Aaryamann Challani
834cdbf5bb
chore(deployments): update deployments script (#6) 2024-05-28 17:56:10 +05:30
Aaryamann Challani
4c6b8fb253
chore: tests (#5)
* chore: tests

* fix: add helper to get all metadata from idCommitment

* fix: max runs

* fix: full tree test

* fix: refactor, reuse function for memberExists

* fix: getCommitments range and cut scope from other tests

* fix: range for assert on pagination

* fix: duped conditionals
2024-05-28 15:33:16 +05:30
Aaryamann Challani
6d028a1308
chore: add the initial contract after few optimizations (#4)
* chore: add deps

* fix: fmt in package.json

* chore: add the initial contract after few optimizations

* fix: lint

* chore: more optimizations

* chore: adorno

* fix: test getCommitments too

* chore: add kats

* fix: adorno

* fix: install deps before running build

* ci: add pnpm install before other jobs

* fix: remove magic number

* fix: remove unused errors,events and hardcode depth
2024-05-23 18:33:41 +05:30
Aaryamann Challani
f681c3189e
chore: add deps (#3)
* chore: add deps

* fix: fmt in package.json
2024-05-22 00:04:00 +05:30
Aaryamann Challani
440a1d66ba
chore: create dependabot.yml 2024-05-21 22:20:14 +05:30
Aaryamann Challani
809d7edc11
fix(ci): remove unused jobs (#2)
* fix(ci): remove unused jobs

* fix: remove verify in pr template

* fix: readme fixes
2024-05-21 21:30:07 +05:30
Aaryamann Challani
0e8071f2d3
docs(readme): update and remove template docs (#1) 2024-05-21 21:02:39 +05:30
rymnc
284cc38916 feat: initial commit 2024-05-21 00:46:20 +00:00