I got a constructor like this:
contract Test{
constructor(uint256 _num) public {
num = _num
;}
}
Now I want to use this contract in another contract. Like this:
contract Call{
Test test;
function addTest(address addr){
test = Test(addr)
}
}
How can I pass the Argument _num to the constuctor?
Best Answer
You can pass the argument _num to the constructor as follows:
Please go through Creating contracts via new keyword
The above link will help you in understanding things better.