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

Audit fixes #41

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 1 addition & 7 deletions contracts/p2pEth2Depositor/P2pOrgUnlimitedEthDepositor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ contract P2pOrgUnlimitedEthDepositor is ERC165, IP2pOrgUnlimitedEthDepositor {
mstore(add(withdrawalCredentials, 32), _eth2WithdrawalCredentials)
}

for (uint256 i = 0; i < validatorCount; ) {
for (uint256 i = 0; i < validatorCount; ++i) {
// pubkey, withdrawal_credentials, signature lengths are already checked inside Beacon DepositContract

i_depositContract.deposit{value: _ethAmountPerValidatorInWei}(
Expand All @@ -316,12 +316,6 @@ contract P2pOrgUnlimitedEthDepositor is ERC165, IP2pOrgUnlimitedEthDepositor {
_signatures[i],
_depositDataRoots[i]
);

// An array can't have a total length
// larger than the max uint256 value.
unchecked {
++i;
}
}

emit P2pOrgUnlimitedEthDepositor__Eth2Deposit(
Expand Down
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
test = 'test/foundry'
cache_path = 'forge-cache'
solc-version = "0.8.24"
evm_version = 'cancun'

Check failure on line 8 in foundry.toml

View workflow job for this annotation

GitHub Actions / Check Spelling

`cancun` is not a recognized word. (unrecognized-spelling)
via_ir = true
optimizer = true
optimizer-runs = 200
Expand Down
Loading