I have a parent and a child contract.
(1) Why do my parent contract and child have different addresses?
(2) Who is the owner of the child contract? How do I tell?
Is emitting an event the easiest way to get the child address?
await deployer.deploy(myContract);
import "./MyToken.sol";
contract MyContract is ERC721, Ownable {
MyToken private myToken;
constructor() ERC721("MyContract", "MC") {
myToken = new MyToken(address(this));
}
}