Closed jafri closed 2 years ago
There is a constrain in the current code generation, only one contract class in one package is allowed.
To split up a large contract, use inherits:
class A {
@action("action1")
action1(): void
{
}
}
@contract("mycon")
class B extends A {
constructor(
public receiver: Name,
public firstReceiver: Name,
public action: Name) {
super();
}
@action("action2")
action2(): void
{
}
}
It would be useful if you could split up large contracts using the @contract decorator. Not sure how difficult this is
E.g.
a.ts
b.ts
The resulting contract would have both action1 and action2