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] 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