# diter89/tea-assam-testnet-module architecture

> Architecture diagram of the GitHub repository diter89/tea-assam-testnet-module, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/diter89/tea-assam-testnet-module
- Repository: https://github.com/diter89/tea-assam-testnet-module

## Overview

This repository is a set of Python utilities for Tea Assam testnet token and DEX operations. Its workflows cover DEX pair/liquidity inspection, liquidity provision, swaps in both directions, individual token transfers, and batch transfers. Each script owns its own Web3 connection and transaction logic; the excerpts show no shared application orchestrator or persistent store. RPC and contract interactions are visible in the sampled source. The README highlights liquidity addition and DEX checking; other utility workflows are represented by their sampled implementations.

Main entry points: [`transfer_token/batch_transfer.py`](https://github.com/diter89/tea-assam-testnet-module/blob/master/transfer_token/batch_transfer.py) (Batch transfer), [`swaps_tokens/add_liquidity.py`](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/add_liquidity.py) (Add liquidity), [`swaps_tokens/DexChecker.py`](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/DexChecker.py) (DEX checker), [`swaps_tokens/tea_to_contract.py`](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/tea_to_contract.py) (TEA to token swap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dex["DEX operations"]
  node_liquidity["Add liquidity<br/>[add_liquidity.py]"]
  node_dexcheck["DEX checker<br/>[DexChecker.py]"]
  node_buy["TEA to token swap<br/>[tea_to_contract.py]"]
  node_sell["Token to TEA swap<br/>[contract_to_tea.py]"]
end

subgraph group_transfers["Token transfers"]
  node_single["Individual transfer<br/>[transfer.py]"]
  node_batch["Batch transfer<br/>[batch_transfer.py]"]
end

subgraph group_network["Blockchain services"]
  node_rpc{{"Tea Assam RPC"}}
  node_dex_contracts{{"DEX contracts"}}
  node_token_contracts{{"Token contracts"}}
  node_batch_contract{{"Batch transfer contract"}}
end

node_liquidity -->|"queries and submits"| node_rpc
node_liquidity -->|"reads and adds liquidity"| node_dex_contracts
node_dexcheck -->|"queries"| node_rpc
node_dexcheck -->|"reads pair data"| node_dex_contracts
node_buy -->|"queries and submits"| node_rpc
node_buy -->|"wraps and swaps"| node_dex_contracts
node_sell -->|"queries and submits"| node_rpc
node_sell -->|"reads and swaps"| node_dex_contracts
node_single -->|"submits transfers"| node_rpc
node_single -->|"transfers tokens"| node_token_contracts
node_batch -->|"queries and submits"| node_rpc
node_batch -->|"checks and approves"| node_token_contracts
node_batch -->|"dispatches batch transfer"| node_batch_contract

click node_liquidity "https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/add_liquidity.py"
click node_dexcheck "https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/DexChecker.py"
click node_buy "https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/tea_to_contract.py"
click node_sell "https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/contract_to_tea.py"
click node_single "https://github.com/diter89/tea-assam-testnet-module/blob/master/transfer_token/transfer.py"
click node_batch "https://github.com/diter89/tea-assam-testnet-module/blob/master/transfer_token/batch_transfer.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_liquidity,node_dexcheck,node_buy,node_sell toneBlue
class node_single,node_batch toneAmber
class node_rpc,node_dex_contracts,node_token_contracts,node_batch_contract toneMint
```

## Components

### DEX operations

- [Add liquidity](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/add_liquidity.py): `swaps_tokens/add_liquidity.py`
- [DEX checker](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/DexChecker.py): `swaps_tokens/DexChecker.py`
- [TEA to token swap](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/tea_to_contract.py): `swaps_tokens/tea_to_contract.py`
- [Token to TEA swap](https://github.com/diter89/tea-assam-testnet-module/blob/master/swaps_tokens/contract_to_tea.py): `swaps_tokens/contract_to_tea.py`

### Token transfers

- [Individual transfer](https://github.com/diter89/tea-assam-testnet-module/blob/master/transfer_token/transfer.py): `transfer_token/transfer.py`
- [Batch transfer](https://github.com/diter89/tea-assam-testnet-module/blob/master/transfer_token/batch_transfer.py): `transfer_token/batch_transfer.py`

### Blockchain services

- **Tea Assam RPC**
- **DEX contracts**
- **Token contracts**
- **Batch transfer contract**

## Connections

- Add liquidity → Tea Assam RPC: queries and submits (evidence: `swaps_tokens/add_liquidity.py`)
- Add liquidity → DEX contracts: reads and adds liquidity (evidence: `swaps_tokens/add_liquidity.py`)
- DEX checker → Tea Assam RPC: queries (evidence: `swaps_tokens/DexChecker.py`)
- DEX checker → DEX contracts: reads pair data (evidence: `swaps_tokens/DexChecker.py`)
- TEA to token swap → Tea Assam RPC: queries and submits (evidence: `swaps_tokens/tea_to_contract.py`)
- TEA to token swap → DEX contracts: wraps and swaps (evidence: `swaps_tokens/tea_to_contract.py`)
- Token to TEA swap → Tea Assam RPC: queries and submits (evidence: `swaps_tokens/contract_to_tea.py`)
- Token to TEA swap → DEX contracts: reads and swaps (evidence: `swaps_tokens/contract_to_tea.py`)
- Individual transfer → Tea Assam RPC: submits transfers (evidence: `transfer_token/transfer.py`)
- Individual transfer → Token contracts: transfers tokens (evidence: `transfer_token/transfer.py`)
- Batch transfer → Tea Assam RPC: queries and submits (evidence: `transfer_token/batch_transfer.py`)
- Batch transfer → Token contracts: checks and approves (evidence: `transfer_token/batch_transfer.py`)
- Batch transfer → Batch transfer contract: dispatches batch transfer (evidence: `transfer_token/batch_transfer.py`)
