Storage and get methods
Summary: In the previous steps, we learned how to use the
Blueprint
and its project structure.
Tact is a high-level programming language for the TON Blockchain, focused on efficiency and simplicity. It is designed to be easy to learn and use while being well-suited for smart contract development. Tact is a statically typed language with a simple syntax and a powerful type system.
For more details, refer to the Tact documentation and Tact By Example.
Let's create and modify our smart contract following standard steps described in the previous Blueprint overview section.
Step 1: edit smart contract code
At the top of the generated contract file: hello_world.tact
, you may see a message definition:
message Add {
queryId: Int as uint64;
amount: Int as uint32;
}
A message is a basic structure for communication between contracts. Tact automatically serializes and deserializes messages into cells. To ensure that opcodes will be the same during message structure changes, it may be added like below:
message(0x7e8764ef) Add {
queryId: Int as uint64;
amount: Int as uint32;
}