Coming from Ethereum
Learn how to develop and build on TON coming from the Ethereum (EVM) ecosystem.
Execution model
Asynchronous blockchain
A fundamental aspect of TON development is the asynchronous execution model. Messages sent by one contract take time to arrive at another, so the resulting transactions for processing incoming messages occur after the current transaction terminates.
Compared to Ethereum, where multiple messages and state changes on different contracts can be processed within the same atomic transaction, a TON transaction represents a state change only for one account and only for a processing of a single message. Even though in both blockchains a signed included-in-block unit is called a "transaction", one transaction on Ethereum usually corresponds to several transactions on TON, that are processed over a span of several blocks.
| Action description | Ethereum | TON |
|---|---|---|
| Single message processing with state change on one contract | Message call or "internal transaction" | Transaction |
| Number of state changes and messages on different accounts produced from initial contract call | Transaction | Chain of transactions or "trace" |
Consider a practical example: liquidity withdrawal on a DEX.
-
On Ethereum, it appears as a single atomic transaction with multiple contract calls inside it. This transaction has a single hash and is included in one block.