TON Smart Contracts
Everything is a Smart Contract
In the TON blockchain, each account is designed as a smart contract. Consequently, wallets, widely used by all participants, also function as smart contracts. They have the capability to receive external messages and facilitate communication with other contracts within the network.
This structure offers extensive opportunities for both users and developers, such as the ability to customize and enhance wallets, thereby adding a layer of personalization and functionality not typically found in traditional blockchain systems.
External Messages
Smart contracts in the TON blockchain are designed for internal work and, by their very nature, do not have the ability to request information from the outside world. To bridge this gap, TON uses external messages. Some contracts, such as wallets, support receiving these messages. This feature allows users to send specific instructions to their wallets via external messages, allowing them to perform desired actions on the blockchain.
Internal Messages
In the TON blockchain system, the messages exchanged between smart contracts are termed as internal messages. These internal messages are utilized by various contracts within the network, including wallets, for interacting with other contracts, especially upon the receipt of external messages.
This mechanism forms a crucial part of the blockchain's functionality, enabling a seamless interplay between different contracts within the system, thereby facilitating complex operations and transactions.
Getters
Special functions within the TON blockchain enable data retrieval from a smart contract. This operation does not require gas payment, as it is executed on the client's side. This feature significantly enhances user interaction with smart contracts, efficiently acquiring necessary data without incurring additional costs, thus streamlining the process for users and developers alike.
Last updated