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
10 changes: 9 additions & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ on:

jobs:
check:
name: Next.js checks
name: Next.js checks (${{ matrix.deployment }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
deployment:
- riseTestnet
- somniaShannon
permissions:
contents: read
defaults:
Expand All @@ -43,5 +49,7 @@ jobs:

- name: Build frontend
env:
NEXT_PUBLIC_DEPLOYMENT: ${{ matrix.deployment }}
NEXT_PUBLIC_RISE_TESTNET_DUNGEON_ADDRESS: "0x0000000000000000000000000000000000000001"
NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS: "0x07c5D071132ae95C3708031790b3feC740F4c292"
run: npm run build
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Practice Mode is not onchain, does not persist authoritative state and does not

Onchain Mode connects a wallet to a configured deployment. Player state and game actions are handled by the deployed `Delveworn` contract, and randomness-backed actions resolve through the configured provider and callback adapter.

Onchain Mode depends on the selected network, RPC availability, wallet confirmations and the deployed contract address. The current public deployment targets RISE Testnet.
Onchain Mode depends on the selected network, RPC availability, wallet confirmations and the deployed contract address. The current public deployment remains on RISE Testnet; Somnia Shannon is an independently selectable deployment and does not replace the grant-linked RISE experience.

## Project overview

Expand Down 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 | Adapter and deployment path test-covered | Native verifiable VRF requests use Somnia's coordinator-funded Reactivity/drand flow. No public Delveworn deployment is advertised until its address and live fulfillment are verified. |
| 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. Somnia supports ERC-4337-style smart accounts and session keys, but this Delveworn configuration currently exposes only its tested MetaMask transaction path. |
| 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 @@ -241,6 +241,15 @@ At minimum, the selected public deployment needs its contract address. RISE Test
NEXT_PUBLIC_RISE_TESTNET_DUNGEON_ADDRESS
```

Somnia Shannon is opt-in and uses:

```text
NEXT_PUBLIC_DEPLOYMENT=somniaShannon
NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS=0x07c5D071132ae95C3708031790b3feC740F4c292
```

Do not change the production deployment selector merely by merging Somnia support; the RISE URL is referenced by existing grant applications and remains the default.

Changes must pass the path-filtered contract and frontend workflows before they are merged to `main`.

## Roadmap
Expand Down
8 changes: 3 additions & 5 deletions frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ NEXT_PUBLIC_RISE_TESTNET_RPC_URL=https://testnet.riselabs.xyz
NEXT_PUBLIC_RISE_TESTNET_WS_URL=wss://testnet.riselabs.xyz/ws
NEXT_PUBLIC_RISE_TESTNET_EXPLORER_URL=https://explorer.testnet.riselabs.xyz

# Somnia Shannon benchmark candidate.
# This deployment is registered but intentionally not selectable yet.
# Set the address after deploying the benchmark/game contracts; enabling it
# still requires changing selectable=true in chain-config.ts after validation.
# NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS=0x0000000000000000000000000000000000000000
# Somnia Shannon deployment (opt in with NEXT_PUBLIC_DEPLOYMENT=somniaShannon).
# 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_EXPLORER_URL=https://shannon-explorer.somnia.network/

Expand Down
11 changes: 9 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Delveworn

Delveworn is a fully onchain dungeon crawler. The current public frontend deployment targets RISE Testnet and supports RISE Wallet session keys for fast, popup-free gameplay, plus MetaMask standard transactions.
Delveworn is a fully onchain dungeon crawler. The public frontend remains on RISE Testnet and supports RISE Wallet session keys for fast, popup-free gameplay, plus MetaMask standard transactions. A separately selectable Somnia Shannon configuration uses MetaMask and Somnia Native VRF without changing the public RISE experience.

## Status

Expand Down Expand Up @@ -31,6 +31,13 @@ Create `.env.local` and point the frontend at the deployed Delveworn contract:
NEXT_PUBLIC_RISE_TESTNET_DUNGEON_ADDRESS=0x...
```

To run the separately verified Somnia Shannon deployment instead:

```bash
NEXT_PUBLIC_DEPLOYMENT=somniaShannon
NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS=0x07c5D071132ae95C3708031790b3feC740F4c292
```

`NEXT_PUBLIC_DUNGEON_ADDRESS` remains supported as a legacy fallback.

Start the development server:
Expand Down Expand Up @@ -72,4 +79,4 @@ The repository includes `scripts/vrf-latency-monitor.mjs` for measuring request/

## Network

The current frontend targets RISE Testnet. Product naming is chain-independent; contract addresses and network configuration should be selected per deployment before any mainnet release.
The public frontend targets RISE Testnet. Somnia Shannon is available as an opt-in build configuration using chain ID `50312`, the official Dream RPC and Somnia Native VRF. Somnia supports ERC-4337-style smart accounts and session keys at the network/tooling layer, but Delveworn's Somnia configuration currently uses MetaMask standard transactions until a specific account-abstraction provider and smart-account flow are integrated and tested. Product naming remains chain-independent; contract addresses and network configuration must be selected per deployment before any mainnet release.
30 changes: 16 additions & 14 deletions frontend/app/chain-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type InstantPlayProvider =

export type RandomnessProvider =
| "rise-vrf"
| "somnia-native-vrf"
| "chainlink-vrf"
| "supra-dvrf"
| "other";
Expand Down Expand Up @@ -80,12 +81,6 @@ function validateDeploymentConfig(config: DeploymentConfig) {
throw new Error(`Deployment ${config.key} must provide an ecosystem name.`);
}

if (config.selectable && !config.dungeonAddress) {
throw new Error(
`Deployment ${config.key} is selectable but has no dungeon contract address.`
);
}

if (config.realtime.websocket && !config.wsUrl) {
throw new Error(
`Deployment ${config.key} enables WebSocket realtime but has no wsUrl.`
Expand Down Expand Up @@ -161,8 +156,7 @@ export const deployments = {
ecosystemName: "RISE",
selectable: true,
chain: riseTestnet,
dungeonAddress: requiredAddress(
"NEXT_PUBLIC_RISE_TESTNET_DUNGEON_ADDRESS or NEXT_PUBLIC_DUNGEON_ADDRESS",
dungeonAddress: optionalAddress(
process.env.NEXT_PUBLIC_RISE_TESTNET_DUNGEON_ADDRESS ??
process.env.NEXT_PUBLIC_DUNGEON_ADDRESS
),
Expand Down Expand Up @@ -207,10 +201,12 @@ export const deployments = {
key: "somnia-shannon",
label: "Somnia Shannon Testnet",
ecosystemName: "Somnia",
selectable: false,
selectable: true,
chain: somniaShannon,
dungeonAddress: optionalAddress(
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS
dungeonAddress: requiredAddress(
"NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS",
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_DUNGEON_ADDRESS ??
"0x07c5D071132ae95C3708031790b3feC740F4c292"
),
rpcUrl:
process.env.NEXT_PUBLIC_SOMNIA_SHANNON_RPC_URL ??
Expand All @@ -230,8 +226,8 @@ export const deployments = {
shreds: false,
},
randomness: {
provider: "chainlink-vrf",
providerLabel: "Chainlink VRF v2.5 (direct-funding adapter)",
provider: "somnia-native-vrf",
providerLabel: "Somnia Native VRF",
retrySupported: true,
},
timing: {
Expand All @@ -256,10 +252,16 @@ if (!(configuredDeployment in deployments)) {

const selectedDeployment = deployments[configuredDeployment];

if (!selectedDeployment.selectable || !selectedDeployment.dungeonAddress) {
if (!selectedDeployment.selectable) {
throw new Error(
`Deployment ${selectedDeployment.key} is registered for benchmarking but is not selectable yet.`
);
}

if (!selectedDeployment.dungeonAddress) {
throw new Error(
`Deployment ${selectedDeployment.key} is selected but has no dungeon contract address.`
);
}

export const activeDeployment = selectedDeployment as ActiveDeploymentConfig;
2 changes: 1 addition & 1 deletion frontend/app/game-ui.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export function DungeonEntry({
]
: [
"Wallet or temporary session authorization.",
"RISE Fast VRF provides verifiable randomness.",
"The configured VRF provider supplies verifiable randomness.",
"Game state and rewards are stored by the Delveworn contract.",
];

Expand Down
3 changes: 3 additions & 0 deletions frontend/app/page-runtime-bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import {
export const DUNGEON_ADDRESS =
activeDeployment.dungeonAddress;

export const DUNGEON_EXPLORER_URL =
`${activeDeployment.explorerUrl.replace(/\/$/, "")}/address/${DUNGEON_ADDRESS}`;

export const RPC_URL =
activeDeployment.rpcUrl;

Expand Down
Loading
Loading