Skip to main content

Getting started

EverX DeBots Github repository https://github.com/tonlabs/debots

What is a DeBot?

DeBot (Decentralized Bot) is an intuitive, no-prior-knowledge-required interface for interacting with smart contracts on Everscale Blockchain.

Blockchain technology is complex and can be hard to learn for users without prior experience with it. With DeBots, our goal is twofold: simplify user's experience with the blockchain, and streamline the development process of blockchain-based services. It should be noted that this is achieved by maintaining the highest level of security.

At its most basic, a DeBot is a secure chat-based interface that allows a user to interact with a smart contract on the blockchain and access its various functions in the form of a dialogue.

Basic terms

  • DeBot — a smart contract facilitating conversation-like communication flow with a target smart contract.
  • Target smart contract — the smart contract for which a DeBot is created. The DeBot is an interface to this smart contract.
  • DeBot browser — a program that executes the DeBot and parses its answer using DeBot protocol.
  • DeBot protocol — a set of rules describing the communication between a browser and the DeBot. Namely, it describes how to call DeBot functions and interpret its answers.

Debots are deployed on the Everscale blockchain and the browser is being managed by the user. The code is simply downloaded and runs inside the engine.

DeBot interfaces

To fulfill their functions as a user's interface, DeBots must be able to facilitate a number of interactions between the user, the user's device and the target smart contract on the blockchain:

  • receive input from users;
  • query info about other smart contracts;
  • query transactions and messages;
  • receive data from external subsystems (like file systems) and external devices (like NFC, camera and so on);
  • call external function libraries that allow you to do operations that are not supported by VM. For example, work with json, convert numbers to string and vice versa, encrypt/decrypt/sign data.

These needs are covered in various DeBot Interfaces (DInterfaces) which can be used in DeBots and which must be supported in DeBot Browsers.

To use an interface, the DeBot should import a source file with the DInterface declaration and call its methods like any other smart contract methods in Everscale — by sending internal messages to an interface address, which is unique and explicitly defined for every interface.

Every DInterface must be discussed and accepted by DeBot Interface Specifications (DIS) Consortium before it can be used in DeBots. All accepted interfaces are published by DeBot Interface Specifications Consortium.

Prerequisites

To build DeBots install everdev:

npm install -g everdev

To run and debug DeBots install tonos-cli:

note

For run DeBots required tonos-cli version >= 0.11.4.

Install using everdev:

npx everdev tonos-cli install

or

npx everdev tonos-cli set --version 0.26.2

Or download binaries from here:

DeBots

  • Hello — Hello World DeBot. Can be used as a template for new DeBots.
  • Multisig — DeBot for multi-signature wallet (multisig). Uses several basic DeBot interfaces: Terminal, AddressInput, AmountInput, ConfirmInput. It supports all functions of the multisig wallet contract, such as submitting and confirming transactions and viewing wallet information.
  • DEvergence — DeBot for the Ever Surf App which the user employs to connect to a Tezos wallet and transact. DeBots are smart contracts with a chat interface similar to those on Telegram.

How to try DeBot

You can start by trying out multisig DeBot. It's already deployed to net.ever.live and can be called through any DeBot browser that supports it.

To try it out in Ever Surf, go to https://ever.surf/ or in tonos-cli call:

DeBot DEvergence

tonos-cli config --url eri01.net.everos.dev
tonos-cli debot fetch 0:38a53a8bff83c57b6334f369d5ff678bdaa2b8e229d9b5552dfdda2b4d90cf92

or in Ever Surf 0:38a53a8bff83c57b6334f369d5ff678bdaa2b8e229d9b5552dfdda2b4d90cf92

DeBot Multisig

tonos-cli config --url eri01.net.everos.dev
tonos-cli debot fetch 0:c69a0ed4a11b467ec1a981f29139dc3ff6af47eeacd2cd93e67a6cfc6f771cfb

or in Ever Surf 0:c69a0ed4a11b467ec1a981f29139dc3ff6af47eeacd2cd93e67a6cfc6f771cfb

If you do not have a multisig wallet to try it out with, you can use the following test wallet address and seed phrase:

address: 0:66e01d6df5a8d7677d9ab2daf7f258f1e2a7fe73da5320300395f99e01dc3b5f
seed phrase: final axis aware because grace sort giant defy dragon blouse motor virus

Please don't empty out its balance, so others can try it out too.