Skip to content

Commit 91118ba

Browse files
committed
EEI: Add transfer() method
1 parent 00768be commit 91118ba

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

eth_interface.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,3 +472,25 @@ Get the block’s timestamp.
472472
**Returns**
473473

474474
`blockTimestamp` **i64**
475+
476+
477+
## transfer
478+
479+
Trasfers ETH from the current account to the destination address.
480+
When the balance of the current account is not sufficient the method ends
481+
with a failure.
482+
483+
**Parameters**
484+
485+
- `destinationOffset` **i32ptr** the memory offset to load the destination address from (`address`)
486+
- `valueOffset` **i32ptr** the memory offset to load the value from (`u128`)
487+
488+
**Returns**
489+
490+
`result` **i32** Returns 0 on success, 1 on failure.
491+
492+
**Rationale**
493+
494+
This method is added for compatibility with EVM1 where you can achieve the same
495+
result by using CREATE + SELFDESTRUCT combo.
496+

0 commit comments

Comments
 (0)