aionnetwork / AVM

Enabling Java code to run in a blockchain environment
https://theoan.com/
MIT License
49 stars 25 forks source link

Decoding and returning null, void, empty array #350

Closed aion-shidokht closed 5 years ago

aion-shidokht commented 5 years ago

At the ABI level there's a distinction between an empty byte array, null, and void as a return type. null will be converted to an object type of NULL. Return type of void should be converted to an empty byte array so that it can be decoded if necessary. This is in the case of a successful transaction execution.

If the transaction fails, the returned data will be null indicating execution failure.