On this page:
5.5.1 Ethereum

The Ethereum Reach connector generates a contract that manages one instance of the DApp’s execution. It is guaranteed to use exactly one word of on-chain state, while each piece of consensus state appears as a transaction argument.

Ethereum uses the Keccak256 algorithm to perform digests. Its bit width is 256-bits.

Non-network tokens are compiled to ERC-20 fungible tokens. Specifically, the Token type refers to the address of the ERC-20 contract.

Views are compiled to view functions. A view named X.Y will be named X_Y. Views expand the on-chain state to include the free variables of all values bound to a view.

The connector provides a binding named ETH to backends.

During compilation, the connector produces one intermediate output: "input.export.sol", containing the Solidity code implementing the contract.

A few details of Ethereum leak through to Reach. In Ethereum, time corresponds to block numbers. The node that a given participant is connected to does not instantly know that it’s blocks are correctly and may revert past transactions after it reaches consensus with the rest of the network. This means that Reach applications must not make externally observable effects until after such consensus is reached.

Backends must respect the following environment variables: