Home Technology Free TON DeBots. Basic Functions.

Free TON DeBots. Basic Functions.

by lerika

Every person has interacted with a telegram bot at least once. A bot is a program (algorithm) that can interact with a user. Using a bot, you can, for example, make an appointment with a specialist, subscribe to a newsletter, and even buy stuff online.

The Free TON software environment also allows you to create bots, but they are decentralized. They are called Decentralized Bots or, for short, DeBots.
Debots is the product of the  Free TON leading team of developers – TON.Labs
Users can call Debots in the TON.Surf wallet interface, which in this case acts like a browser.
For developers, there is a command console tonos-cli, which allows you to generate keys and seed phrases, deploy smart contracts to the network, send a messages, etc. Working with the command line significantly speeds up development, because it displays an error log and provides hints during work.

The structure of all Free TON Debots is approximately the same.
At the beginning of the .sol file, the necessary interfaces are connected, for example AddressInput, AmountInput, ConfirmInput, Menu, Terminal, UserInfo, and others.

The screenshot shows the standard .sol file of the basic Free TON Debot – Hello World debot.

Main functions:
SetIcon – sets the Debot logo (can be displayed in TON.Surf and make your Debot more recognizable);
Start – starts Debot;
getDebotInfo – gets information about Debot in the form of an array of parameters and their values;
getRequiredInterfaces – gets information about imported interfaces;
setUserInput – Handles information entered by the user in a field of type input.

You may also like

Leave a Comment