April 2017
Intermediate to advanced
266 pages
7h 4m
English
A contract can create a new contract using the new keyword. The complete code of the contract being created has to be known.
Here is an example to demonstrate this:
contract sample1 { int a; function assign(int b) { a = b; } } contract sample2{ function sample2() { sample1 s = new sample1(); s.assign(12); } }
Read now
Unlock full access