|
|
|
|
|
// Enhanced website script for Solana PoWH3D
|
|
|
|
|
|
// Add this to the existing website to showcase Solana advantages
|
|
|
|
|
|
|
|
|
|
|
|
// Current network prices (update periodically)
|
|
|
|
|
|
const NETWORK_PRICES = {
|
|
|
|
|
|
ETH: 4553,
|
|
|
|
|
|
BNB: 1163,
|
|
|
|
|
|
SOL: 245
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Network comparison data
|
|
|
|
|
|
const NETWORKS = {
|
|
|
|
|
|
ethereum: {
|
|
|
|
|
|
name: "Ethereum",
|
|
|
|
|
|
symbol: "ETH",
|
|
|
|
|
|
price: NETWORK_PRICES.ETH,
|
|
|
|
|
|
deploymentCost: 350,
|
|
|
|
|
|
txCost: { min: 15, max: 50 },
|
|
|
|
|
|
speed: "15+ seconds",
|
|
|
|
|
|
tps: 15,
|
|
|
|
|
|
breakeven: 8080,
|
|
|
|
|
|
timeToProfit: "1-4 weeks",
|
|
|
|
|
|
minInvestment: 50,
|
|
|
|
|
|
color: "#627EEA"
|
|
|
|
|
|
},
|
|
|
|
|
|
bsc: {
|
|
|
|
|
|
name: "Binance Smart Chain",
|
|
|
|
|
|
symbol: "BNB",
|
|
|
|
|
|
price: NETWORK_PRICES.BNB,
|
|
|
|
|
|
deploymentCost: 35,
|
|
|
|
|
|
txCost: { min: 0.20, max: 1.00 },
|
|
|
|
|
|
speed: "3-5 seconds",
|
|
|
|
|
|
tps: 100,
|
|
|
|
|
|
breakeven: 1773,
|
|
|
|
|
|
timeToProfit: "1-7 days",
|
|
|
|
|
|
minInvestment: 10,
|
|
|
|
|
|
color: "#F3BA2F"
|
|
|
|
|
|
},
|
|
|
|
|
|
solana: {
|
|
|
|
|
|
name: "Solana",
|
|
|
|
|
|
symbol: "SOL",
|
|
|
|
|
|
price: NETWORK_PRICES.SOL,
|
|
|
|
|
|
deploymentCost: 5,
|
|
|
|
|
|
txCost: { min: 0.001, max: 0.002 },
|
|
|
|
|
|
speed: "400ms",
|
|
|
|
|
|
tps: 65000,
|
|
|
|
|
|
breakeven: 150,
|
|
|
|
|
|
timeToProfit: "1-3 hours",
|
|
|
|
|
|
minInvestment: 1,
|
|
|
|
|
|
color: "#9945FF"
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Add Solana section to existing calculator
|
|
|
|
|
|
function addSolanaSection() {
|
|
|
|
|
|
const existingCalculator = document.querySelector('.cost-calculator');
|
|
|
|
|
|
if (!existingCalculator) return;
|
|
|
|
|
|
|
|
|
|
|
|
// Create enhanced comparison section
|
|
|
|
|
|
const solanaSection = document.createElement('div');
|
|
|
|
|
|
solanaSection.className = 'solana-comparison';
|
|
|
|
|
|
solanaSection.innerHTML = `
|
|
|
|
|
|
<div class="network-hero">
|
|
|
|
|
|
<h2>🚀 Solana: The Superior Choice for PoWH3D</h2>
|
|
|
|
|
|
<div class="hero-stats">
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-number">1000x</span>
|
|
|
|
|
|
<span class="stat-label">Cheaper Transactions</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-number">40x</span>
|
|
|
|
|
|
<span class="stat-label">Faster Confirmation</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-number">4333x</span>
|
|
|
|
|
|
<span class="stat-label">Higher Throughput</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-number">50x</span>
|
|
|
|
|
|
<span class="stat-label">Lower Minimum</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="network-comparison-grid">
|
|
|
|
|
|
<div class="comparison-table">
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th>Feature</th>
|
|
|
|
|
|
<th class="ethereum-col">Ethereum</th>
|
|
|
|
|
|
<th class="bsc-col">BSC</th>
|
|
|
|
|
|
<th class="solana-col highlight">Solana</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Transaction Cost</td>
|
|
|
|
|
|
<td class="ethereum-col">$15-50</td>
|
|
|
|
|
|
<td class="bsc-col">$0.20-1.00</td>
|
|
|
|
|
|
<td class="solana-col highlight">$0.001</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Confirmation Time</td>
|
|
|
|
|
|
<td class="ethereum-col">15+ seconds</td>
|
|
|
|
|
|
<td class="bsc-col">3-5 seconds</td>
|
|
|
|
|
|
<td class="solana-col highlight">400ms</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Deployment Cost</td>
|
|
|
|
|
|
<td class="ethereum-col">$350-700</td>
|
|
|
|
|
|
<td class="bsc-col">$35-60</td>
|
|
|
|
|
|
<td class="solana-col highlight">$5-10</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Break-even Volume</td>
|
|
|
|
|
|
<td class="ethereum-col">$8,080</td>
|
|
|
|
|
|
<td class="bsc-col">$1,773</td>
|
|
|
|
|
|
<td class="solana-col highlight">$150</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Time to Profit</td>
|
|
|
|
|
|
<td class="ethereum-col">1-4 weeks</td>
|
|
|
|
|
|
<td class="bsc-col">1-7 days</td>
|
|
|
|
|
|
<td class="solana-col highlight">1-3 hours</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Minimum Investment</td>
|
|
|
|
|
|
<td class="ethereum-col">$50+</td>
|
|
|
|
|
|
<td class="bsc-col">$10+</td>
|
|
|
|
|
|
<td class="solana-col highlight">$1+</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="roi-projections">
|
|
|
|
|
|
<h3>📈 Enhanced ROI Calculator - Solana Edition</h3>
|
|
|
|
|
|
<div class="calculator-inputs">
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<label>Network:</label>
|
|
|
|
|
|
<select id="networkSelect">
|
|
|
|
|
|
<option value="ethereum">Ethereum</option>
|
|
|
|
|
|
<option value="bsc">Binance Smart Chain</option>
|
|
|
|
|
|
<option value="solana" selected>Solana (Recommended)</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<label>Initial Investment:</label>
|
|
|
|
|
|
<input type="number" id="investment" value="100" min="1" max="10000">
|
|
|
|
|
|
<span>USD</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<label>Expected Users:</label>
|
|
|
|
|
|
<input type="number" id="expectedUsers" value="1000" min="10" max="100000">
|
|
|
|
|
|
<span>participants</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<label>Timeframe:</label>
|
|
|
|
|
|
<select id="timeframe">
|
|
|
|
|
|
<option value="1">1 week</option>
|
|
|
|
|
|
<option value="4" selected>1 month</option>
|
|
|
|
|
|
<option value="12">3 months</option>
|
|
|
|
|
|
<option value="52">1 year</option>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="calculator-results" id="calculatorResults">
|
|
|
|
|
|
<!-- Results will be populated by JavaScript -->
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="solana-advantages">
|
|
|
|
|
|
<h3>🎯 Why Choose Solana?</h3>
|
|
|
|
|
|
<div class="advantages-grid">
|
|
|
|
|
|
<div class="advantage-card">
|
|
|
|
|
|
<div class="advantage-icon">💸</div>
|
|
|
|
|
|
<h4>Micro-Transactions Enabled</h4>
|
|
|
|
|
|
<p>$1 investments are profitable vs $50+ minimum on Ethereum. True global accessibility.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="advantage-card">
|
|
|
|
|
|
<div class="advantage-icon">⚡</div>
|
|
|
|
|
|
<h4>Real-Time Activity</h4>
|
|
|
|
|
|
<p>Sub-second confirmations enable active trading and instant dividend distributions.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="advantage-card">
|
|
|
|
|
|
<div class="advantage-icon">🌍</div>
|
|
|
|
|
|
<h4>No Congestion</h4>
|
|
|
|
|
|
<p>65,000 TPS capacity means your transactions never get stuck in mempool hell.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="advantage-card">
|
|
|
|
|
|
<div class="advantage-icon">📱</div>
|
|
|
|
|
|
<h4>Mobile Optimized</h4>
|
|
|
|
|
|
<p>Perfect for mobile users with predictable, tiny fees and instant confirmations.</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
existingCalculator.after(solanaSection);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Enhanced ROI calculation with network-specific factors
|
|
|
|
|
|
function calculateEnhancedROI(network, investment, users, timeframe) {
|
|
|
|
|
|
const net = NETWORKS[network];
|
|
|
|
|
|
|
|
|
|
|
|
// Transaction frequency based on network costs
|
|
|
|
|
|
const txFrequencyMultiplier = {
|
|
|
|
|
|
ethereum: 1, // Expensive, less frequent
|
|
|
|
|
|
bsc: 5, // Moderate, decent frequency
|
|
|
|
|
|
solana: 20 // Cheap, very frequent
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const frequency = txFrequencyMultiplier[network];
|
|
|
|
|
|
const totalTxs = users * frequency * timeframe;
|
|
|
|
|
|
|
|
|
|
|
|
// Revenue calculation
|
|
|
|
|
|
const avgInvestment = investment;
|
|
|
|
|
|
const totalVolume = totalTxs * avgInvestment;
|
|
|
|
|
|
const feeRevenue = totalVolume * 0.035; // 3.5% total fees
|
|
|
|
|
|
|
|
|
|
|
|
// Cost calculation
|
|
|
|
|
|
const deploymentCost = net.deploymentCost;
|
|
|
|
|
|
const txCosts = totalTxs * net.txCost.max; // Use max for conservative estimate
|
|
|
|
|
|
const totalCosts = deploymentCost + txCosts;
|
|
|
|
|
|
|
|
|
|
|
|
// ROI calculation
|
|
|
|
|
|
const profit = feeRevenue - totalCosts;
|
|
|
|
|
|
const roi = (profit / investment) * 100;
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
network: net.name,
|
|
|
|
|
|
investment,
|
|
|
|
|
|
users,
|
|
|
|
|
|
timeframe,
|
|
|
|
|
|
deploymentCost,
|
|
|
|
|
|
txCosts,
|
|
|
|
|
|
totalCosts,
|
|
|
|
|
|
totalVolume,
|
|
|
|
|
|
feeRevenue,
|
|
|
|
|
|
profit,
|
|
|
|
|
|
roi,
|
|
|
|
|
|
breakEvenTime: Math.ceil(net.breakeven / (feeRevenue / timeframe))
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Update calculator results
|
|
|
|
|
|
function updateCalculatorResults() {
|
|
|
|
|
|
const network = document.getElementById('networkSelect')?.value || 'solana';
|
|
|
|
|
|
const investment = parseFloat(document.getElementById('investment')?.value) || 100;
|
|
|
|
|
|
const users = parseInt(document.getElementById('expectedUsers')?.value) || 1000;
|
|
|
|
|
|
const timeframe = parseInt(document.getElementById('timeframe')?.value) || 4;
|
|
|
|
|
|
|
|
|
|
|
|
const results = calculateEnhancedROI(network, investment, users, timeframe);
|
|
|
|
|
|
const resultsContainer = document.getElementById('calculatorResults');
|
|
|
|
|
|
|
|
|
|
|
|
if (!resultsContainer) return;
|
|
|
|
|
|
|
|
|
|
|
|
const isPositive = results.profit > 0;
|
|
|
|
|
|
const profitClass = isPositive ? 'profit-positive' : 'profit-negative';
|
|
|
|
|
|
|
|
|
|
|
|
resultsContainer.innerHTML = `
|
|
|
|
|
|
<div class="results-grid">
|
|
|
|
|
|
<div class="result-card">
|
|
|
|
|
|
<h4>💰 Investment Analysis</h4>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Initial Investment:</span>
|
|
|
|
|
|
<span>$${investment.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Deployment Cost:</span>
|
|
|
|
|
|
<span>$${results.deploymentCost.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Transaction Costs:</span>
|
|
|
|
|
|
<span>$${results.txCosts.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line total">
|
|
|
|
|
|
<span>Total Costs:</span>
|
|
|
|
|
|
<span>$${results.totalCosts.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="result-card">
|
|
|
|
|
|
<h4>📊 Revenue Projection</h4>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Expected Volume:</span>
|
|
|
|
|
|
<span>$${results.totalVolume.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Fee Revenue (3.5%):</span>
|
|
|
|
|
|
<span>$${results.feeRevenue.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line ${profitClass}">
|
|
|
|
|
|
<span>Net Profit:</span>
|
|
|
|
|
|
<span>$${results.profit.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line total">
|
|
|
|
|
|
<span>ROI:</span>
|
|
|
|
|
|
<span class="${profitClass}">${results.roi.toFixed(1)}%</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="result-card highlight-${network}">
|
|
|
|
|
|
<h4>⏱️ Timeline</h4>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Network:</span>
|
|
|
|
|
|
<span>${results.network}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Timeframe:</span>
|
|
|
|
|
|
<span>${timeframe} weeks</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Break-even:</span>
|
|
|
|
|
|
<span>${results.breakEvenTime} weeks</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="result-line">
|
|
|
|
|
|
<span>Expected Users:</span>
|
|
|
|
|
|
<span>${users.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
${network === 'solana' ? `
|
|
|
|
|
|
<div class="solana-callout">
|
|
|
|
|
|
<h4>🚀 Solana Advantage</h4>
|
|
|
|
|
|
<p>With Solana's ultra-low fees, your break-even point is ${Math.round((results.breakEvenTime / 4) * 100)}% faster than Ethereum,
|
|
|
|
|
|
and ${Math.round((results.breakEvenTime / 2) * 100)}% faster than BSC.
|
|
|
|
|
|
Every $1 invested can generate meaningful returns!</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
` : ''}
|
|
|
|
|
|
`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Add event listeners
|
|
|
|
|
|
function attachCalculatorEvents() {
|
|
|
|
|
|
const inputs = ['networkSelect', 'investment', 'expectedUsers', 'timeframe'];
|
|
|
|
|
|
inputs.forEach(id => {
|
|
|
|
|
|
const element = document.getElementById(id);
|
|
|
|
|
|
if (element) {
|
|
|
|
|
|
element.addEventListener('change', updateCalculatorResults);
|
|
|
|
|
|
element.addEventListener('input', updateCalculatorResults);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Add live network stats
|
|
|
|
|
|
function addLiveNetworkStats() {
|
|
|
|
|
|
const statsContainer = document.createElement('div');
|
|
|
|
|
|
statsContainer.className = 'live-network-stats';
|
|
|
|
|
|
statsContainer.innerHTML = `
|
|
|
|
|
|
<div class="stats-header">
|
|
|
|
|
|
<h3>📡 Live Network Statistics</h3>
|
|
|
|
|
|
<button id="refreshStats">🔄 Refresh</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stats-grid">
|
|
|
|
|
|
<div class="stat-card ethereum">
|
|
|
|
|
|
<h4>Ethereum</h4>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Price:</span>
|
|
|
|
|
|
<span class="stat-value">$${NETWORK_PRICES.ETH.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Gas Price:</span>
|
|
|
|
|
|
<span class="stat-value" id="ethGasPrice">Loading...</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">TPS:</span>
|
|
|
|
|
|
<span class="stat-value">~15</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="stat-card bsc">
|
|
|
|
|
|
<h4>BSC</h4>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Price:</span>
|
|
|
|
|
|
<span class="stat-value">$${NETWORK_PRICES.BNB.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Gas Price:</span>
|
|
|
|
|
|
<span class="stat-value">~5 gwei</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">TPS:</span>
|
|
|
|
|
|
<span class="stat-value">~100</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="stat-card solana highlight">
|
|
|
|
|
|
<h4>Solana 🔥</h4>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Price:</span>
|
|
|
|
|
|
<span class="stat-value">$${NETWORK_PRICES.SOL.toLocaleString()}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">Fee:</span>
|
|
|
|
|
|
<span class="stat-value">0.000005 SOL</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="stat-item">
|
|
|
|
|
|
<span class="stat-label">TPS:</span>
|
|
|
|
|
|
<span class="stat-value" id="solanaTPS">Loading...</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
document.body.appendChild(statsContainer);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Mock function to simulate live data (replace with real API calls)
|
|
|
|
|
|
function updateLiveStats() {
|
|
|
|
|
|
// Simulate Solana TPS (normally would fetch from API)
|
|
|
|
|
|
const solanaTPS = Math.floor(Math.random() * 3000) + 2000;
|
|
|
|
|
|
const tpsElement = document.getElementById('solanaTPS');
|
|
|
|
|
|
if (tpsElement) {
|
|
|
|
|
|
tpsElement.textContent = `${solanaTPS.toLocaleString()}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Simulate Ethereum gas price
|
|
|
|
|
|
const ethGas = Math.floor(Math.random() * 50) + 20;
|
|
|
|
|
|
const gasElement = document.getElementById('ethGasPrice');
|
|
|
|
|
|
if (gasElement) {
|
|
|
|
|
|
gasElement.textContent = `${ethGas} gwei`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Add CSS for new components
|
|
|
|
|
|
function addSolanaStyles() {
|
|
|
|
|
|
// Add Temple OS analytics if not already present
|
|
|
|
|
|
if (!document.querySelector('script[data-website-id="92b291cb-15b7-423b-863a-129d4688aaf3"]')) {
|
|
|
|
|
|
const analyticsScript = document.createElement('script');
|
|
|
|
|
|
analyticsScript.defer = true;
|
|
|
|
|
|
analyticsScript.src = 'https://analytics.temple-os.com/script.js';
|
|
|
|
|
|
analyticsScript.setAttribute('data-website-id', '92b291cb-15b7-423b-863a-129d4688aaf3');
|
|
|
|
|
|
document.head.appendChild(analyticsScript);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const styles = `
|
|
|
|
|
|
<style>
|
|
|
|
|
|
.solana-comparison {
|
|
|
|
|
|
margin: 2rem 0;
|
|
|
|
|
|
background: linear-gradient(135deg, #1a1a2e, #16213e);
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
padding: 2rem;
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.network-hero {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
margin-bottom: 3rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.hero-stats {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
margin-top: 2rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.stat-item {
|
|
|
|
|
|
background: rgba(255,255,255,0.1);
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.stat-number {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #9945FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comparison-table table {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
border-collapse: collapse;
|
|
|
|
|
|
margin: 1rem 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comparison-table th,
|
|
|
|
|
|
.comparison-table td {
|
|
|
|
|
|
padding: 0.8rem;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
border: 1px solid rgba(255,255,255,0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.solana-col.highlight {
|
|
|
|
|
|
background: rgba(153, 69, 255, 0.2);
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.ethereum-col { color: #627EEA; }
|
|
|
|
|
|
.bsc-col { color: #F3BA2F; }
|
|
|
|
|
|
.solana-col { color: #9945FF; }
|
|
|
|
|
|
|
|
|
|
|
|
.advantages-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.advantage-card {
|
|
|
|
|
|
background: rgba(255,255,255,0.1);
|
|
|
|
|
|
padding: 1.5rem;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.advantage-icon {
|
|
|
|
|
|
font-size: 2rem;
|
|
|
|
|
|
margin-bottom: 0.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.calculator-inputs {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
margin: 1rem 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.input-group {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
gap: 0.5rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.input-group input,
|
|
|
|
|
|
.input-group select {
|
|
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.results-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-card {
|
|
|
|
|
|
background: rgba(255,255,255,0.1);
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-line {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
padding: 0.3rem 0;
|
|
|
|
|
|
border-bottom: 1px solid rgba(255,255,255,0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.result-line.total {
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 1.1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.profit-positive {
|
|
|
|
|
|
color: #4CAF50;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.profit-negative {
|
|
|
|
|
|
color: #f44336;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.solana-callout {
|
|
|
|
|
|
background: rgba(153, 69, 255, 0.2);
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
margin-top: 1rem;
|
|
|
|
|
|
border-left: 4px solid #9945FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.live-network-stats {
|
|
|
|
|
|
background: #f8f9fa;
|
|
|
|
|
|
padding: 2rem;
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
margin: 2rem 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.stats-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.stat-card {
|
|
|
|
|
|
background: white;
|
|
|
|
|
|
padding: 1rem;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.stat-card.highlight {
|
|
|
|
|
|
background: linear-gradient(135deg, #9945FF, #7B2CBF);
|
|
|
|
|
|
color: white;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
|
.hero-stats {
|
|
|
|
|
|
grid-template-columns: repeat(2, 1fr);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.comparison-table {
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.advantages-grid {
|
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
|
|
document.head.insertAdjacentHTML('beforeend', styles);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Initialize everything when DOM is loaded
|
|
|
|
|
|
function initializeSolanaFeatures() {
|
|
|
|
|
|
addSolanaStyles();
|
|
|
|
|
|
addSolanaSection();
|
|
|
|
|
|
addLiveNetworkStats();
|
|
|
|
|
|
attachCalculatorEvents();
|
|
|
|
|
|
updateCalculatorResults();
|
|
|
|
|
|
updateLiveStats();
|
|
|
|
|
|
|
|
|
|
|
|
// Update live stats every 30 seconds
|
|
|
|
|
|
setInterval(updateLiveStats, 30000);
|
|
|
|
|
|
|
|
|
|
|
|
// Add refresh button functionality
|
|
|
|
|
|
document.getElementById('refreshStats')?.addEventListener('click', updateLiveStats);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Auto-initialize if DOM is ready, otherwise wait for it
|
|
|
|
|
|
if (document.readyState === 'loading') {
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', initializeSolanaFeatures);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
initializeSolanaFeatures();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Export for manual initialization if needed
|
|
|
|
|
|
window.initializeSolanaFeatures = initializeSolanaFeatures;
|