Factory smart contract to make easier and safer usage of the `CREATE` and `CREATE2` EVM opcodes as well as of `CREATE3`-based (i.e. without an initcode factor) contract creations.
This PR adds the tests for all CREATE3 functions in CreateX; namely:
function computeCreate3Address(bytes32,address) pure returns (address)
function computeCreate3Address(bytes32) view returns (address)
function deployCreate3(bytes) payable returns (address)
function deployCreate3(bytes32,bytes) payable returns (address)
function deployCreate3AndInit(bytes32,bytes,bytes,tuple(uint256,uint256)) payable returns (address)
function deployCreate3AndInit(bytes,bytes,tuple(uint256,uint256)) payable returns (address)
function deployCreate3AndInit(bytes32,bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
function deployCreate3AndInit(bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
Further changes include:
Fix a small bug regarding the salt parameter handling in deployCreate3 and deployCreate3AndInit in CreateX;
Add a section in the README about the 100% test coverage as well as add a coverage badge;
Add Scroll Sepolia testnet & mainnet, Base Sepolia, and Optimism Sepolia deployment configurations;
Add CI pipeline for coverage;
Bump hardhat, @nomicfoundation/hardhat-verify, eslint, solhint, @typescript-eslint/eslint-plugin, and @typescript-eslint/parser to the latest version;
Bump submodules;
NOTE: Since I use the latest @nomicfoundation/hardhat-verify version, which supports natively Sourcify verification, we can verify Etherscan, Blockscout (which syncs from Sourcify) and Sourcify in one run:
PR Checklist
[ ] Because this PR includes a bug fix, relevant tests have been included.
🕓 Changelog
This PR adds the tests for all
CREATE3
functions inCreateX
; namely:function computeCreate3Address(bytes32,address) pure returns (address)
function computeCreate3Address(bytes32) view returns (address)
function deployCreate3(bytes) payable returns (address)
function deployCreate3(bytes32,bytes) payable returns (address)
function deployCreate3AndInit(bytes32,bytes,bytes,tuple(uint256,uint256)) payable returns (address)
function deployCreate3AndInit(bytes,bytes,tuple(uint256,uint256)) payable returns (address)
function deployCreate3AndInit(bytes32,bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
function deployCreate3AndInit(bytes,bytes,tuple(uint256,uint256),address) payable returns (address)
Further changes include:
salt
parameter handling indeployCreate3
anddeployCreate3AndInit
inCreateX
;README
about the 100% test coverage as well as add a coverage badge;hardhat
,@nomicfoundation/hardhat-verify
,eslint
,solhint
,@typescript-eslint/eslint-plugin
, and@typescript-eslint/parser
to the latest version;NOTE: Since I use the latest
@nomicfoundation/hardhat-verify
version, which supports natively Sourcify verification, we can verify Etherscan, Blockscout (which syncs from Sourcify) and Sourcify in one run:PR Checklist
🐶 Cute Animal Picture