@@ -410,15 +410,13 @@ Annotated examples of EOF formatted containers demonstrating several key feature
410410 let tx_initcode_hash := calldataload(0)
411411 let salt := calldataload(32)
412412
413- mstore8(0, 0xff) // a magic value to ensure a specific preimage space
414- calldatacopy(1, 0, size) // copy tx_initcode_hash, salt and init_data to memory to hash
415- let commitment_size := add(size, 1)
416- let final_salt := keccak256(0, commitment_size)
413+ calldatacopy(0, 0, size) // copy tx_initcode_hash, salt and init_data to memory to hash
414+ let final_salt := keccak256(0, size)
417415
418416 let init_data_size := sub(size, 64)
419- calldatacopy(0, 64, init_data_size)
420417
421- let ret := txcreate(tx_initcode_hash, callvalue(), final_salt, 0, init_data_size)
418+ // reuse init_data which has been already copied to memory above
419+ let ret := txcreate(tx_initcode_hash, callvalue(), final_salt, 64, init_data_size)
422420 if iszero(ret) {
423421 let ret_data_size := returndatasize()
424422 returndatacopy(0, ret_data_size)
0 commit comments