I need to deploy a contract within Solidity while also sending Ether to it.
To deploy a contract I do
contract NewContract {
constructor() public payable {
// I need to receive Ether here
}
}
contract Deployer {
function deploy() {
address nc = new NewContract();
}
}
How can I also send some Ether while deploying? In the same transaction?