-
Notifications
You must be signed in to change notification settings - Fork 32
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
Revert "Replace Create3 with ZeframLou/create3-factory" #1388
Conversation
This reverts commit 616c5ab.
WalkthroughThis pull request introduces a new contract Changes
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 1
Files selected for processing (7)
- .gitmodules (1 hunks)
- packages/contracts-core/contracts/create3/CREATE3Factory.sol (1 hunks)
- packages/contracts-core/contracts/create3/ICREATE3Factory.sol (1 hunks)
- packages/contracts-core/lib/solmate (1 hunks)
- packages/contracts-core/remappings.txt (1 hunks)
- packages/contracts-core/script/DeployCREATE3.sol (1 hunks)
- packages/contracts-core/script/utils/DeployerUtils.sol (1 hunks)
Files skipped from review due to trivial changes (4)
- .gitmodules
- packages/contracts-core/lib/solmate
- packages/contracts-core/remappings.txt
- packages/contracts-core/script/utils/DeployerUtils.sol
Additional comments (Suppressed): 4
packages/contracts-core/script/DeployCREATE3.sol (2)
13-13: The contract name has been changed from
DeployCREATE3Factory
toDeployCREATE3
. Ensure that all references to this contract throughout the codebase have been updated to match the new name.10-10: The import path for
CREATE3Factory
has been changed. Please verify if the new path is correct and the contract is accessible at this location.packages/contracts-core/contracts/create3/CREATE3Factory.sol (2)
14-18: The
deploy
function is correctly overriding the interface method and using theCREATE3
library to deploy contracts. However, it's important to ensure that thecreationCode
passed to this function is valid and will result in a successful contract deployment. If thecreationCode
is invalid, theCREATE3.deploy
call will fail and revert the transaction.21-25: Similar to the
deploy
function, thegetDeployed
function is also correctly overriding the interface method and using theCREATE3
library to predict the address of a deployed contract. Again, ensure that thesalt
anddeployer
parameters are valid and correspond to an actual deployed contract. If they don't, theCREATE3.getDeployed
call will return an incorrect address.
// SPDX-License-Identifier: AGPL-3.0 | ||
pragma solidity >=0.6.0; | ||
|
||
/// @title Factory for deploying contracts to deterministic addresses via CREATE3 | ||
/// @author zefram.eth | ||
/// @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has | ||
/// its own namespace for deployed addresses. | ||
interface ICREATE3Factory { | ||
/// @notice Deploys a contract using CREATE3 | ||
/// @dev The provided salt is hashed together with msg.sender to generate the final salt | ||
/// @param salt The deployer-specific salt for determining the deployed contract's address | ||
/// @param creationCode The creation code of the contract to deploy | ||
/// @return deployed The address of the deployed contract | ||
function deploy(bytes32 salt, bytes memory creationCode) external payable returns (address deployed); | ||
|
||
/// @notice Predicts the address of a deployed contract | ||
/// @dev The provided salt is hashed together with the deployer address to generate the final salt | ||
/// @param deployer The deployer account that will call deploy() | ||
/// @param salt The deployer-specific salt for determining the deployed contract's address | ||
/// @return deployed The address of the contract that will be deployed | ||
function getDeployed(address deployer, bytes32 salt) external view returns (address deployed); | ||
} |
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.
The interface ICREATE3Factory
is well defined with clear function signatures for deploy
and getDeployed
. The comments provide a good understanding of what each function does. However, it would be beneficial to include more information about the parameters, especially creationCode
in the deploy
function. What format should this code be in? Is there any specific requirement or limitation that the user should be aware of?
* docker first pass * fix omnirpc port default behavior * Docker-compose updates * add guide for adding new go modules * typo fix * indentation fix * kink fix * remove vanity * devnet fix * backup for max attempt change * hi * make retry defaults more sensible * lint fix * Revert "hi" This reverts commit 60dd2b7. * test * omnirpc chains endpoint * close response handle * actually close response * more fixes * wip * forge install: solmate * newmates * create3 * create3factory * custom config path * Revert "custom config path" This reverts commit 47ee5f9. * deploy config defaults * Revert "deploy config defaults" This reverts commit 969a6cd. * devnet check * basic updates * factory fixes * cleanup * devnet up/down * first pass * guard it up * guard * 1 notary * more updates * fix wrong domain in deploy script * diff fix * comment fix * agent proof updates * synapse domain fix * generic linter fix * get guard to boot [goreleaser] * more yaml lint * some nice debugging tools * generic linter fix * finish devnet * fix lint commandS * d * wrap up rudimentary devneT * create3 * deployer/create fix * fix ubuntu * lowercase non-constants * icreate3 import * Revert "icreate3 import" This reverts commit bcb2522. * move to internal * another internal change * update installs on dev containers for easier debugging * Update packages/contracts-core/README.md Co-authored-by: χ² <[email protected]> * address #1381 (comment) * Replace Create3 with ZeframLou/create3-factory (#1387) * create3 * forge install: create3-factory * replace create3 w/ external module * fix naming issues * create3 factory re-addition to address #1387 (comment) --------- Co-authored-by: Trajan0x <[email protected]> * Revert "Replace Create3 with ZeframLou/create3-factory (#1387)" (#1388) This reverts commit 616c5ab. * Replace Create3 with ZeframLou/create3-factory This reverts commit 6b100fd. * fix package issue --------- Co-authored-by: Trajan0x <[email protected]> Co-authored-by: χ² <[email protected]> Co-authored-by: Daniel Wasserman <[email protected]>
Reverts #1387
Undoing this for now, when I checked manually to see if #1387 broke anything, I was on the wrong branch
Summary by CodeRabbit
New Features:
CREATE3Factory
contract for deploying contracts to deterministic addresses using theCREATE3
library.ICREATE3Factory
interface that outlines the structure for deploying and retrieving contracts withCREATE3Factory
.DeployCREATE3
script to utilize the newCREATE3Factory
contract.Chore:
solmate
library.forge-std
andds-test
libraries inremappings.txt
.CREATE3Factory
in various scripts.