Etherlink: forbid invalid contract creation
From the info @thomas.pecseli left:
Check code after contract create, but before writing code to storage and returning success. Only some bytes are allowed as first byte for the new contract. Also - zero length contracts are not allowed.
Ref:
- Contract execution code cannot start with
0xef
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-3541.md - No ref indicating that contract cannot be empty. After testing on sepolia, it seems it is actually not forbidden: https://sepolia.etherscan.io/address/0xa49b4ca8b2467adcb081ed00dbd708b071437fcc#code
Edited by Pierre-Emmanuel CORNILLEAU