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

Feature/withdrawals PoC #446

Closed
wants to merge 127 commits into from
Closed
Show file tree
Hide file tree
Changes from 110 commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
8bb5de8
chore: add .editorconfig
folkyatina Aug 22, 2022
5d0c1f1
feat: bootstrap a simple TDD loop
folkyatina Aug 23, 2022
e28991f
feat: mint a wannabe-NFT when enqueue
folkyatina Aug 24, 2022
c42deee
chore: abi
folkyatina Aug 24, 2022
d92c55c
feat: add another bunch of functions
folkyatina Aug 24, 2022
50753ea
feat: add ether transfer after burn
folkyatina Aug 25, 2022
6f7a2c5
feat: withdrawals to be used from Lido contract
folkyatina Aug 30, 2022
7932cc2
feat: Some intermediate PoC code
folkyatina Sep 15, 2022
518a999
feat: radically simplify withdrawal queue
folkyatina Sep 30, 2022
46b9f94
feat: don't finalize if not enough ether
folkyatina Oct 3, 2022
a03c8de
fix: don't finalize if not enogh ether
folkyatina Oct 3, 2022
271ae4b
feat: simple discount for withdrawals
folkyatina Oct 4, 2022
48d82b0
feat: a bit more of comments
folkyatina Oct 4, 2022
700a297
fix: remove enumeration from withdrawals
folkyatina Oct 5, 2022
cc80ca1
fix: test run
folkyatina Oct 5, 2022
dce6530
feat: Add withdrawal events
folkyatina Oct 6, 2022
d9e3efe
fix: finalization ignoring passed id
folkyatina Oct 6, 2022
e5473b7
feat: simplify naming in queue
folkyatina Oct 11, 2022
9033a3e
feat: new TVL calculations
folkyatina Oct 13, 2022
b06644f
fix: fix reentrancy issue
folkyatina Oct 13, 2022
b02ce05
feat: change Request struct to respect the spec
folkyatina Oct 17, 2022
00441fc
feat: unlooped withdrawals (WIP)
folkyatina Oct 21, 2022
8b5fcfb
feat: unlooped withdrawals 2 (WIP)
folkyatina Oct 27, 2022
a2bed40
feat: Fix withdrawals queue tests
folkyatina Oct 31, 2022
8678584
test: lido tests restore
folkyatina Oct 31, 2022
e3fc672
test: fix lidoHandleOracleReport tests
folkyatina Oct 31, 2022
a567566
test: fix other tests
folkyatina Oct 31, 2022
ea6d090
feat: initial draft version of ValidatorExitBus with rate limit
arwer13 Nov 2, 2022
98a2488
refactor(RateLimitUtils): cleaning up
arwer13 Nov 3, 2022
782623b
fix: counter underflow in reverse for loop
folkyatina Nov 3, 2022
059c97a
fix: skipped visibility in interface
folkyatina Nov 3, 2022
6cf6b59
feat: add restake from withdrawal queue
folkyatina Nov 3, 2022
658f7e0
feature(ValidatorExitBus): forbid to report empty keys list
arwer13 Nov 4, 2022
dfed600
feature(oracle): initial version of python oracle logic draft
arwer13 Nov 4, 2022
cfe28f9
chore: internalize OZ util methods
folkyatina Nov 4, 2022
6346fc8
oracle-logic: refactor and add TODOs
arwer13 Nov 8, 2022
46bc202
feat(ValidatorExitBus): report epochId and skip non-first reports
arwer13 Nov 15, 2022
56e145b
feat(LidoOracle reportBeacon): handle withdrawal-related numbers
arwer13 Nov 16, 2022
2b53a5c
feat: add price chain to oracle reports
folkyatina Nov 17, 2022
0d6c20c
fix: remove _wcBuffer from TVL
folkyatina Nov 17, 2022
07d8a82
feat: align withdrawalRequestStatus to the spec
folkyatina Nov 17, 2022
63dd0af
feat: add BufferWithdrawalsReserve handle
folkyatina Nov 17, 2022
955ddf1
Merge branch 'feature/withdrawals-poc' of github.com:lidofinance/lido…
arwer13 Nov 23, 2022
31fd19b
intermediate: partially separate committee quorum from LidoOracle
arwer13 Nov 24, 2022
d2e34ca
add initial version of new LidoOracle, prune old LidoOracle
arwer13 Nov 28, 2022
7fbd6e2
chore: add _ to distributeFee
folkyatina Nov 23, 2022
c4b6ac6
fix: add auth to setBufferWithdrawalsReserve
folkyatina Nov 23, 2022
fd476aa
feat: rewards after withdrawal
folkyatina Nov 29, 2022
89219a4
chore: a bit of formatting for interfaces
folkyatina Nov 29, 2022
c31e5b6
chore: add proper prettier config for solidity
folkyatina Nov 29, 2022
acb8c77
fix: make claim work as expected
folkyatina Nov 29, 2022
76f91f8
Merge branch 'feature/withdrawals-poc' of github.com:lidofinance/lido…
arwer13 Nov 30, 2022
aeb6f2c
restore initial LidoOracle version (with old reportBeacon())
arwer13 Nov 30, 2022
3f58133
clean up LidoOracleNew.sol code and spaces in Lido.sol
arwer13 Dec 1, 2022
c535879
tests(lidooraclenew): fix to work with new contract version
arwer13 Dec 1, 2022
7b229cd
add setOwner to LidoOracleNew
arwer13 Dec 1, 2022
dffcac7
test(lidooraclenew): cleaning up
arwer13 Dec 1, 2022
acce873
refactor lib AragonUnstructuredStorage
arwer13 Dec 1, 2022
06f8915
restore ERC165Checker in LidoOracleNew
arwer13 Dec 1, 2022
f08bb86
feature(LidoOracleNew): plug OpenZeppelin AccessControlEnumerable
arwer13 Dec 1, 2022
ae85728
feature(LidoOracleNew): accept exitedValidatorsNumbers as uint64
arwer13 Dec 1, 2022
8023a4d
tests(new_rewards): handle rounding error
folkyatina Dec 4, 2022
1cd32e3
LidoOracleNew: fix setQuorum logic
arwer13 Dec 5, 2022
99d1844
Merge branch 'feature/parallel_tests' into feature/withdrawals-poc
folkyatina Dec 5, 2022
4967dbd
add yarn command to run tests sequentially
arwer13 Dec 6, 2022
74a9aaa
ValidatorExitBus: fixes and refactoring
arwer13 Dec 6, 2022
6be8ae2
delete temporary oracle-logic.py
arwer13 Dec 6, 2022
b980ccb
Merge branch 'feature/withdrawals-poc' into feature/validator-exit-bus
arwer13 Dec 6, 2022
dbc906f
Merge pull request #453 from lidofinance/feature/validator-exit-bus
arwer13 Dec 6, 2022
21d2be7
remove forgotten ".only" marks in tests
arwer13 Dec 6, 2022
adfbf15
massive rework of ValidatorExitBus and LidoOracleNew
arwer13 Dec 8, 2022
53f095d
update ethers library to 5.1.4
arwer13 Dec 8, 2022
a5d0e91
ValidatorExitBus: accept staking module address instead of id
arwer13 Dec 8, 2022
4ef112d
LidoOracleNew and ValidatorExitBus: use solidity custom errors
arwer13 Dec 11, 2022
b61f4ed
fix running all tests: mark as skipped a few ValidatorExitBus tests
arwer13 Dec 13, 2022
d7e0898
test(withdrawal): add some basic tests
folkyatina Dec 12, 2022
e708cc0
feat: remove totalExitedValidators from report
folkyatina Dec 13, 2022
542ad5c
feat: old-style reward calculation
folkyatina Dec 13, 2022
ee78e89
fix: withdrawal tests
folkyatina Dec 13, 2022
0717cf7
chore: add mocharc to run tests from vscode
folkyatina Dec 13, 2022
db7addf
fix: fix compiler version for UnstructuredStorage
folkyatina Dec 14, 2022
f8e01d1
fix: update solhint to support custom errors
folkyatina Dec 14, 2022
28cfe0d
chore: fix some linting errors
folkyatina Dec 14, 2022
9ca2069
chore: add pre-commit hook generating ABIs
folkyatina Dec 14, 2022
547a71a
fix: minor fixes
folkyatina Dec 14, 2022
af66c40
chore: remove solium
folkyatina Dec 14, 2022
f3ab760
chore: run linter before commit
folkyatina Dec 14, 2022
100b11f
chore: fix last linter warnings
folkyatina Dec 14, 2022
3111cec
LidoOracleNew: unify committee event names
arwer13 Dec 13, 2022
f2859b1
LidoOracleNew, ValidatorExitBus: add testnet admin functions
arwer13 Dec 14, 2022
8b79da8
ValidatorExitBus: add validatorId field to report
arwer13 Dec 14, 2022
b754242
ValidatorExitBus: store last requested validator id
arwer13 Dec 14, 2022
d4b8458
LidoOracleNew: rename reportBeacon to handleCommitteeMemberReport
arwer13 Dec 14, 2022
b4e4475
fix: rename finalizedQueueLength
folkyatina Dec 14, 2022
0b5cc98
WithdrawalQueue: optimize gas cost
folkyatina Dec 14, 2022
f8c4927
fix: forgotten abi
folkyatina Dec 14, 2022
928170a
chore: add hook for lint:js:fix
folkyatina Dec 14, 2022
c8bbfc0
LidoOracleNew report struct: replace staking module ids by addresses
arwer13 Dec 15, 2022
9e31366
fix: typos and spaces
arwer13 Dec 15, 2022
e137b5c
LidoOracleNew: add testnet helper function
arwer13 Dec 15, 2022
20e5396
refactor (LidoOracleNew, ValidatorExitBus)
arwer13 Dec 15, 2022
45a2a3a
fix formatting
arwer13 Dec 17, 2022
3b4e817
add clarifications regarding layout of structured storage
arwer13 Dec 22, 2022
901df0a
WithdrawalQueue: merge features from WithdrawalQueue V0
arwer13 Dec 23, 2022
f171e0e
Lido contract: get rid of Pausable modifiers to reduce contract size
arwer13 Dec 28, 2022
ceb203d
Lido: temporarily remove some code to fit to contract size limit
arwer13 Dec 28, 2022
b8de0d0
feat: remove some funcs shrinking Lido bytecode sz
TheDZhon Dec 28, 2022
0350274
Merge branch 'feature/size-reduce-proposals' into feature/withdrawals…
arwer13 Dec 28, 2022
ef007af
WithdrawalQueue: more consistent formatting
folkyatina Jan 3, 2023
ef043d0
fix: forgotten abi
folkyatina Jan 4, 2023
c0d59e8
test: fix tests after Lido contract shrunk
folkyatina Jan 4, 2023
c62ad4a
feat: remove restake counter
folkyatina Jan 4, 2023
8534ab5
test: reenable some tests
folkyatina Jan 4, 2023
040a3ed
fix: missed plus when updating lockedEther
folkyatina Jan 5, 2023
fba5840
add a few comments and tiny refactoring
arwer13 Jan 6, 2023
b15c8c1
Merge branch 'develop' into feature/withdrawals-poc
arwer13 Jan 8, 2023
e2a0e86
fix: remove too eager sanity check in WQ
folkyatina Jan 8, 2023
aed8597
feat: migtate to 1e27 share rate fomat
folkyatina Jan 8, 2023
fc18412
chore: electron for vscode-hardhat-solidity to work
folkyatina Jan 8, 2023
6dad351
feat: split WithdrawalQueue vault and queue
folkyatina Jan 8, 2023
be443de
chore: get rid of ILido interface
folkyatina Jan 8, 2023
c16a769
fix: fix getWithdrawalRequestStatus
folkyatina Jan 8, 2023
5fdf4df
chore: formatting and abi
folkyatina Jan 8, 2023
5b36d6a
fix: fix naming and cosmetics
folkyatina Jan 8, 2023
e5f13d2
fix: change MIN and MAX withdrawal amounts
folkyatina Jan 8, 2023
515297a
feat: add possibility to change recepient
folkyatina Jan 8, 2023
8ea2f32
chore: uncomment transferToVault
folkyatina Jan 9, 2023
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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4

[*.js]
indent_size = 2
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
run: yarn test:unit

- name: Run Solidity linters
run: yarn lint:sol:solhint
run: yarn lint:sol

- name: Run JS linters
run: yarn lint:js
Expand Down
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn compile
yarn lint:sol
yarn lint:js:fix
4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"require": "hardhat/register",
"timeout": 40000
}
14 changes: 13 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,17 @@
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"printWidth": 140
"printWidth": 140,
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
}
}
]
}
5 changes: 4 additions & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"reason-string": "off",
"no-empty-blocks": "off",
"func-name-mixedcase": "off",
"lido/fixed-compiler-version": "error"
"lido/fixed-compiler-version": "error",
"visibility-modifier-order": "error",
"no-unused-vars": "error",
"func-visibility": ["warn",{"ignoreConstructors":true}]
}
}
File renamed without changes.
41 changes: 0 additions & 41 deletions .soliumrc.json

This file was deleted.

Loading