Open fulldecent opened 5 years ago
This is what the @Initializable
annotation is for.
@Initializable
allows you to set values only for static variables. Static variables have an extremely narrow use case and and probably none of those use cases overlap with setting the static variables at deploy time.
The only use case of @Initializable
therefore is spells and counterfactuals.
If a class has a method named
deploy
and this method is annotated Callable then it should be called at deploy time.This will remove the need for accessing
Blockchain.getData()
directly, like this:Instead the type safe alternative is:
Benefits:
deploy
match the types in the ABIWork plan
deploy
method and any class has an@Instantiatable
variable