2

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?

2

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.

2
  • Does this mean that many contracts can be created from a single contract? Sep 13 '18 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 '18 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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