evmc
evmc copied to clipboard
java: introduce proper types and minimise reliance on ByteBuffer/byte[]
Part of #548.
I really like this idea. Would remove all guessing. Feels like you have some coding issues.
Do you intend for implementors to create Address, Bytes32 Uint256 objects? If so, they'll need public constructors.
@atoulme thanks! This is still work in progress, hence the draft mode, but I think this would be the safest way to handle things. Only issue is Message which is a mess due to the pointer thingie.
Need to add Result class, and also pass Result/Message in HostContext.call.
This currently contains the desired API from the Java perspective, yet to actually implement all of this. I'm leaning towards now that the C part would need to just receive an instance of Result/Message and manually read/write the fields and compose the C struct, as opposed to trying to construct the C struct from within Java.