I'm new to Solidity and the whole blockchain environment. Learning it from a course.
I have been assigned a task which is to:
Make a parent contract that has the ability to deploy child contracts.
Can someone please guide or refer me to some resource that can help me? Thanks!
Best Answer
For create a new instance of contract you must to use the word 'new' and the name of the contract like:
With this statement you could use it to create a new child contract in a
function
or in parent contract'sconstructor
. See this example:If you want more details, see here.