Looking for help with a successful transaction not showing the details on etherescan.
Having a deployed factory contract like so (simplified):
contract EntityFactory {
event EntityCreated(address entity);
function createEntity (string _hash) public returns (Entity entity) {
Entity ent = new Entity(_hash);
EntityCreated(ent);
return ent;
}
}
contract Entity {
string private hash;
function Entity (string _hash) public {
hash = _hash;
}
function getHash() public returns(string) {
return hash;
}
}
I called EntityFactory.createEntity(...)
successfully and the transaction got mined etc
On etherscan I see the transaction of calling EntityFactory.createEntity(...)
as well as the emitted events. In the linked event log it is the second event. The first piece of data of the event is the address for the created Entity
.
However, the address of Entity
can't be found on etherscan. When I take the same address and use truffle console to call Entity.at('<address>')
the correct data is found and I can interact with the Entity
at that address.
My understanding is that the EntityFactory
would have created a new contract by calling new
and that Contract should also be visible on etherscan.
Where am I thinking wrong about this?
Is there a way to see the resulting contract that came from the call to EntityFactory.createEntity(...)
somewhere on etherescan?