-
Notifications
You must be signed in to change notification settings - Fork 11
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
Internal review #3
Closed
Changes from all commits
Commits
Show all changes
94 commits
Select commit
Hold shift + click to select a range
899634c
forge install: forge-std
kasperpawlowski 06dd594
initial commit
kasperpawlowski be8b505
rework
kasperpawlowski 3da999e
feat: first tests
kasperpawlowski 8df9e88
feat: project rename
kasperpawlowski 7b2e4e5
feat: add MockERC20BalanceForwarder
kasperpawlowski b87d458
fix: bugs revealed while testing
kasperpawlowski a6136e4
fix: interface and functions visibility
kasperpawlowski 3ad232d
optimizations + tests
kasperpawlowski a37025f
fix: minor improvements
kasperpawlowski 9547904
feat: improve coverage
kasperpawlowski 0f4b6b8
feat: readme
kasperpawlowski 80ee09a
fix: RewardRegistered event
kasperpawlowski 6645bc5
feat: references
kasperpawlowski 634f0d8
fix: move references
kasperpawlowski 36ea806
fix: readme improvements
kasperpawlowski 09e07c2
fix: docs
kasperpawlowski eee02a6
feat: storage optimizations
kasperpawlowski 94b220c
fix: refactor
kasperpawlowski 8fc1c54
feat: optimizations
kasperpawlowski ebbfbe9
fix: cleanup
kasperpawlowski 31e0365
further optimizations
kasperpawlowski efa627a
feat: update to the recent EVC
kasperpawlowski f5a1d21
chore: update
kasperpawlowski 0612eb5
fix: prevent overflow
kasperpawlowski 2d8bca2
fix: minor optimizations
kasperpawlowski 765666d
fix: as per review remarks
kasperpawlowski ef704b9
A couple more comments and changes
8666d10
More comments
c6661d4
A bit of natspec to point out that rewards must be allocated
1d21751
fix: as per review remarks
kasperpawlowski 379f626
Merge pull request #2 from euler-xyz/review-alberto-2
kasperpawlowski 6f64f04
fix: change uint40 to uint48 for timestamps and epochs, increase opti…
kasperpawlowski 877e2ac
fix remappings, expose EPOCH_DURATION function in the interface
kasperpawlowski b17c2ce
fix: remappings
kasperpawlowski 066ec49
fix: improve tests vm.assume
kasperpawlowski 7781676
chore: add mappings optimizations
kasperpawlowski 8d8c1bc
chore: change name from staking-free to tracking distributor
kasperpawlowski 2719205
fix: improvements as per review comments
kasperpawlowski 7c1d88e
chore: add coverage script
kasperpawlowski 1c9d92d
fix: minor improvement
kasperpawlowski 3aef69f
chore: add more tests
kasperpawlowski 6b197d8
fix: review remarks
kasperpawlowski 65c41a5
Merge pull request #4 from euler-xyz/review-fix
kasperpawlowski 609930c
Review remarks fix
kasperpawlowski 86eee69
Merge pull request #5 from euler-xyz/review-fix
kasperpawlowski 0f4af22
fix: simplify the logic at the gas expense
kasperpawlowski 4376f27
fix: add additional cast
kasperpawlowski 42dd739
fix: reuse the public function for clarity
kasperpawlowski 959e211
simplify reward write logic
hoytech 5bc5fce
fmt
hoytech b9e5dc6
storeAmounts is only used once, inline it
hoytech 0c1e4bc
fix: gas optimizations
kasperpawlowski df7b037
chore: fix solidity version
kasperpawlowski 809c1c0
chore: update dependencies
kasperpawlowski 9d5c628
chore: add tests ci
kasperpawlowski 612ee63
fix: overall cosmetic improvements
kasperpawlowski f3b2da7
Merge pull request #7 from euler-xyz/ci
kasperpawlowski b6ee0e9
fix: phantom test failures
totomanov d00916e
Merge pull request #8 from euler-xyz/fix-test-address-fuzzing
kasperpawlowski 03281e3
fix: add increaseRewardAmounts
kasperpawlowski 9063858
Merge pull request #6 from euler-xyz/review-fix
kasperpawlowski d9d88b4
feat: storage optimization
totomanov 3f681cd
feat: more pointer optimizations
totomanov e7d92fb
docs: natspec
totomanov de419fe
chore: rm commented out line
totomanov f4dd615
feat: unify totalsStorage
totomanov 025d6f6
feat: simplify reward updating
totomanov 34eabbd
feat: pack distribution amounts
totomanov 1f2faaa
feat: optimize reward amounts calculation
totomanov 8b8674c
chore: various nits
totomanov a2e30d5
docs: natspec nits
totomanov 7565b7c
feat: simplify claim
totomanov f874edc
docs: add missing natspec
totomanov 56e50f6
test: improve fuzzing
totomanov 850b76e
optimize: _timeElapsedInEpoch for hot path
totomanov 987367b
add assertion back
totomanov 68ec8e5
revert: assertion in claim
totomanov a0322b0
nit: fix typo
totomanov d31fdce
nit: word order
totomanov a6e1f32
revert: add back assert in claim
totomanov 59d34c3
feat: use `EarnStorage storage` in `calculateRewards`, return `claima…
totomanov 2f30814
fix: overall improvements
kasperpawlowski 595d581
Merge pull request #9 from euler-xyz/feat/storage-optimization
kasperpawlowski 2b24afc
chore: add license file
kasperpawlowski f216a06
Merge pull request #10 from euler-xyz/license
kasperpawlowski 00e46d6
chore: remove .solhint.json
kasperpawlowski fb8f962
Merge pull request #11 from euler-xyz/solhint-remove
kasperpawlowski 8023219
nits: readability improvements
totomanov 5f87550
docs: update natspec
totomanov f9c9d47
nit: IRewardStreams order
totomanov 334083d
Merge pull request #12 from euler-xyz/pre-audit-nits
kasperpawlowski 67b6001
Restore encapsulation of distributions layout, broken by gas optimisa…
hoytech efcee13
Merge pull request #13 from euler-xyz/restore-encapsulation
kasperpawlowski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,73 @@ | ||
name: test | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Foundry project | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: test | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run foundry build | ||
run: | | ||
forge --version | ||
forge build | ||
id: build | ||
|
||
lint-check: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run foundry fmt check | ||
run: | | ||
forge fmt --check | ||
id: fmt | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: lint-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
- name: Run foundry tests | ||
# --ast tests enables inline configs to work https://github.com/foundry-rs/foundry/issues/7310#issuecomment-1978088200 | ||
run: | | ||
forge test -vvv --gas-report --ast | ||
id: test | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
needs: lint-check | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
- name: Run foundry coverage | ||
run: | | ||
FOUNDRY_PROFILE=coverage forge coverage --report summary | ||
id: coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "lib/forge-std"] | ||
path = lib/forge-std | ||
url = https://github.com/foundry-rs/forge-std | ||
[submodule "lib/openzeppelin-contracts"] | ||
path = lib/openzeppelin-contracts | ||
url = https://github.com/openzeppelin/openzeppelin-contracts | ||
[submodule "lib/ethereum-vault-connector"] | ||
path = lib/ethereum-vault-connector | ||
url = https://github.com/euler-xyz/ethereum-vault-connector |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about this in the other repo as well, why do we run coverage in the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haythem set it up this way for the EVK and to be honest I simply copy-pasted the file here. I don't think it's an issue though