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

Update L1OpUSDCFactory.sol #187

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions src/contracts/L1OpUSDCFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ contract L1OpUSDCFactory is IL1OpUSDCFactory {
// Construct this function on the L2 factory contract
if (bytes4(_l2Deployments.usdcInitTxs[0]) == _INITIALIZE_SELECTOR) revert IL1OpUSDCFactory_NoInitializeTx();

//This ensures _chainName is non-empty and its length is within a reasonable range.
if (bytes(_chainName).length == 0) revert InvalidChainName("Chain name cannot be empty");
if (bytes(_chainName).length > 100) revert InvalidChainName("Chain name is too long");


// Update the salt counter so the L2 factory is deployed with a different salt to a different address and get it
uint256 _currentNonce = deploymentsSaltCounter += 2;

Expand Down