Open fulldecent opened 5 years ago
This fix will probably require changing
static {
}
Into
public static void deploy(ACTUAL PARAMETERS) {
}
Consuming the ABI in order to generate type-safe serializers is something I believe is currently being done as part of some larger down-stream tooling. I am going to leave this item open to remind us to verify that this is included as part of that work (and can be generally used - not just part of a specific project) since I do agree that it is helpful and not difficult to build.
This is implemented here
https://github.com/fulldecent/aion-aip010/blob/master/src/main/java/org/aion/AIP010.java#L45-L70
Cool, I feel like I'm touching on the right points here...
Using
ABIStreamingEncoder
withavmRule.call
is a low-level technique that 99% of contract developers should not need to know about. This is bad:Instead, during the compilation process please generate a new artifact.
Currently this ABI artifact is generated. Example:
But actually you can also generate this artifact:
End result is the above can be refactored into this new type safe equivalent:
The contract publisher would distribute this encoder file as a courtesy to other developers that want to interact with their deployed contract using Java.