Guest User

Untitled

a guest
Oct 23rd, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. contract X {}
  2.  
  3. contract XFactory {
  4. function createX() returns (X) {
  5. return new X();
  6. }
  7. }
  8.  
  9. contract Main {
  10. XFactory xFactory;
  11. ...
  12. Main(XFactory _xFactory) {
  13. xFactory = _xFactory;
  14. }
  15. ...
  16. function someMethod() {
  17. X x = xFactory.create();
  18. }
  19. ...
  20. }
Add Comment
Please, Sign In to add comment