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

🔧 Add CREATE2 and statefulFuzz Tests #17

Merged
merged 33 commits into from
Oct 25, 2023
Merged

🔧 Add CREATE2 and statefulFuzz Tests #17

merged 33 commits into from
Oct 25, 2023

Conversation

pcaversaccio
Copy link
Owner

@pcaversaccio pcaversaccio commented Oct 7, 2023

🕓 Changelog

This PR adds the tests for all CREATE2 functions in CreateX; namely:

  • function deployCreate2(bytes32,bytes) payable returns (address)
  • function deployCreate2(bytes) payable returns (address)
  • function deployCreate2AndInit(bytes32,bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
  • function deployCreate2AndInit(bytes,bytes,tuple(uint256,uint256)) payable returns (address)
  • function deployCreate2AndInit(bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
  • function deployCreate2AndInit(bytes32,bytes,bytes,tuple(uint256,uint256)) payable returns (address)
  • function deployCreate2Clone(bytes32,address,bytes) payable returns (address)
  • function deployCreate2Clone(address,bytes) payable returns (address)
  • function computeCreate2Address(bytes32,bytes32) view returns (address)
  • function computeCreate2Address(bytes32,bytes32,address) pure returns (address)

Further changes include:

  • Add one statefulFuzz test;
  • Fix a small bug in computeCreate2Address in CreateX;
  • Add _guard to deployCreate2Clone in CreateX;
  • Use consistently named arguments in CreateX;
  • Use string numbers for assert statements (closes ♻️ Use String Numbers for assert Statements #15);
  • Bump @typechain/ethers-v6, @typechain/hardhat, ethers, hardhat, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser;
  • Adjust .github/workflows/checks.yml by removing the whitelisted links since the repository is now public;
  • Create dedicated subfolders for CREATE and CREATE2 tests (later CREATE3 as well);
  • Combine vm.assume for simplicity in CreateX._generateSalt.t.sol;

PR Checklist

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed in an issue or in the discussions section. (See 📋 Unit and Fuzzing Tests #10.)
  • I didn't do anything of this.

🐶 Cute Animal Picture

image

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio added the feature 💥 New feature or request label Oct 7, 2023
@pcaversaccio pcaversaccio added this to the 1.0.0 milestone Oct 7, 2023
@pcaversaccio pcaversaccio self-assigned this Oct 7, 2023
@pcaversaccio pcaversaccio mentioned this pull request Oct 7, 2023
32 tasks
@pcaversaccio pcaversaccio added the bug 🐛 Something isn't working label Oct 7, 2023
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio marked this pull request as ready for review October 9, 2023 21:02
@pcaversaccio pcaversaccio requested a review from mds1 October 9, 2023 21:03
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio added the dependencies 🔁 Pull requests that update a dependency file label Oct 10, 2023
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio changed the title 🔧 Add CREATE2 Tests 🔧 Add CREATE2 and statefulFuzz Tests Oct 10, 2023
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio mentioned this pull request Oct 24, 2023
3 tasks
@pcaversaccio pcaversaccio merged commit 7864812 into main Oct 25, 2023
8 checks passed
@pcaversaccio pcaversaccio deleted the create2-tests branch October 25, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working dependencies 🔁 Pull requests that update a dependency file feature 💥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

♻️ Use String Numbers for assert Statements
1 participant