aionnetwork / AVM

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

Add argument list encode/decode to ABI #373

Closed jeff-aion closed 5 years ago

jeff-aion commented 5 years ago

The ABIEncoder and ABIDecoder currently assume that they are only being used for method invocations, so they only expose interactions as name and arguments.

In order to properly use these mechanisms to pass arguments into the deployment, we need to allow these to operate without the need for a method name, specifically.

jeff-aion commented 5 years ago

Note that this implementation is already available here: https://github.com/aionnetwork/AVM/blob/master/org.aion.avm.api/src/org/aion/avm/abi/internal/ABICodec.java

We just need to expose this through the public ABIEncoder and ABIDecoder APIs. If/when these move fully to user-space, the ABICodec could also be directly used, there, too.