A Blazor Server web application for browsing and testing Qubic smart contract functions interactively.
- Auto-discovery of all generated contract bindings via reflection
- Three query backends: RPC, Bob (JSON-RPC), and Direct Network (TCP)
- Dynamic form generation for function inputs based on struct metadata
- Smart input handling:
- 60-character Qubic identity strings are auto-converted to 32-byte public keys for
byte[]fields - Asset name fields (
ulong) accept text likeQX,CFB,QUTILand encode them automatically
- 60-character Qubic identity strings are auto-converted to 32-byte public keys for
- Per-field "Show Text" toggle for
byte[]output values (hex vs ASCII) - Tabular display for
Array<T,N>output fields with sortable columns - Connection test button on the home page (calls
Qutil.GetFeesas a smoke test)
dotnet run --project tools/Qubic.ScTesterThe app picks a random available port and opens your browser automatically. The URL is printed to the console.
| Backend | Protocol | Default Endpoint | Description |
|---|---|---|---|
| RPC | HTTP/JSON | https://rpc.qubic.org |
Official Qubic RPC API (base64-encoded payloads) |
| Bob | JSON-RPC 2.0 | https://bob.qubic.li |
QubicBob node with async nonce-based polling (hex-encoded payloads) |
| Direct Network | TCP | corenet.qubic.li:21841 |
Raw Qubic P2P protocol (binary RequestContractFunction type 42) |
Switch backends from the navbar dropdown or the home page radio buttons. The URL / host:port is editable inline.
- .NET 8.0 SDK
- Generated contract bindings (run
Qubic.ContractGenfirst if theContracts/Generated/folder is empty)
Build self-contained binaries for distribution:
# Windows
dotnet publish tools/Qubic.ScTester -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -o publish/win-x64
# Linux
dotnet publish tools/Qubic.ScTester -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -o publish/linux-x64
# macOS (Apple Silicon)
dotnet publish tools/Qubic.ScTester -c Release -r osx-arm64 --self-contained -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -o publish/osx-arm64
# macOS (Intel)
dotnet publish tools/Qubic.ScTester -c Release -r osx-x64 --self-contained -p:PublishSingleFile=true -p:EnableCompressionInSingleFile=true -o publish/osx-x64Windows: Double-click Qubic.ScTester.exe or run it from a terminal.
Linux:
chmod +x Qubic.ScTester
./Qubic.ScTestermacOS: If cross-compiled from another OS, you need to codesign and remove quarantine before running:
chmod +x Qubic.ScTester
codesign --force --deep -s - Qubic.ScTester
xattr -d com.apple.quarantine Qubic.ScTester
./Qubic.ScTesterQubic.ScTester/
Program.cs # Host setup, DI registration
ScQueryService.cs # Backend abstraction (RPC / Bob / TCP)
ContractDiscovery.cs # Reflection-based contract discovery
Components/
App.razor # Root component
Layout/
MainLayout.razor # Navbar with backend selector
NavMenu.razor # Sidebar contract list
Pages/
Home.razor # Dashboard with connection settings
ContractPage.razor # Contract detail: forms, queries, results
SmokeTest.razor # Quick connectivity check
Qubic.Core- Contract models and identity handlingQubic.Rpc- HTTP RPC clientQubic.Bob- JSON-RPC clientQubic.Crypto- Cryptographic primitivesQubic.Network- Direct TCP node client