Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions eth_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,25 @@ persisting the current values for sender and value.

`result` **i32** Returns 1 or 0 depending on if the VM trapped on the message or not

## callStatic

Sends a message with arbitrary data to a given address path, but disallow state
modifications. This includes `log`, `create`, `selfdestruct` and `call` with a non-zero
value.

**Parameters**

- `gas` **i64** the gas limit
- `addressOffset` **i32ptr** the memory offset to load the address from (`address`)
- `dataOffset` **i32ptr** the memory offset to load data from (`bytes`)
- `dataLength` **i32** the length of data
- `resultOffset` **i32ptr** the memory offset to store the result data at (`bytes`)
- `resultLength` **i32** the maximal length of result data

**Returns**

`result` **i32** Returns 1 or 0 depending on if the VM trapped on the message or not

## storageStore

Store 256-bit a value in memory to persistent storage
Expand Down Expand Up @@ -252,6 +271,8 @@ Creates a new contract with a given value.
- `length` **i32** the data length
- `resultOffset` **i32ptr** the memory offset to write the new contract address to (`address`)

*Note*: `create` will clear the return buffer in case of success or may fill it with data coming from `revert`.

**Returns**

`result` **i32** Returns 1 or 0 depending on if the VM trapped on the message or not
Expand Down Expand Up @@ -390,6 +411,53 @@ Set the returning output data for the execution.

*nothing*

## revert

Set the returning output data for the execution.

*Note*: multiple invocations will overwrite the previous data.

**Parameters**

- `dataOffset` **i32ptr** the memory offset of the output data (`bytes`)
- `length` **i32** the length of the output data

**Returns**

*nothing*

## getReturnDataSize

Get size of current return data buffer to memory. This contains the return data
from the last executed `call`, `callCode`, `callDelegate`, `callStatic` or `create`.

*Note*: `create` only fills the return data buffer in case of a failure.

**Parameters**

*none*

**Returns**

`dataSize` **i32**

## returnDataCopy

Copies the current return data buffer to memory. This contains the return data
from last executed `call`, `callCode`, `callDelegate`, `callStatic` or `create`.

*Note*: `create` only fills the return data buffer in case of a failure.

**Parameters**

- `resultOffset` **i32ptr** the memory offset to load data into (`bytes`)
- `dataOffset` **i32** the offset in the return data
- `length` **i32** the length of data to copy

**Returns**

*nothing*

## selfDestruct

Mark account for later deletion and give the remaining balance to the specified
Expand Down