Skip to content

Commit

Permalink
Merge pull request #41 from sanbir/eip-7251-audit-fixes
Browse files Browse the repository at this point in the history
Audit fixes
  • Loading branch information
sanbir authored Jun 27, 2024
2 parents a0e88fa + 7676790 commit 6db547f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
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 @@ libs = ['node_modules', 'lib']
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

1 comment on commit 6db547f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (1)

cancun

Previously acknowledged words that are now absent aae aaf ada adaefbe aecded aefb afdcab afe Bbbd bfbe BFF cafec cbb cdd cfe dcc dcdd dda DEAE debd deca ded ecca EFBA fca fccdea Fcd fdf fea fffebe hex'a hex'adfdd hex'b 🫥
To accept these unrecognized words as correct and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:p2p-org/eth-staking-fee-distributor-contracts.git repository
on the master branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/p2p-org/eth-staking-fee-distributor-contracts/actions/runs/9703196990/attempts/1'
Available 📚 dictionaries could cover words (expected and unrecognized) not in the 📘 dictionary

This includes both expected items (76) from .github/actions/spelling/expect.txt and unrecognized words (1)

Dictionary Entries Covers Uniquely
cspell:software-terms/dict/softwareTerms.txt 1288 2 1
cspell:cryptocurrencies/cryptocurrencies.txt 125 1 1
cspell:mnemonics/src/mnemonics.txt 800 1 1
cspell:python/src/python/python-lib.txt 2417 1 1
cspell:filetypes/filetypes.txt 264 1

Consider adding them (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@main in its with:

      with:
        extra_dictionaries:
          cspell:software-terms/dict/softwareTerms.txt
          cspell:cryptocurrencies/cryptocurrencies.txt
          cspell:mnemonics/src/mnemonics.txt
          cspell:python/src/python/python-lib.txt
          cspell:filetypes/filetypes.txt

To stop checking additional dictionaries, add (in .github/workflows/spelling.yml) for uses: check-spelling/check-spelling@main in its with:

check_extra_dictionaries: ''
If the flagged items are false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Please sign in to comment.