Missing execution success when using create during token deployment
When using new L1Token(), it checks that the deployment was successful. The address returned from create can indeed be address(0), and in this case it means that the deployment failed (i.e. example L1Token may revert during the constructor). Although L1Token is a normal ERC20 token, the TokenFactory::deployToken uses a contractBytecode as a function param, to deploy the contract. If this bytecode is not correctly encoded, this can lead to a failed deployment.
Medium risk. Owner can assume TokenFactory::deployToken was comleted, but token creation did not succeed, creating weird behavior in this contract.
Manual Review
Add a check after token deployment to make sure addr is not address(0), and revert if it does. Alternatively, remove assembly entirely and deploy tokens using the new L1Token() syntax:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.