Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The frontend uses `frontendSnapshotV3()`, `claimRelic(bool)` and `equipOwnedReli
| Environment | Status | Scope |
| --- | --- | --- |
| RISE Testnet | Public beta | Current wallet-connected deployment and frontend integration. |
| Somnia Shannon Testnet | Verified opt-in deployment | Delveworn [`0x07c5…c292`](https://shannon-explorer.somnia.network/address/0x07c5D071132ae95C3708031790b3feC740F4c292) uses a native VRF adapter and Somnia's coordinator-funded Reactivity/drand flow. A live monster request completed with `callbackSuccess=true`; the public frontend remains on RISE unless explicitly configured otherwise. Standard MetaMask play is live, while Thirdweb ERC-4337 Instant Play is implemented behind a disabled-by-default feature flag pending sponsored-gas configuration and live QA. |
| Somnia Shannon Testnet | Verified opt-in deployment | Delveworn [`0x07c5…c292`](https://shannon-explorer.somnia.network/address/0x07c5D071132ae95C3708031790b3feC740F4c292) uses a native VRF adapter and Somnia's coordinator-funded Reactivity/drand flow. A live monster request completed with `callbackSuccess=true`; the public frontend remains on RISE unless explicitly configured otherwise. Standard MetaMask play is live, while Thirdweb ERC-4337 Popup-free Play is available behind a deployment feature flag. It removes repeated wallet approvals but still waits for bundling, block inclusion and verified randomness. |
| Local Anvil | Development only | Deterministic contract, relic, balance and request/callback testing through `DevRandomnessAdapter`. |
| Chainlink VRF v2.5 adapter | Implemented and test-covered | Adapter support exists, but no public deployment is presented as production-ready. |
| Other EVM networks | Architecture target | The core is designed for adapter-based deployments; these networks are not yet advertised as supported public deployments. |
Expand Down Expand Up @@ -248,7 +248,7 @@ NEXT_PUBLIC_DEPLOYMENT=somniaShannon
NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS=0x07c5D071132ae95C3708031790b3feC740F4c292
```

The optional Somnia Instant Play prototype additionally requires:
The optional Somnia Popup-free Play session additionally requires:

```text
NEXT_PUBLIC_SOMNIA_SESSION_KEYS_ENABLED=true
Expand Down
1 change: 1 addition & 0 deletions frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NEXT_PUBLIC_RISE_TESTNET_EXPLORER_URL=https://explorer.testnet.riselabs.xyz
# The public RISE deployment remains the default.
NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS=0x07c5D071132ae95C3708031790b3feC740F4c292
NEXT_PUBLIC_SOMNIA_SHANNON_RPC_URL=https://dream-rpc.somnia.network/
NEXT_PUBLIC_SOMNIA_SHANNON_WS_URL=wss://dream-rpc.somnia.network/ws
NEXT_PUBLIC_SOMNIA_SHANNON_EXPLORER_URL=https://shannon-explorer.somnia.network/

# Optional Somnia ERC-4337 Instant Play prototype. Keep disabled until the
Expand Down
20 changes: 18 additions & 2 deletions frontend/app/chain-clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,28 @@ export function createActivePublicClient() {
}

export function createActiveWebSocketClient() {
if (!activeDeployment.wsUrl) {
if (
!activeDeployment.realtime.websocket ||
activeDeployment.realtime.shreds ||
!activeDeployment.wsUrl
) {
return null;
}

return createPublicClient({
chain: activeDeployment.chain,
transport: webSocket(activeDeployment.wsUrl),
cacheTime: 0,
transport: webSocket(activeDeployment.wsUrl, {
keepAlive: {
interval: 5_000,
},
reconnect: {
attempts: 100,
delay: 500,
},
retryCount: 5,
retryDelay: 100,
timeout: 15_000,
}),
});
}
5 changes: 4 additions & 1 deletion frontend/app/chain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,9 @@ export const deployments = {
rpcUrl:
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_RPC_URL ??
"https://dream-rpc.somnia.network/",
wsUrl:
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_WS_URL ??
"wss://dream-rpc.somnia.network/ws",
explorerUrl:
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_EXPLORER_URL ??
"https://shannon-explorer.somnia.network/",
Expand All @@ -246,7 +249,7 @@ export const deployments = {
: null,
},
realtime: {
websocket: false,
websocket: true,
shreds: false,
},
randomness: {
Expand Down
47 changes: 47 additions & 0 deletions frontend/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,53 @@ body {
font-family: Arial, Helvetica, sans-serif;
}

@keyframes combat-intent-attack {
0%, 100% { transform: rotate(-7deg) translateY(0); }
45% { transform: rotate(13deg) translateY(-3px); }
}

@keyframes combat-intent-storm {
0%, 100% { filter: brightness(1); transform: scale(.96); }
50% { filter: brightness(1.45); transform: scale(1.08); }
}

@keyframes combat-intent-potion {
0%, 100% { transform: rotate(-4deg) translateY(1px); }
50% { transform: rotate(6deg) translateY(-4px); }
}

@keyframes combat-intent-enter {
0%, 100% { filter: brightness(.9); transform: scale(.96); }
50% { filter: brightness(1.2); transform: scale(1.04); }
}

.combat-intent-attack {
animation: combat-intent-attack 1.15s ease-in-out infinite;
}

.combat-intent-storm {
animation: combat-intent-storm .9s ease-in-out infinite;
}

.combat-intent-potion {
animation: combat-intent-potion 1.2s ease-in-out infinite;
}

.combat-intent-enter,
.combat-intent-random {
animation: combat-intent-enter 1.35s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
.combat-intent-attack,
.combat-intent-storm,
.combat-intent-potion,
.combat-intent-enter,
.combat-intent-random {
animation: none;
}
}

.delveworn-practice-mode {
--delveworn-mode-accent: #22d3ee;
--delveworn-mode-accent-soft: rgba(34, 211, 238, .12);
Expand Down
8 changes: 7 additions & 1 deletion frontend/app/page-runtime-bindings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { activeDeployment } from "./chain-config";
import { createActivePublicClient } from "./chain-clients";
import {
createActivePublicClient,
createActiveWebSocketClient,
} from "./chain-clients";
import { wagmiConfig } from "./wagmi-runtime";
import { ensureActiveChain } from "./wallet-network";
import {
Expand Down Expand Up @@ -71,6 +74,9 @@ export const ACTIVE_CHAIN_ID =
export const publicClient =
createActivePublicClient();

export const eventWebSocketClient =
createActiveWebSocketClient();

export {
ACTIVE_ECOSYSTEM_NAME,
ACTIVE_NETWORK_LABEL,
Expand Down
Loading
Loading