Skip to content

Commit 03c6a6b

Browse files
committed
fix: l2 knowledge base
1 parent ccdaea5 commit 03c6a6b

9 files changed

+20775
-0
lines changed
-208 Bytes
Binary file not shown.

faqqer_bot.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ async def version_handler(event):
331331
• `/version` - Show version info
332332
• `/refresh_faq` - Refresh FAQ content
333333
• `/analyze_support [hours] [question]` - Run customer analysis
334+
• `/channel_info` - Show channel subscriptions
334335
335336
**Examples:**
336337
• `/analyze_support` - Default 3-hour analysis
@@ -345,6 +346,28 @@ async def version_handler(event):
345346
logging.error(f"Error in version command: {e}")
346347
await event.reply("❌ Failed to retrieve version information.")
347348

349+
# Channel info command handler
350+
@client.on(events.NewMessage(pattern=r'/channel_info'))
351+
async def channel_info_handler(event):
352+
try:
353+
logging.info("Channel info command requested")
354+
await event.reply("🔍 Fetching channel information...")
355+
356+
# Get channels and format response
357+
dialogs = await client.get_dialogs()
358+
channels = [dialog for dialog in dialogs if isinstance(dialog.entity, Channel)]
359+
360+
if channels:
361+
info = "📡 **Bot Channel Subscriptions:**\n\n"
362+
for channel in channels:
363+
info += f"• **{channel.name}**\n ID: `{channel.id}`\n\n"
364+
await event.reply(info)
365+
else:
366+
await event.reply("❌ Bot is not subscribed to any channels.")
367+
except Exception as e:
368+
logging.error(f"Error in channel info command: {e}")
369+
await event.reply("❌ Failed to retrieve channel information.")
370+
348371
# Main execution function
349372
async def main():
350373
# Start the Telegram client

faqs/faq_l2_general.txt

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# Tari Layer 2 (Ootle) - Frequently Asked Questions
2+
3+
## General Questions
4+
5+
### What is Tari?
6+
Tari is a blockchain platform designed specifically for digital assets like NFTs, loyalty points, in-game items, and credit card rewards. It's built to be scalable, secure, and easy to use.
7+
8+
### What is Layer 2 (Ootle)?
9+
Layer 2, also called "Ootle," is Tari's smart contract platform where developers can build and deploy applications. It's where the magic happens - NFTs, tokens, games, and other digital asset applications run here.
10+
11+
### What's the difference between Layer 1 and Layer 2?
12+
- **Layer 1 (Minotari)**: The base blockchain that provides security through mining. Uses XTM as currency.
13+
- **Layer 2 (Ootle)**: The smart contract layer where applications run. Uses XTR as currency for transactions.
14+
15+
### What can I build on Tari Layer 2?
16+
You can build:
17+
- NFT collections and marketplaces
18+
- Custom tokens (fungible and non-fungible)
19+
- Gaming applications with in-game items
20+
- Digital collectibles
21+
- Loyalty and rewards programs
22+
- DeFi applications (exchanges, liquidity pools, lending)
23+
- Any application involving digital assets
24+
25+
## Currency & Transactions
26+
27+
### What currency does Layer 2 use?
28+
Layer 2 uses **XTR** (pronounced "X-T-R") as its native currency for paying transaction fees and interacting with smart contracts.
29+
30+
### How do I get XTR?
31+
- **For Testing**: You can get free testnet XTR from the faucet in your wallet
32+
- **For Production**: XTR will be available through exchanges and can be bridged from Layer 1
33+
34+
### Are transactions private?
35+
Yes! Tari offers strong privacy by default:
36+
- Transaction amounts are hidden
37+
- User identities are protected
38+
- Only the parties involved can see transaction details
39+
40+
### How fast are transactions?
41+
Transactions on Layer 2 are fast, typically confirming within seconds. The network is designed for high throughput and low latency.
42+
43+
## Wallets & Accounts
44+
45+
### What wallets can I use?
46+
- **Tari Wallet Daemon**: The official wallet with a web interface
47+
- **Tari Console Wallet**: Command-line wallet for advanced users
48+
- Mobile and desktop wallets are in development
49+
50+
### How do I create an account?
51+
When you set up the Tari Wallet Daemon, it automatically creates a default account called "dev" for you. You can create additional accounts as needed.
52+
53+
### Can I have multiple accounts?
54+
Yes! You can create multiple accounts within your wallet for different purposes or to organize your assets.
55+
56+
### What's a component address vs a template address?
57+
- **Template address**: Like a blueprint - the reusable code for an application
58+
- **Component address**: Like a house built from that blueprint - an actual instance of the application
59+
60+
## Development & Testing
61+
62+
### How do I test my application?
63+
Tari provides the **Igor Testnet**, a live testing environment where:
64+
- You get free testnet XTR from the faucet
65+
- You can deploy and test your applications safely
66+
- No real money is at risk
67+
68+
### Do I need to know blockchain programming?
69+
While blockchain knowledge helps, Tari is designed to be developer-friendly:
70+
- Use familiar languages (Rust for smart contracts, JavaScript for frontends)
71+
- Good documentation and examples
72+
- Active community support
73+
74+
### Is there a local development environment?
75+
Yes! You can run a complete local network on your computer using the Tari Swarm Daemon, which gives you:
76+
- Full control over your test environment
77+
- No need for internet connectivity
78+
- Instant resets and testing
79+
80+
## Smart Contracts & Templates
81+
82+
### What's a "template"?
83+
A template is Tari's term for a smart contract. It's reusable code that defines how a digital asset or application works. Think of it as a blueprint.
84+
85+
### What programming language are templates written in?
86+
Templates are written in **Rust** and compiled to WebAssembly (WASM). This makes them fast, secure, and portable.
87+
88+
### Can I use existing templates?
89+
Yes! Many common templates are available:
90+
- Basic NFT templates
91+
- Fungible token templates
92+
- DEX (exchange) templates
93+
- You can use these as-is or customize them
94+
95+
### What's the difference between deploying and instantiating?
96+
- **Deploying**: Publishing the template (blueprint) to the blockchain
97+
- **Instantiating**: Creating an actual working instance from that template (building from the blueprint)
98+
99+
## Network & Infrastructure
100+
101+
### What network should I use?
102+
- **Igor Testnet**: For testing and development (free testnet XTR available)
103+
- **Mainnet**: Coming soon for production applications
104+
- **LocalNet**: Your personal local network for development
105+
106+
### What's a validator node?
107+
Validator nodes are computers that process transactions and maintain the network. They work together in committees to ensure everything runs smoothly and securely.
108+
109+
### What's an indexer?
110+
An indexer is a service that helps you search and query blockchain data. It makes it easy to find transactions, check balances, and look up information about assets.
111+
112+
### Is the network decentralized?
113+
Yes! Tari Layer 2 uses a committee-based consensus system where multiple validator nodes work together. No single entity controls the network.
114+
115+
## Resources & Tokens
116+
117+
### What are resources?
118+
Resources are digital assets on Tari - things like tokens, NFTs, or any other valuable digital items. They can be fungible (like coins) or non-fungible (like unique collectibles).
119+
120+
### What's a vault?
121+
A vault is like a secure container in your account that holds your resources (tokens, NFTs, etc.). Each account has vaults for different types of assets.
122+
123+
### What's a badge?
124+
Badges are special tokens that grant permissions or access rights. For example, an admin badge might let you mint new tokens or update settings.
125+
126+
### Can I create my own token?
127+
Absolutely! Creating custom tokens is easy with Tari. You can create:
128+
- Fungible tokens (like coins)
129+
- Non-fungible tokens (unique items)
130+
- Tokens with custom rules and properties
131+
132+
## Security & Permissions
133+
134+
### How are permissions handled?
135+
Tari uses a flexible access control system:
136+
- You can set rules for who can call which functions
137+
- Use badges to grant special privileges
138+
- Define custom permission logic for your application
139+
140+
### Is my data safe?
141+
Yes! Tari is built with security in mind:
142+
- Cryptographic protection of all data
143+
- Privacy by default
144+
- Battle-tested cryptography (Ristretto points, Pedersen commitments)
145+
146+
### Can smart contracts be upgraded?
147+
Templates themselves are immutable once deployed, but you can design them to be upgradeable by including update functions protected by appropriate permissions.
148+
149+
## Community & Support
150+
151+
### Where can I get help?
152+
- Documentation: https://docs.tari.com
153+
- Discord: Join the Tari Discord server
154+
- GitHub: Browse code and examples
155+
- This bot! Ask questions anytime
156+
157+
### Is there a developer community?
158+
Yes! Tari has an active developer community. You can:
159+
- Join discussions on Discord
160+
- Contribute to open-source projects
161+
- Share your projects and get feedback
162+
- Participate in hackathons and events
163+
164+
### Where can I find examples?
165+
Examples are available at:
166+
- Official templates repository
167+
- Sample projects on GitHub
168+
- Documentation site with tutorials
169+
- Community-created projects
170+
171+
### How can I contribute?
172+
Tari is open source! You can:
173+
- Build applications on the platform
174+
- Contribute code improvements
175+
- Write documentation
176+
- Help other developers
177+
- Report bugs and suggest features
178+
179+
## Getting Started
180+
181+
### What do I need to start building?
182+
The basics:
183+
1. Install Rust (for smart contract development)
184+
2. Install Node.js (for frontend development)
185+
3. Download the Tari Wallet Daemon
186+
4. Install the Tari CLI tool
187+
5. Follow the getting started guide
188+
189+
### How long does it take to build something?
190+
- Simple token: 10-30 minutes
191+
- Basic NFT: 30-60 minutes
192+
- Complex application: Hours to days depending on features
193+
- The platform is designed to be quick to prototype with!
194+
195+
### Where do I start?
196+
1. Set up your wallet and get testnet XTR
197+
2. Try deploying a basic template (like a counter or simple token)
198+
3. Build a simple frontend to interact with it
199+
4. Explore more complex examples
200+
5. Start building your own ideas!
201+
202+
### Do I need cryptocurrency experience?
203+
Not necessarily! While understanding blockchain concepts helps, Tari is designed to be accessible to regular developers. If you can code, you can build on Tari.
204+
205+
---
206+
207+
## Quick Glossary
208+
209+
- **XTR**: Layer 2 currency for transaction fees
210+
- **Template**: Smart contract / application code (blueprint)
211+
- **Component**: Instance of a template (actual running application)
212+
- **Resource**: Digital asset (token, NFT, etc.)
213+
- **Vault**: Container holding resources in an account
214+
- **Badge**: Special token granting permissions
215+
- **Substate**: A piece of state stored on the blockchain
216+
- **Indexer**: Service for searching and querying blockchain data
217+
- **Validator**: Node that processes transactions
218+
- **Igor**: The testnet for safe testing
219+
- **WASM**: WebAssembly, the format templates are compiled to
220+
221+
---
222+
223+
**Need more help?** Ask specific questions and I'll provide detailed answers!

0 commit comments

Comments
 (0)