API reference

This section describes different op codes of AMM smart contracts as well as corresponding SDK calls and transaction builders

Overview

The section contains separate documents for each smart contract used in AMM:

Source code of all smart contracts can be found in this Github repo

Definitions of terminology used can be found in Glossary

Gas values

Current version of SDK uses fixed gas values for each transaction (gasAmount) which can be modified by a user. Those values were chosen such that enough gas would be supplied for all messages to go through in the current blockchain environment (as of December of 2022). In the future those gas values would be generated dynamically depending on the TON blockchain configuration.

Common Types

  • AddressType is a union between a tonweb Address class and a string that can represent a valid ton address

  • AmountType is a union between a BN class and a number that can represent a valid amount in nanoTons

  • QueryIdType is a union between a BN class and a number that can represent a valid integer number

Last updated