Post
Share your knowledge.
Build Walrus dashboard
I found the post from https://x.com/Reset_sui/status/1944003777457271197
Made a Walrus dashboard showing: -Storage/write costs per epoch/day/year (GB/TB) -Daily/yearly revenue & storage node payouts -USD conversions to compare with other providers
Link: http://walytics.wal.app
Link
- Sui
Answers
2I'm using the TypeScript SDK (@mysten/walrus) on testnet and running into this error when I try to upload a file with writeBlob():
NotEnoughBlobConfirmationsError: Too many failures while writing blob H1JLtHA4... to nodes
just wondering are the testnet storage nodes down or flaky right now? or am I missing something dumb on my end?
✅ GitHub-Ready Starter Template: Walrus Dashboard
Tech Stack:
- React + Vite (faster than CRA)
- Tailwind CSS for styling
@mysten/sui.js
for Sui RPC and wallet- Recharts for charts
- Zustand for state management
Folder Structure:
walrus-dashboard/
├── public/
├── src/
│ ├── components/
│ │ ├── WalletConnect.tsx
│ │ ├── ProtocolStats.tsx
│ │ ├── MyPositions.tsx
│ │ └── Chart.tsx
│ ├── state/
│ │ └── useSuiStore.ts
│ ├── App.tsx
│ └── main.tsx
├── index.html
├── tailwind.config.js
└── vite.config.ts
1. WalletConnect.tsx
import { useWallet } from '@mysten/wallet-kit';
export default function WalletConnect() {
const { connect, disconnect, connected, currentAccount } = useWallet();
return (
<div className="p-4">
{connected ? (
<div>
<p>Connected: {currentAccount?.address.slice(0, 10)}...</p>
<button onClick={disconnect} className="bg-red-500 p-2 text-white">Disconnect</button>
</div>
) : (
<button onClick={() => connect()} className="bg-blue-500 p-2 text-white">Connect Wallet</button>
)}
</div>
);
}
2. ProtocolStats.tsx
import { useEffect, useState } from 'react';
import { SuiClient } from '@mysten/sui.js/client';
const client = new SuiClient({ url: 'https://fullnode.testnet.sui.io' });
export default function ProtocolStats() {
const [tvl, setTvl] = useState(0);
useEffect(() => {
async function fetchTVL() {
// Replace with real on-chain object ID
const obj = await client.getObject({
id: '0x...vault_id',
options: { showContent: true }
});
const balance = parseInt(obj.data.content.fields.total_deposits);
setTvl(balance / 1e9); // assuming 9 decimals
}
fetchTVL();
}, []);
return (
<div className="bg-white shadow p-4 rounded">
<h2 className="text-xl font-semibold">Protocol TVL</h2>
<p className="text-3xl">${tvl.toLocaleString()}</p>
</div>
);
}
3. main.tsx
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './index.css';
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<App />
</React.StrictMode>,
);
4. App.tsx
import WalletConnect from './components/WalletConnect';
import ProtocolStats from './components/ProtocolStats';
function App() {
return (
<div className="min-h-screen bg-gray-100 p-6">
<WalletConnect />
<div className="mt-8">
<ProtocolStats />
</div>
</div>
);
}
export default App;
5. Tailwind Setup
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Then update tailwind.config.js
and index.css
accordingly.
Next Features You Can Add:
- Pull user’s deposits and loans (MyPositions.tsx)
- Add TVL chart with Recharts
- Add liquidation alerts
- Simulate
sui move call
from frontend usingSuiClient
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- Why does BCS require exact field order for deserialization when Move structs have named fields?53
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution43
- Sui Transaction Failing: Objects Reserved for Another Transaction25
- How do ability constraints interact with dynamic fields in heterogeneous collections?05