While browsing traces generated by parity I encountered an interesting case:
Contract 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: 0x9c3ef34611bd24e254b2b6f339e2f196a57042e8261c069af944248d982c67b4
.
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
Namebazaar contract creator
. Source available here: github.com/district0x/name-bazaar/tree/master/resources/public/…