I try something like this:
Child.sol
pragma solidity ^0.4.6;
contract Child {
address owner;
function Child() {
owner = msg.sender;
}
}
Parent.sol
pragma solidity ^0.4.6;
import "./Child.sol"
contract Parent {
address owner;
function Parent(){
owner = msg.sender;
}
function createChild() {
Child child = new Child()
}
}
Then I deploy Parent.sol. I can find this transaction on etherscan. Then I call createChild() function, but the contract is not deploying, because I can't find any new transactions.
So the question is, how should I do it right. Thank you.
Or should I just archive all adresses of the Child contracts in Parent contract? Then Parent contract can be really heavy.