Smart Contract Schema
Understanding the contract schema is essential for developers working with the TokenTable TVM. This section provides an overview of the TLB (Type-Level Binary) schema, which defines the structure and relationships of the smart contract components for interaction within the TON blockchain.
TLB Structure
The TokenTable TVM smart contract uses TLB to define the serialization format and logic for its data structures and functions. Below is the schema breakdown of the contract’s key components:
Main Distributor Contract
The Main Distributor Contract holds the merkle root for wallet verification and manages token distribution. Here’s the TLB schema for the contract:
Leaf Contract
Each Leaf Contract verifies individual wallet claims by processing merkle proofs and triggering token transfers. Here’s the TLB schema for a leaf contract:
Claim Transaction
The claim transaction initiates the process of submitting a merkle proof and distributing tokens. Below is the TLB schema for submitting a claim:
Token Transfer
This defines the structure for token transfers triggered after successful claim verification:
TLB Relationships
To visualize the relationships between the TLB components, here's a conceptual breakdown:
Main Distributor Contract holds the merkle root and manages the main jetton wallet.
Leaf Contracts handle individual wallet verification using merkle proofs and communicate with the Main Distributor Contract for token transfers.
Claim Transactions are submitted by users with merkle proofs and are processed by the Leaf Contracts.
Token Transfers occur once the merkle proof is verified, resulting in the distribution of tokens to the user’s wallet.
In the following sections, we'll explore integration capabilities of the smart contract.
Last updated