Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aionbot opened this issue Dec 5, 2018 · 1 comment
Open

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

aionbot opened this issue Dec 5, 2018 · 1 comment
Labels
API Functionality accessed through BlockchainRuntime

Comments

@aionbot
Copy link

aionbot commented Dec 5, 2018

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).

@jeff-aion jeff-aion added this to the Standard TestNet milestone Dec 17, 2018
@jeff-aion jeff-aion added the API Functionality accessed through BlockchainRuntime label Jan 3, 2019
aionWilliam added a commit that referenced this issue Feb 5, 2019
Added the functionality transfer, similar to call, except with no data field.
Transfer is available to contract and to account.
Added tests to verify the transfer of balance (including zero and negatives to behave as expected).
Added a test that calls internal transaction for the transfer.
aionWilliam added a commit that referenced this issue Feb 5, 2019
Added the functionality transfer, similar to call, except with no data field.
Transfer is available to contract and to account.
Added tests to verify the transfer of balance (including zero and negatives to behave as expected).
Added a test that calls internal transaction for the transfer.
@fulldecent
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Functionality accessed through BlockchainRuntime
Projects
None yet
Development

No branches or pull requests

3 participants