Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract X {}
- contract XFactory {
- function createX() returns (X) {
- return new X();
- }
- }
- contract Main {
- XFactory xFactory;
- ...
- Main(XFactory _xFactory) {
- xFactory = _xFactory;
- }
- ...
- function someMethod() {
- X x = xFactory.create();
- }
- ...
- }
Add Comment
Please, Sign In to add comment