From 91118ba4421ec455aa9ea9aaea59955f1008ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 25 Jul 2018 11:10:45 +0200 Subject: [PATCH 1/2] EEI: Add transfer() method --- eth_interface.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/eth_interface.md b/eth_interface.md index 66d2d6a6..d256b6b7 100644 --- a/eth_interface.md +++ b/eth_interface.md @@ -472,3 +472,25 @@ Get the block’s timestamp. **Returns** `blockTimestamp` **i64** + + +## transfer + +Trasfers ETH from the current account to the destination address. +When the balance of the current account is not sufficient the method ends +with a failure. + +**Parameters** + +- `destinationOffset` **i32ptr** the memory offset to load the destination address from (`address`) +- `valueOffset` **i32ptr** the memory offset to load the value from (`u128`) + +**Returns** + +`result` **i32** Returns 0 on success, 1 on failure. + +**Rationale** + +This method is added for compatibility with EVM1 where you can achieve the same +result by using CREATE + SELFDESTRUCT combo. + \ No newline at end of file From f7aa2d949f7cdf9427520a3ecff6b7757ba50fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 31 Jul 2018 13:23:06 +0200 Subject: [PATCH 2/2] EEI: Remove beneficiary param form selfDestruct() --- eth_interface.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eth_interface.md b/eth_interface.md index d256b6b7..3ca42a61 100644 --- a/eth_interface.md +++ b/eth_interface.md @@ -450,12 +450,12 @@ from last executed `call`, `callCode`, `callDelegate`, `callStatic` or `create`. ## selfDestruct -Mark account for later deletion and give the remaining balance to the specified -beneficiary address. This will cause a trap and the execution will be aborted immediately. +Mark account for later deletion. +This will cause a trap and the execution will be aborted immediately. **Parameters** -- `addressOffset` **i32ptr** the memory offset to load the address from (`address`) +*nothing* **Returns**