Can an object of the class 'contract' or a class that inherits 'contract' be created in the cpp file of the contract we are making?

1 Answer 1


Yes it can. You can then use it as a normal C++ class. If you use a function that changes persistent memory then it will also change it in the current instantiation of the contract.

  • Does this mean that many contracts can be created from a single contract? Sep 13, 2018 at 14:16
  • I'm not sure, maybe! I'll try it when I have a little more time and let you know unless someone beats me to it Sep 13, 2018 at 14:18

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.