I saw an example about this, while was searching it on the internet.

I want to deploy a new contract which is ProjectContract. However, I could not get contract address as below. I think this is for old version.

address newProjectAddress = new ProjectContract(name, description, requiredPrice, msg.sender);

And the error message is: This the error message

How can I do that for the new versions?

1 Answer 1


As the message says, the you cant convert a contract to address implicitly. You can, however, convert the them explicitly.

address newProjectAddress = address(new ProjectContract(...));

The type returned by new ProjectContract(...) is ProjectContract and not address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.