While browsing traces generated by parity I encountered an interesting case:
0xfec94608dea1f3609e4a93e56e01477d8a86de46 has been created twice.
First time, in the transaction:
0xc0d8d11c5da64e025ac0bb0cc286ede65c2a0b7afeeb455f04d6479cc98edb7a. The transaction failed with
Out of gas but the contract was successfuly created.
Second time, the same contract with the same code has been created in transaction:
From what I understand the contract got the same address because it was created within another contract. The contract address is generated from the creator contract address and its nonce. Since the previous creator contract transaction ended up with
Out of gas the nonce was not increased and thus the same contract address.
What really happened? Was the contract really created in the first transaction? Shouldn't it be reverted? Does
Etherscan show it correctly? What would happen if in the second transaction the contract is generated with a different code?
EDIT: I reported the issue to the Parity GitHub issues