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

Simple Delegation #34

Merged
merged 106 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
8b8ef36
chore: add voting manager feature for holders
ujenjt Jan 25, 2024
c1fa2f1
chore: Prohibit managers from overwriting holder's votes, retain over…
ujenjt Jan 25, 2024
52a6524
fix: internal function types
katamarinaki Feb 1, 2024
7ed76a8
refactor: rename holder -> voter, manager -> delegate
katamarinaki Feb 1, 2024
740bb2b
refactor: update delegation related naming in tests
katamarinaki Feb 7, 2024
739ae34
refactor: extract vote phase check into separate fn
katamarinaki Feb 1, 2024
7392eb4
refactor: add CastVoteAsDelegate event
katamarinaki Feb 2, 2024
978b4eb
refactor: introduce Delegate struct and use it to simplify DelegatedA…
katamarinaki Feb 7, 2024
e8c7965
feat: add balance check to setDelegate
katamarinaki Feb 7, 2024
baa1a71
refactor: remove reverts from voteForMultiple and _vote, move revert …
katamarinaki Feb 7, 2024
1d98abf
fix: update voterIndex of swapped address during voter deletion
katamarinaki Feb 8, 2024
81a75b7
refactor: remove voterIndex from DelegateSet event
katamarinaki Feb 8, 2024
b040619
refactor: remove MAX_VOTERS_PER_DELEGATE limitation
katamarinaki Feb 8, 2024
337b031
refactor: add offset and count params to getDelegatedVoters
katamarinaki Feb 8, 2024
f98f68d
refactor: remove unused constant
katamarinaki Feb 8, 2024
4d6f150
refactor: add revert if error inside loop in voteForMultiple
katamarinaki Feb 13, 2024
7bf4014
refactor: add getter for delegated voters with their voting power and…
katamarinaki Feb 13, 2024
c3f8577
refactor: optimize delegated voter removal
katamarinaki Feb 13, 2024
5970417
refactor: add max uint96 check for delegated voters array length
katamarinaki Feb 14, 2024
3138944
refactor: remove unused variables from Voting contract
katamarinaki Feb 14, 2024
42bb8f3
refactor: rebuild invariant checks for voteForMultiple, refactor voteFor
katamarinaki Feb 14, 2024
569a600
refactor: update delegation getters and setters
katamarinaki Feb 16, 2024
8bacd24
refactor: remove _castVote argument from _newVote
katamarinaki Feb 16, 2024
d190e19
Merge pull request #4 from katamarinaki/refactor/delegation-remove-ca…
katamarinaki Feb 16, 2024
ae9ce25
feat: add getVoterStateMultiple
katamarinaki Feb 21, 2024
82aaaf4
refactor: rename _isDelegate fn to _isDelegateFor
katamarinaki Feb 21, 2024
2c248f1
feat: add length check to _removeDelegatedAddressFor
katamarinaki Feb 23, 2024
6de0d13
refactor: rename getVoterStateMultiple -> getVotersStateAtVote
katamarinaki Feb 23, 2024
02b11ee
refactor: read vote outside of the loop in getVotersStateAtVote
katamarinaki Feb 26, 2024
8476902
refactor: update contract structure, add functions docs
katamarinaki Feb 28, 2024
74ebc61
Merge pull request #7 from katamarinaki/refactor/delegation-update-st…
katamarinaki Feb 29, 2024
b8b1555
refactor: split DelegateSet into two events - SetDelegate and RemoveD…
katamarinaki Feb 29, 2024
5dd2bd0
refactor: update delegation related naming (#36)
katamarinaki Mar 1, 2024
01765d8
Merge branch 'voting-manager' of github.com:lidofinance/aragon-apps i…
katamarinaki Mar 1, 2024
8580ae7
Merge pull request #39 from katamarinaki/refactor/simple-delegation
katamarinaki Mar 1, 2024
f02be61
style: fix formatting
katamarinaki Mar 1, 2024
4d69635
style: fix errors code style
katamarinaki Mar 4, 2024
82e9a33
style: remove semicolons from errors file
katamarinaki Mar 4, 2024
678626b
refactor: address reviewers rfc
katamarinaki Mar 4, 2024
198e343
refactor: merge _isValidPhaseToVote and _canParticipateInVote functio…
katamarinaki Mar 4, 2024
243abe1
refactor: rename removeDelegate to resetDelegate; move Set/ResetDeleg…
katamarinaki Mar 4, 2024
208702c
refactor: rename _hasVoted to _hasVotedDirectly
katamarinaki Mar 4, 2024
997dd7e
refactor: no revert for `_canVoteFor` in `voteForMultiple`, rename `v…
katamarinaki Mar 4, 2024
08d43e3
fix: audit fixes
rkolpakov Mar 15, 2024
22fe318
fix: remove inconsistent balance check
katamarinaki Mar 22, 2024
e7faa43
feat: add holesky support for deployment
katamarinaki Mar 27, 2024
1096e16
refactor: rename _vote param to vote_
katamarinaki Mar 29, 2024
f2f1eed
refactor: comment out deprecated arguments names
katamarinaki Mar 31, 2024
e3cef8c
docs: add missing natspec comments
katamarinaki Apr 1, 2024
b303031
test: simple delegation tests (#41)
katamarinaki Apr 2, 2024
42f8dc2
test: remove outdated test
katamarinaki Apr 2, 2024
54caa64
test: move out tests for delegation to the diiferent test file & remo…
rkolpakov Apr 16, 2024
94e3276
refactor: rename setDelegate to assign delegate; rename resetDelegate…
katamarinaki Apr 18, 2024
5ef1358
refactor: UINT_96_MAX value
katamarinaki Apr 18, 2024
c4d9e99
chore: fix comments copy
katamarinaki Apr 18, 2024
cda7930
bump hardhat version
katamarinaki Apr 18, 2024
e826ff0
refactor: move removal from delegates map to _removeDelegatedAddressFor
katamarinaki Apr 18, 2024
5edff75
refactor: optimize delegate removal
katamarinaki Apr 18, 2024
c035a74
refactor: rename hasManagedToVote to votedForAtLeastOne
katamarinaki Apr 18, 2024
6c2840a
fix: remove voteExists from attemptVoteFor
katamarinaki Apr 18, 2024
8ec459c
refactor: otimize gas usage of _removeDelegatedAddressFor, remove exc…
katamarinaki Apr 18, 2024
d33e9aa
refactor: remove _isDelegateFor and _hasVotedDirectly, add their logi…
katamarinaki Apr 22, 2024
cd8697b
refactor: split _getDelegatedVotersAt into getDelegatedVoters and _ge…
katamarinaki Apr 22, 2024
5d01f37
refactor: move balanceOfAt call up to `vote` and `attemptVoteForMulti…
katamarinaki Apr 22, 2024
9cbaf2a
test: add gas benchmark tests
katamarinaki Apr 22, 2024
32a3dd2
refactor: move `CastVoteAsDelegate` to `attemptVoteForMultiple`
katamarinaki Apr 22, 2024
8c6dcec
test: reorder gas tests
katamarinaki Apr 22, 2024
20ba1ea
test: fix `CastVoteAsDelegate` checks
katamarinaki Apr 23, 2024
845a5dd
refactor: remove `votedFor` param from `CastVoteAsDelegate`; rename `…
katamarinaki Apr 24, 2024
9076462
docs: add comment with explanation of delegates voting checks usage
katamarinaki Apr 24, 2024
d8f882a
test: improve test coverage
katamarinaki Apr 30, 2024
3a0bbba
refactor: imroved naming and minor optimization
katamarinaki Apr 30, 2024
c9b26ec
refactor: check voter state in _vote earlier to optimize the gas
katamarinaki Apr 30, 2024
9b7af85
refactor: move local variables declaration to the loop since it doesn…
katamarinaki Apr 30, 2024
eeee19f
refactor: remove excessive requires from getDelegatedVoters
katamarinaki Apr 30, 2024
f1f6de1
fix: additional comments and small tweaks after review
katamarinaki May 7, 2024
e91d1a2
refactor: add _votePhase arg to _vote fn
katamarinaki May 7, 2024
86fd9f8
docs: fix comments and natspec
katamarinaki May 20, 2024
38d56a2
docs: update comments
katamarinaki May 22, 2024
6b12964
refactor: after-review fixes
katamarinaki May 24, 2024
070e8f3
docs: fix comment style
katamarinaki Jun 18, 2024
8c40de1
fix: getDelegatedVoters condition optimization
katamarinaki Jun 18, 2024
5f86b98
refactor: rename getVoterStateMultiple to getVoterStateMultipleAtVote
katamarinaki Jun 18, 2024
53b327c
docs: add dev comment to attemptVoteForMultiple
katamarinaki Jun 18, 2024
19f14bc
docs: update comments and docs
katamarinaki Jun 25, 2024
456cb54
fix: move snapshotBlock getter out of the loop
katamarinaki Jun 25, 2024
375573c
refactor: replace _isVoteOpen with a comprehensive version of _getVot…
katamarinaki Jun 25, 2024
f1283de
docs: add VoterState values descriptions
katamarinaki Jun 25, 2024
079dd88
docs: fix comment
katamarinaki Jun 25, 2024
feb1515
test: rework delegation tests
katamarinaki Jul 3, 2024
714d7c8
fix: remove unused function
katamarinaki Jul 4, 2024
30c8ccb
fix: remove unreachable code
katamarinaki Jul 4, 2024
3680b5a
fix: declare _voters.length before loop
katamarinaki Jul 4, 2024
50d9802
docs: fix natspec format
katamarinaki Jul 4, 2024
c112cc2
docs: update canVote comment
katamarinaki Jul 11, 2024
6a431b6
Merge pull request #44 from lidofinance/refactor/simple-delegation
katamarinaki Oct 16, 2024
0ec288b
fix: revert yarn.lock changes
katamarinaki Oct 16, 2024
8892e18
ci: fix `verify-bytecode` workflow (#47)
katamarinaki Oct 16, 2024
c88466e
fix: update node in verify-bytecode action
katamarinaki Dec 17, 2024
8b81180
Merge pull request #48 from lidofinance/fix/verify-bytecode-ci
katamarinaki Dec 17, 2024
c54aea4
fix: add cache clean step to verify-bytecode action
katamarinaki Dec 17, 2024
6357536
fix: ci
katamarinaki Dec 17, 2024
481f892
fix: revert verify-bytecode action code
katamarinaki Dec 17, 2024
2a6c852
fix: ci
katamarinaki Dec 17, 2024
3cd99c0
fix: artifacts
katamarinaki Dec 17, 2024
a059505
fix: artifacts
katamarinaki Dec 17, 2024
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
Loading
Loading