aionnetwork / AVM

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

Add transfer() and send() functionality to BlockchainRuntime #253

Open aionbot opened 5 years ago

aionbot commented 5 years ago

Issue created by JunhanHu-aion (on Monday Sep 17, 2018 at 15:32 GMT)

Solidity supports the following functionality:

<address payable>.transfer(uint256 amount):\ send given amount of Wei to Address, throws on failure, forwards 2300 gas stipend, not adjustable

<address payable>.send(uint256 amount) returns (bool):\ send given amount of Wei to Address, returns false on failure, forwards 2300 gas stipend, not adjustable

We may want to support something similar in BlockchainRuntime so user can transfer native Aion with their Dapp easliy. Currently native Aion transfer within AVM are done by passing it as value parameter to call() (Solidity support that as well).

fulldecent commented 5 years ago

Reference https://solidity.readthedocs.io/en/v0.5.10/types.html?highlight=types#members-of-addresses