aionnetwork / AVM

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

AvmCLI must support balance transfer #340

Closed jeff-aion closed 5 years ago

jeff-aion commented 5 years ago

AvmCLI is used in many testing/debugging scenarios but it is currently limited in that it doesn't allow balance transfers (see hard-coded ZERO in https://github.com/aionnetwork/AVM/blob/51714d2e36694f33a65b28c1eba2d386f2da7f41/org.aion.avm.core/src/org/aion/cli/AvmCLI.java#L93 ).

This feature needs to be added to CALL and DEPLOY, allowing a degenerate use-case of CALL to not encode data, and merely transfer.

aionWilliam commented 5 years ago

From my understanding, the balance transfer: 1) DEPLOY: the contract deployer (address) makes some transfer to the contract address 2) CALL: the caller (address) transfers some balance to the contract address In both case, its from the caller (which could be an account or contract?) to the contract.