SCT by STC adalah platform marketplace komprehensif untuk smart contract template yang memudahkan developer, startup, bisnis, dan educator dalam menemukan, kustomisasi, dan deploy template Solidity smart contract.
SCT by STC is a comprehensive smart contract template marketplace platform that facilitates developers, startups, businesses, and educators in discovering, customizing, and deploying Solidity smart contract templates.
- Kategori: NFT, DeFi, DAO, Token, Gaming, Marketplace, Governance, dan lainnya
- Interactive Preview: Preview langsung kode contract sebelum deploy
- View Code & Export: Lihat source code lengkap dengan opsi export (Copy, Download, atau IPFS)
- Wallet Connection: Integrasi MetaMask via wagmi/ethers.js
- Multi-Network Support:
- Base Mainnet (Chain ID: 8453)
- Base Sepolia Testnet (Chain ID: 84532)
- Ethereum Mainnet (Chain ID: 1)
- Sepolia Testnet (Chain ID: 11155111)
- Network Switching: Auto-switch network dari deployment panel
- Gas Estimation: Estimasi gas fees sebelum deploy
- Deploy smart contract langsung ke blockchain pilihan
- Real transaction tracking dengan block explorer links
- Contract verification support
- Transaction status monitoring real-time
- Upload contract metadata ke IPFS via Pinata SDK
- Decentralized storage untuk source code dan ABI
- Fallback ke localStorage jika Pinata belum dikonfigurasi
- Permanent, immutable contract storage
Fitur interaktif dengan persistent storage:
- Post pertanyaan dan diskusi
- Share pengetahuan tentang smart contracts
- Activity feed untuk diskusi terbaru
- Upload smart contract template baru
- IPFS-backed storage
- Include metadata: name, category, description, code
- Rate dan review templates (1-5 stars)
- Berikan feedback konstruktif
- View review history
- Showcase deployed contracts
- Include contract address dan network info
- Link ke block explorer
- Share achievements dengan community
SCT by STC
โ
โโโ Frontend (Next.js + React)
โ โโโ UI Components (shadcn/ui)
โ โโโ Wallet Connection (wagmi + ethers.js)
โ โโโ State Management (React Hooks)
โ
โโโ Blockchain Layer
โ โโโ Smart Contract Deployment
โ โโโ Network Switching
โ โโโ Transaction Management
โ โโโ Gas Estimation
โ
โโโ Storage Layer
โ โโโ IPFS (Pinata SDK)
โ โโโ LocalStorage (Fallback)
โ โโโ Community Data Persistence
โ
โโโ Services
โโโ BlockchainService (src/lib/blockchain.ts)
โโโ IPFSService (src/lib/ipfs.ts)
โโโ StorageService (src/lib/storage.ts)
src/
โโโ app/
โ โโโ page.tsx # Main landing page
โ โโโ layout.tsx # Root layout dengan Web3Provider
โ โโโ globals.css # Global styles (neon web3 theme)
โ
โโโ components/
โ โโโ AboutApp.tsx # Tentang aplikasi (Indonesian)
โ โโโ CommunitySection.tsx # Community hub interface
โ โโโ DeploymentPanel.tsx # Blockchain deployment panel
โ โโโ TemplateCard.tsx # Template display card
โ โโโ WalletConnection.tsx # MetaMask connection UI
โ โ
โ โโโ Modals/
โ โ โโโ PreviewTemplateModal.tsx # Interactive preview
โ โ โโโ ViewCodeModal.tsx # Code viewer + export
โ โ โโโ DeployModal.tsx # Deployment interface
โ โ โโโ StartDiscussionModal.tsx # Discussion creator
โ โ โโโ SubmitTemplateModal.tsx # Template uploader
โ โ โโโ ReviewCodeModal.tsx # Review system
โ โ โโโ ShareProjectModal.tsx # Project showcase
โ โ
โ โโโ ui/ # shadcn/ui components
โ
โโโ lib/
โ โโโ blockchain.ts # ๐ฅ Blockchain service (ethers.js)
โ โโโ ipfs.ts # ๐ฅ IPFS storage (Pinata)
โ โโโ storage.ts # ๐ฅ Persistent storage
โ โโโ wagmi-config.ts # Wagmi configuration
โ
โโโ hooks/
โ โโโ useContractDeployment.ts # Deployment logic
โ โโโ useIPFSStorage.ts # IPFS operations
โ โโโ useCommunityStorage.ts # Community data
โ โโโ useSmartContract.ts # Contract interactions
โ
โโโ providers/
โ โโโ Web3Provider.tsx # Web3 context provider
โ
โโโ types/
โโโ template.ts # TypeScript interfaces
User masuk app โ Browse 21+ templates โ Filter by category โ
Preview template โ View code โ Choose: Export or Deploy
Click "Deploy to Blockchain" โ Connect MetaMask โ
Select network (Base/Ethereum/Sepolia) โ Review gas fees โ
Confirm transaction โ Track deployment โ Get contract address โ
View on block explorer
Navigate to Community Hub โ
Choose action:
โโโ Start Discussion (Post question)
โโโ Submit Template (Upload contract + IPFS)
โโโ Review Code (Rate template)
โโโ Share Project (Showcase deployment)
โ Submit โ Data persisted to storage โ Activity feed updated
// Step-by-step deployment process
1. User clicks "Deploy" on template
โ
2. WalletConnection checks MetaMask
โ
3. User selects target network
โ
4. BlockchainService.estimateGas()
โ
5. User confirms with gas estimate
โ
6. BlockchainService.deployContract()
- Compiles Solidity code
- Estimates gas
- Sends transaction
- Waits for confirmation
โ
7. Transaction hash returned
โ
8. IPFSService.uploadMetadata()
- Uploads contract metadata to IPFS
- Returns IPFS hash
โ
9. StorageService.saveDeployment()
- Saves deployment record
โ
10. Success! Display contract address + explorer link// IPFS upload process
1. User submits template/project
โ
2. Prepare metadata object:
{
name, description, code,
abi, bytecode, network,
timestamp, author
}
โ
3. IPFSService.uploadToIPFS()
โ
4. Check Pinata API configuration
โโ If configured: Upload to Pinata
โโ If not: Fallback to localStorage
โ
5. Return IPFS hash (or local reference)
โ
6. Save hash to storage for future retrievalFungsi Utama / Main Functions:
// Initialize provider dengan network
initializeProvider(chainId: number): JsonRpcProvider
// Deploy smart contract
deployContract(
sourceCode: string,
contractName: string,
signer: Signer,
constructorArgs?: any[]
): Promise<{
address: string;
transactionHash: string;
blockNumber: number;
}>
// Estimate gas untuk deployment
estimateGas(
sourceCode: string,
signer: Signer
): Promise<bigint>
// Switch network di MetaMask
switchNetwork(chainId: number): Promise<void>
// Get block explorer URL
getExplorerUrl(
chainId: number,
address: string,
type: 'address' | 'tx'
): stringSupported Networks:
- Base Mainnet:
https://mainnet.base.org - Base Sepolia:
https://sepolia.base.org - Ethereum:
https://eth.llamarpc.com - Sepolia:
https://rpc.sepolia.org
Fungsi Utama / Main Functions:
// Upload contract metadata ke IPFS
uploadToIPFS(metadata: ContractMetadata): Promise<string>
// Retrieve metadata dari IPFS
getFromIPFS(hash: string): Promise<ContractMetadata>
// Check Pinata API configuration
isPinataConfigured(): boolean
// Generate metadata object
generateMetadata(
name: string,
code: string,
network: string,
author?: string
): ContractMetadataMetadata Structure:
{
"name": "Contract Name",
"description": "Description",
"sourceCode": "// Solidity code",
"abi": [...],
"bytecode": "0x...",
"compiler": "0.8.20",
"network": "Base",
"timestamp": 1234567890,
"author": "0x...",
"ipfsHash": "Qm..."
}Fungsi Utama / Main Functions:
// Community discussions
saveDiscussion(discussion: Discussion): void
getDiscussions(): Discussion[]
// Template submissions
saveTemplate(template: Template): void
getTemplates(): Template[]
// Code reviews
saveReview(review: Review): void
getReviews(templateId?: string): Review[]
// Shared projects
saveProject(project: Project): void
getProjects(): Project[]
// Deployments
saveDeployment(deployment: Deployment): void
getDeployments(): Deployment[]Data Persistence:
- Menggunakan
localStorageuntuk browser persistence - Data survive page refresh dan browser restart
- Key prefix:
sct_untuk namespace isolation
--primary: Cyan (#00F0FF) - Main actions
--secondary: Purple (#9D4EDD) - Secondary actions
--accent: Pink (#FF006E) - Highlights
--background: Dark (#0A0A0F) - App background
--foreground: White (#FFFFFF) - Text
--border: Neon Blue (#00F0FF33) - Borders- Headings: Geist (Modern sans-serif)
- Code: Geist Mono (Monospace)
- Body: Default system fonts
- Framework: shadcn/ui
- Icons: Lucide React
- Animations: Tailwind transitions
- Responsive: Mobile-first approach
- Never request private keys
- All transactions require user confirmation
- Clear gas fee display before confirmation
- Network verification before deployment
- Templates provided as-is (user responsibility)
- Recommend audit before mainnet deployment
- Test on testnet first (Sepolia/Base Sepolia)
- Display security warnings for high-value contracts
- No personal data collection
- Wallet addresses only stored locally
- IPFS metadata is public by design
- Community data encrypted in localStorage
โ Environment Variables (Optional for enhanced features):
# Pinata IPFS (Optional - fallback to localStorage if not set)
NEXT_PUBLIC_PINATA_API_KEY=your_api_key
NEXT_PUBLIC_PINATA_SECRET_KEY=your_secret_key
# Blockchain RPC (Optional - uses public RPCs by default)
NEXT_PUBLIC_BASE_RPC=https://mainnet.base.org
NEXT_PUBLIC_SEPOLIA_RPC=https://rpc.sepolia.orgโ Build Verification:
- TypeScript compilation passes
- No ESLint errors
- All imports resolved
- Build completes successfully
โ Functionality Tests:
- Wallet connection works
- Network switching functional
- Template preview displays correctly
- Code export (copy/download) works
- Deployment flow completes
- Community modals save data
- IPFS upload (with fallback)
- Transaction tracking
โ Browser Compatibility:
- Chrome/Edge (Recommended)
- Firefox
- Safari (Limited MetaMask support)
- Brave (Full support)
โ Responsive Design:
- Desktop (1920px+)
- Laptop (1024px-1920px)
- Tablet (768px-1024px)
- Mobile (320px-768px)
1. Menjelajahi Template
- Buka aplikasi โ Lihat 21+ template smart contract
- Filter berdasarkan kategori (NFT, DeFi, DAO, dll)
- Klik "Preview" untuk melihat fungsi contract
- Klik "View Code" untuk melihat source code lengkap
2. Deploy Smart Contract
- Pilih template yang diinginkan
- Klik "Deploy to Blockchain"
- Connect MetaMask wallet
- Pilih network (Base Mainnet untuk produksi, Sepolia untuk testing)
- Review estimasi gas fees
- Confirm transaction di MetaMask
- Tunggu konfirmasi (biasanya 15-30 detik)
- Copy contract address atau view di block explorer
3. Berpartisipasi di Community
- Navigasi ke "Community" tab
- Start Discussion: Post pertanyaan atau tips
- Submit Template: Upload template smart contract milik Anda
- Review Code: Berikan rating dan feedback
- Share Project: Showcase hasil deployment Anda
4. Export Template
- Klik "View Code" pada template
- Pilih export method:
- Copy: Salin ke clipboard
- Download: Download sebagai .sol file
- IPFS: Upload ke IPFS dan dapatkan hash
1. Browse Templates
- Open app โ View 21+ smart contract templates
- Filter by category (NFT, DeFi, DAO, etc.)
- Click "Preview" to see contract functionality
- Click "View Code" to view full source code
2. Deploy Smart Contract
- Select desired template
- Click "Deploy to Blockchain"
- Connect MetaMask wallet
- Choose network (Base Mainnet for production, Sepolia for testing)
- Review gas fee estimate
- Confirm transaction in MetaMask
- Wait for confirmation (typically 15-30 seconds)
- Copy contract address or view on block explorer
3. Community Participation
- Navigate to "Community" tab
- Start Discussion: Post questions or tips
- Submit Template: Upload your own smart contract template
- Review Code: Give ratings and feedback
- Share Project: Showcase your deployments
4. Export Template
- Click "View Code" on template
- Choose export method:
- Copy: Copy to clipboard
- Download: Download as .sol file
- IPFS: Upload to IPFS and get hash
1. MetaMask Not Connecting
Problem: "Connect Wallet" tidak response
Solution:
- Refresh halaman
- Check MetaMask extension terpasang
- Unlock MetaMask wallet
- Coba browser lain (Chrome/Brave recommended)
2. Transaction Failed
Problem: Deployment gagal dengan error
Solution:
- Check saldo ETH/token cukup untuk gas
- Switch ke network yang benar
- Increase gas limit jika perlu
- Coba lagi setelah beberapa menit (network congestion)
3. IPFS Upload Failed
Problem: Template tidak tersimpan ke IPFS
Solution:
- Check Pinata API keys di environment variables
- Fallback: Data tersimpan di localStorage
- Verify internet connection
- File size < 10MB
4. Network Switch Failed
Problem: Tidak bisa ganti network
Solution:
- Ganti network manual di MetaMask
- Ensure network sudah ditambahkan di MetaMask
- Untuk Base: Tambahkan via Chainlist.org
5. Template Not Displaying
Problem: Template cards kosong
Solution:
- Hard refresh (Ctrl+Shift+R)
- Clear browser cache
- Check console untuk errors
- Verify JavaScript enabled
- Template versioning system
- Contract testing sandbox
- Multi-sig deployment support
- Gas optimization analyzer
- Template marketplace (buy/sell)
- User profiles with reputation
- Template favorites/bookmarks
- Follow other developers
- Notifications system
- Collaboration tools
- Built-in Solidity editor
- Contract testing framework
- Automated security scanning
- CI/CD integration
- SDK for programmatic access
- Private template repositories
- Team collaboration spaces
- Custom branding options
- SLA guarantees
- Dedicated support
- Website: https://smartourism.elpeef.com
- Email: support@elpeef.com
- Documentation: This file
- Start discussion di Community Hub
- Share your deployments
- Submit templates for review
- Check Troubleshooting section above
- Review console errors (F12)
- Test on different browsers
- Verify MetaMask setup
- Framework: Next.js 15+ (React 19)
- Blockchain: ethers.js v6, wagmi
- Storage: Pinata SDK (IPFS)
- UI: shadcn/ui, Tailwind CSS
- Icons: Lucide React
- Templates provided as educational resources
- Use at your own risk
- Audit before mainnet deployment
- No warranty or liability
- Built by: STC (Smart Tourism Chain) Ecosystem
- Platform: SCT by STC
- Version: 1.0.0
- Last Updated: 2025-08-10