solanapolis 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +518 -0
- package/bin/solanapolis.js +197 -0
- package/convex/_generated/api.d.ts +175 -0
- package/convex/_generated/api.js +23 -0
- package/convex/_generated/dataModel.d.ts +60 -0
- package/convex/_generated/server.d.ts +143 -0
- package/convex/_generated/server.js +93 -0
- package/convex/agent/conversation.ts +352 -0
- package/convex/agent/embeddingsCache.ts +110 -0
- package/convex/agent/memory.ts +450 -0
- package/convex/agent/schema.ts +53 -0
- package/convex/aiChat.ts +54 -0
- package/convex/aiTown/agent.ts +382 -0
- package/convex/aiTown/agentDescription.ts +27 -0
- package/convex/aiTown/agentInputs.ts +155 -0
- package/convex/aiTown/agentOperations.ts +178 -0
- package/convex/aiTown/conversation.ts +395 -0
- package/convex/aiTown/conversationMembership.ts +38 -0
- package/convex/aiTown/game.ts +371 -0
- package/convex/aiTown/ids.ts +32 -0
- package/convex/aiTown/inputHandler.ts +9 -0
- package/convex/aiTown/inputs.ts +25 -0
- package/convex/aiTown/insertInput.ts +20 -0
- package/convex/aiTown/location.ts +32 -0
- package/convex/aiTown/main.ts +154 -0
- package/convex/aiTown/movement.ts +189 -0
- package/convex/aiTown/player.ts +310 -0
- package/convex/aiTown/playerDescription.ts +35 -0
- package/convex/aiTown/schema.ts +79 -0
- package/convex/aiTown/world.ts +65 -0
- package/convex/aiTown/worldMap.ts +74 -0
- package/convex/chat.ts +79 -0
- package/convex/constants.ts +78 -0
- package/convex/convex.config.ts +6 -0
- package/convex/crons.ts +89 -0
- package/convex/engine/abstractGame.ts +199 -0
- package/convex/engine/historicalObject.ts +355 -0
- package/convex/engine/schema.ts +56 -0
- package/convex/http.ts +36 -0
- package/convex/init.ts +110 -0
- package/convex/messages.ts +53 -0
- package/convex/npcCarAgents.ts +415 -0
- package/convex/schema.ts +61 -0
- package/convex/streaming.ts +23 -0
- package/convex/testing.ts +202 -0
- package/convex/tsconfig.json +18 -0
- package/convex/util/FastIntegerCompression.ts +221 -0
- package/convex/util/assertNever.ts +4 -0
- package/convex/util/asyncMap.ts +20 -0
- package/convex/util/compression.ts +71 -0
- package/convex/util/geometry.ts +132 -0
- package/convex/util/isSimpleObject.ts +11 -0
- package/convex/util/llm.ts +724 -0
- package/convex/util/minheap.ts +38 -0
- package/convex/util/object.ts +22 -0
- package/convex/util/sleep.ts +3 -0
- package/convex/util/types.ts +33 -0
- package/convex/util/xxhash.ts +228 -0
- package/convex/world.ts +257 -0
- package/data/animations/campfire.json +45 -0
- package/data/animations/gentlesparkle.json +37 -0
- package/data/animations/gentlesplash.json +61 -0
- package/data/animations/gentlewaterfall.json +61 -0
- package/data/animations/windmill.json +78 -0
- package/data/characters.ts +121 -0
- package/data/convertMap.js +74 -0
- package/data/gentle.js +330 -0
- package/data/spritesheets/f1.ts +75 -0
- package/data/spritesheets/f2.ts +75 -0
- package/data/spritesheets/f3.ts +75 -0
- package/data/spritesheets/f4.ts +75 -0
- package/data/spritesheets/f5.ts +75 -0
- package/data/spritesheets/f6.ts +75 -0
- package/data/spritesheets/f7.ts +75 -0
- package/data/spritesheets/f8.ts +75 -0
- package/data/spritesheets/p1.ts +59 -0
- package/data/spritesheets/p2.ts +59 -0
- package/data/spritesheets/p3.ts +59 -0
- package/data/spritesheets/player.ts +59 -0
- package/data/spritesheets/types.ts +26 -0
- package/eslint.config.mjs +37 -0
- package/next.config.ts +7 -0
- package/package.json +85 -0
- package/postcss.config.mjs +7 -0
- package/public/file.svg +1 -0
- package/public/globe.svg +1 -0
- package/public/helius-icon.svg +84 -0
- package/public/helius-logo.svg +85 -0
- package/public/next.svg +1 -0
- package/public/plane.glb +0 -0
- package/public/vercel.svg +1 -0
- package/public/window.svg +1 -0
- package/scripts/clear-city.ts +74 -0
- package/scripts/seed-wallets.ts +185 -0
- package/scripts/setup-webhook.ts +73 -0
- package/src/app/api/auth/callback/route.ts +6 -0
- package/src/app/api/auth/link-wallet/route.ts +6 -0
- package/src/app/api/auth/phantom/route.ts +6 -0
- package/src/app/api/broadcast-position/route.ts +59 -0
- package/src/app/api/leaderboard/route.ts +85 -0
- package/src/app/api/network-stats/route.ts +86 -0
- package/src/app/api/parcel-reward/route.ts +181 -0
- package/src/app/api/queue-status/route.ts +30 -0
- package/src/app/api/snapshots/route.ts +37 -0
- package/src/app/api/transactions/enhanced/route.ts +57 -0
- package/src/app/api/treasury/route.ts +83 -0
- package/src/app/api/wallet/[address]/balances/route.ts +124 -0
- package/src/app/api/wallet/[address]/identity/route.ts +32 -0
- package/src/app/api/wallet/[address]/route.ts +216 -0
- package/src/app/api/wallet/[address]/traded-tokens/route.ts +41 -0
- package/src/app/api/wallets/route.ts +68 -0
- package/src/app/api/webhooks/helius/route.ts +76 -0
- package/src/app/auth/callback/page.tsx +29 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +39 -0
- package/src/app/layout.tsx +43 -0
- package/src/app/page.tsx +16 -0
- package/src/components/AITownNPCs.tsx +206 -0
- package/src/components/ActivityFeed.tsx +189 -0
- package/src/components/AuthPanel.tsx +163 -0
- package/src/components/BeachScene.tsx +280 -0
- package/src/components/Building.tsx +138 -0
- package/src/components/CesiumFlight.tsx +1768 -0
- package/src/components/CesiumGlobe.tsx +616 -0
- package/src/components/CitizenCard.tsx +442 -0
- package/src/components/CitizenCardModal.tsx +153 -0
- package/src/components/CityGrid.tsx +313 -0
- package/src/components/CityLandmarks.tsx +427 -0
- package/src/components/CityScene.tsx +1289 -0
- package/src/components/CitySlotsBadge.tsx +68 -0
- package/src/components/CockpitHUD.tsx +460 -0
- package/src/components/ConvexWrapper.tsx +19 -0
- package/src/components/DubaiDistrict.tsx +630 -0
- package/src/components/FlightMiniMap.tsx +133 -0
- package/src/components/GameChat.tsx +383 -0
- package/src/components/GameHUD.tsx +393 -0
- package/src/components/Ground.tsx +14 -0
- package/src/components/HowItWorksModal.tsx +251 -0
- package/src/components/IngestionBanner.tsx +123 -0
- package/src/components/InstancedBuildings.tsx +316 -0
- package/src/components/InstancedCars.tsx +504 -0
- package/src/components/InstancedCityPlanes.tsx +259 -0
- package/src/components/InstancedHouses.tsx +246 -0
- package/src/components/InstancedLampPosts.tsx +201 -0
- package/src/components/InstancedResidentCars.tsx +357 -0
- package/src/components/InstancedRoadDashes.tsx +42 -0
- package/src/components/InstancedSkyscrapers.tsx +434 -0
- package/src/components/InstancedTrees.tsx +67 -0
- package/src/components/LeaderboardPanel.tsx +136 -0
- package/src/components/MultiplayerPlanes.tsx +128 -0
- package/src/components/NetworkStats.tsx +83 -0
- package/src/components/NewBuildingSpotlight.tsx +93 -0
- package/src/components/ParcelChallengeBanner.tsx +242 -0
- package/src/components/ParcelReward.tsx +191 -0
- package/src/components/Park.tsx +42 -0
- package/src/components/PhantomWrapper.tsx +22 -0
- package/src/components/PixelStreamViewer.tsx +335 -0
- package/src/components/PlaneMode.tsx +190 -0
- package/src/components/PlayerCar.tsx +211 -0
- package/src/components/PlayerPlane.tsx +255 -0
- package/src/components/ProjectileRenderer.tsx +249 -0
- package/src/components/QueueStatusBanner.tsx +86 -0
- package/src/components/RealPlayerTags.tsx +82 -0
- package/src/components/SceneLighting.tsx +382 -0
- package/src/components/SelectionBeam.tsx +59 -0
- package/src/components/SwapPanel.tsx +104 -0
- package/src/components/SwapParticles.tsx +237 -0
- package/src/components/TreasureGate.tsx +505 -0
- package/src/components/WalletPanel.tsx +421 -0
- package/src/components/WalletSearch.tsx +244 -0
- package/src/components/WelcomeOverlay.tsx +135 -0
- package/src/components/WindowTooltip.tsx +498 -0
- package/src/context/AuthContext.tsx +230 -0
- package/src/lib/bot-detection.ts +125 -0
- package/src/lib/building-math.ts +136 -0
- package/src/lib/building-shader.ts +253 -0
- package/src/lib/car-paths.ts +244 -0
- package/src/lib/car-system.ts +182 -0
- package/src/lib/city-constants.ts +29 -0
- package/src/lib/city-slots.ts +35 -0
- package/src/lib/city-zoning.ts +64 -0
- package/src/lib/collision-map.ts +147 -0
- package/src/lib/day-night.ts +252 -0
- package/src/lib/export-card.ts +28 -0
- package/src/lib/helius-webhook.ts +90 -0
- package/src/lib/helius.ts +74 -0
- package/src/lib/house-shader.ts +119 -0
- package/src/lib/mock-data.ts +56 -0
- package/src/lib/multiplayer-manager.ts +329 -0
- package/src/lib/plane-physics.ts +66 -0
- package/src/lib/player-car.ts +147 -0
- package/src/lib/player-plane.ts +200 -0
- package/src/lib/projectile-system.ts +272 -0
- package/src/lib/skyscraper-types.ts +52 -0
- package/src/lib/sound-engine.ts +464 -0
- package/src/lib/supabase-admin.ts +9 -0
- package/src/lib/supabase.ts +8 -0
- package/src/lib/swap-events.ts +70 -0
- package/src/middleware.ts +37 -0
- package/src/types/phantom.d.ts +16 -0
- package/src/types/wallet.ts +20 -0
- package/tsconfig.json +34 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type Frame = {
|
|
2
|
+
frame: {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
};
|
|
8
|
+
rotated?: boolean;
|
|
9
|
+
trimmed?: boolean;
|
|
10
|
+
spriteSourceSize: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
sourceSize: {
|
|
15
|
+
w: number;
|
|
16
|
+
h: number;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type SpritesheetData = {
|
|
21
|
+
frames: Record<string, Frame>;
|
|
22
|
+
animations?: Record<string, string[]>;
|
|
23
|
+
meta: {
|
|
24
|
+
scale: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineConfig, globalIgnores } from "eslint/config";
|
|
2
|
+
import nextVitals from "eslint-config-next/core-web-vitals";
|
|
3
|
+
import nextTs from "eslint-config-next/typescript";
|
|
4
|
+
|
|
5
|
+
const eslintConfig = defineConfig([
|
|
6
|
+
...nextVitals,
|
|
7
|
+
...nextTs,
|
|
8
|
+
{
|
|
9
|
+
rules: {
|
|
10
|
+
// These React-compiler-oriented rules are too strict for imperative Three.js/R3F patterns
|
|
11
|
+
// used heavily in this project (mutating uniforms, refs, and scene objects in frame loops).
|
|
12
|
+
"react-hooks/immutability": "off",
|
|
13
|
+
"react-hooks/refs": "off",
|
|
14
|
+
"react-hooks/set-state-in-effect": "off",
|
|
15
|
+
"react-hooks/purity": "off",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ["**/*.cjs"],
|
|
20
|
+
rules: {
|
|
21
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
// Override default ignores of eslint-config-next.
|
|
25
|
+
globalIgnores([
|
|
26
|
+
// Default ignores of eslint-config-next:
|
|
27
|
+
".next/**",
|
|
28
|
+
"out/**",
|
|
29
|
+
"build/**",
|
|
30
|
+
"next-env.d.ts",
|
|
31
|
+
// Nested unrelated workspace in this repo root
|
|
32
|
+
"cesium-flight-simulator-main/**",
|
|
33
|
+
".vercel/**",
|
|
34
|
+
]),
|
|
35
|
+
]);
|
|
36
|
+
|
|
37
|
+
export default eslintConfig;
|
package/next.config.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solanapolis",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "šļø Solanapolis ā A real-time 3D city built on Solana. Connect your wallet, claim your building, drive, fly, and battle. One command to play: npx solanapolis",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"solana",
|
|
7
|
+
"solanapolis",
|
|
8
|
+
"heliopolis",
|
|
9
|
+
"blockchain",
|
|
10
|
+
"game",
|
|
11
|
+
"3d",
|
|
12
|
+
"city",
|
|
13
|
+
"nft",
|
|
14
|
+
"web3",
|
|
15
|
+
"phantom",
|
|
16
|
+
"cesium",
|
|
17
|
+
"flight-simulator",
|
|
18
|
+
"multiplayer",
|
|
19
|
+
"threejs"
|
|
20
|
+
],
|
|
21
|
+
"author": "Solanapolis",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"homepage": "https://heliopolis-main.vercel.app",
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "https://github.com/solanapolis/solanapolis"
|
|
27
|
+
},
|
|
28
|
+
"bin": {
|
|
29
|
+
"solanapolis": "./bin/solanapolis.js"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"bin/",
|
|
33
|
+
"src/",
|
|
34
|
+
"public/",
|
|
35
|
+
"convex/",
|
|
36
|
+
"data/",
|
|
37
|
+
"scripts/",
|
|
38
|
+
"next.config.ts",
|
|
39
|
+
"tsconfig.json",
|
|
40
|
+
"postcss.config.mjs",
|
|
41
|
+
"eslint.config.mjs",
|
|
42
|
+
"README.md"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"dev": "next dev",
|
|
46
|
+
"build": "next build",
|
|
47
|
+
"start": "next start",
|
|
48
|
+
"lint": "eslint",
|
|
49
|
+
"play": "node bin/solanapolis.js"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@convex-dev/persistent-text-streaming": "^0.3.0",
|
|
53
|
+
"@phantom/browser-sdk": "^1.0.5",
|
|
54
|
+
"@phantom/react-sdk": "^1.0.5",
|
|
55
|
+
"@react-three/drei": "^10.7.7",
|
|
56
|
+
"@react-three/fiber": "^9.5.0",
|
|
57
|
+
"@solana/web3.js": "^1.98.4",
|
|
58
|
+
"@supabase/ssr": "^0.9.0",
|
|
59
|
+
"@supabase/supabase-js": "^2.98.0",
|
|
60
|
+
"@types/mapbox-gl": "^3.4.1",
|
|
61
|
+
"@types/three": "^0.183.1",
|
|
62
|
+
"@vercel/analytics": "^1.6.1",
|
|
63
|
+
"bs58": "^6.0.0",
|
|
64
|
+
"cesium": "^1.139.1",
|
|
65
|
+
"convex": "^1.32.0",
|
|
66
|
+
"html-to-image": "^1.11.13",
|
|
67
|
+
"mapbox-gl": "^3.19.1",
|
|
68
|
+
"next": "16.1.6",
|
|
69
|
+
"openai": "^6.27.0",
|
|
70
|
+
"react": "19.2.3",
|
|
71
|
+
"react-dom": "19.2.3",
|
|
72
|
+
"three": "^0.183.2",
|
|
73
|
+
"tweetnacl": "^1.0.3"
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@tailwindcss/postcss": "^4",
|
|
77
|
+
"@types/node": "^20",
|
|
78
|
+
"@types/react": "^19",
|
|
79
|
+
"@types/react-dom": "^19",
|
|
80
|
+
"eslint": "^9",
|
|
81
|
+
"eslint-config-next": "16.1.6",
|
|
82
|
+
"tailwindcss": "^4",
|
|
83
|
+
"typescript": "^5"
|
|
84
|
+
}
|
|
85
|
+
}
|
package/public/file.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
package/public/globe.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_7532_34147)">
|
|
3
|
+
<mask id="mask0_7532_34147" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="400" height="400">
|
|
4
|
+
<path d="M400 0H0V400H400V0Z" fill="white"/>
|
|
5
|
+
</mask>
|
|
6
|
+
<g mask="url(#mask0_7532_34147)">
|
|
7
|
+
<path d="M250.143 83.6619C234.601 77.0225 217.49 73.3653 199.552 73.3653C181.614 73.3653 164.515 77.0225 148.949 83.6619L195.441 2.39315C197.253 -0.797716 201.814 -0.797716 203.638 2.39315L250.143 83.6619Z" fill="url(#paint0_linear_7532_34147)"/>
|
|
8
|
+
<path d="M136.581 89.7368C105.971 106.857 82.9251 136.078 73.7798 171.006L39.2295 82.1647C37.8918 78.7529 40.7375 75.1571 44.3373 75.7093L136.581 89.7368Z" fill="url(#paint1_linear_7532_34147)"/>
|
|
9
|
+
<path d="M97.1901 285.619L3.34123 256.41C-0.136905 255.33 -1.15845 250.851 1.51703 248.347L71.2257 183.082C70.0825 190.089 69.4623 197.281 69.4623 204.62C69.4744 235.179 79.8237 263.32 97.1901 285.619Z" fill="url(#paint2_linear_7532_34147)"/>
|
|
10
|
+
<path d="M197.606 335.863L115.347 392.451C112.343 394.525 108.245 392.537 107.965 388.868L100.607 289.828C124.079 317.552 158.775 335.274 197.606 335.863Z" fill="url(#paint3_linear_7532_34147)"/>
|
|
11
|
+
<path d="M298.168 290.209L290.859 388.757C290.579 392.414 286.493 394.415 283.477 392.341L201.376 335.863C240.073 335.31 274.697 317.736 298.168 290.209Z" fill="url(#paint4_linear_7532_34147)"/>
|
|
12
|
+
<path d="M395.665 256.067L302.254 285.153C319.402 262.927 329.617 234.97 329.617 204.62C329.617 197.171 328.997 189.881 327.817 182.787L397.489 248.004C400.153 250.52 399.143 254.999 395.665 256.067Z" fill="url(#paint5_linear_7532_34147)"/>
|
|
13
|
+
<path d="M359.862 82.3365L325.336 171.128C316.239 136.238 293.267 107.029 262.73 89.8842L354.754 75.8689C358.354 75.3166 361.188 78.9002 359.862 82.3365Z" fill="url(#paint6_linear_7532_34147)"/>
|
|
14
|
+
<path d="M199.552 364.188C180.349 364.188 164.795 379.897 164.795 399.263H234.309C234.309 379.897 218.742 364.188 199.552 364.188Z" fill="url(#paint7_linear_7532_34147)"/>
|
|
15
|
+
<path d="M326.638 306.74C314.671 321.884 317.127 343.95 332.147 356.039L375.49 301.193C360.47 289.104 338.604 291.595 326.638 306.74Z" fill="url(#paint8_linear_7532_34147)"/>
|
|
16
|
+
<path d="M355.107 171.116C359.376 190.004 378.019 201.822 396.723 197.502L381.254 129.107C362.55 133.427 350.839 152.241 355.107 171.116Z" fill="url(#paint9_linear_7532_34147)"/>
|
|
17
|
+
<path d="M269.82 63.8173C287.113 72.224 307.885 64.885 316.215 47.4335L253.584 16.9976C245.254 34.4491 252.526 55.4106 269.82 63.8173Z" fill="url(#paint10_linear_7532_34147)"/>
|
|
18
|
+
<path d="M127.703 63.8173C144.996 55.4106 152.269 34.4491 143.938 16.9976L81.3076 47.4335C89.6381 64.885 110.41 72.224 127.703 63.8173Z" fill="url(#paint11_linear_7532_34147)"/>
|
|
19
|
+
<path d="M44.9085 171.116C49.1771 152.229 37.4658 133.427 18.7495 129.119L3.29248 197.514C22.0087 201.822 40.6399 190.003 44.9085 171.116Z" fill="url(#paint12_linear_7532_34147)"/>
|
|
20
|
+
<path d="M28.4907 301.193L71.8458 356.039C86.8529 343.963 89.3094 321.884 77.3427 306.74C65.376 291.596 43.4978 289.117 28.4907 301.193Z" fill="url(#paint13_linear_7532_34147)"/>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
<defs>
|
|
24
|
+
<linearGradient id="paint0_linear_7532_34147" x1="140.351" y1="41.8248" x2="250.131" y2="41.8248" gradientUnits="userSpaceOnUse">
|
|
25
|
+
<stop stop-color="#E35930"/>
|
|
26
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
27
|
+
</linearGradient>
|
|
28
|
+
<linearGradient id="paint1_linear_7532_34147" x1="32.2367" y1="123.327" x2="136.581" y2="123.327" gradientUnits="userSpaceOnUse">
|
|
29
|
+
<stop stop-color="#E35930"/>
|
|
30
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
31
|
+
</linearGradient>
|
|
32
|
+
<linearGradient id="paint2_linear_7532_34147" x1="-3.07994" y1="234.344" x2="97.1901" y2="234.344" gradientUnits="userSpaceOnUse">
|
|
33
|
+
<stop stop-color="#E35930"/>
|
|
34
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
35
|
+
</linearGradient>
|
|
36
|
+
<linearGradient id="paint3_linear_7532_34147" x1="98.771" y1="341.557" x2="197.594" y2="341.557" gradientUnits="userSpaceOnUse">
|
|
37
|
+
<stop stop-color="#E35930"/>
|
|
38
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
39
|
+
</linearGradient>
|
|
40
|
+
<linearGradient id="paint4_linear_7532_34147" x1="198.044" y1="341.692" x2="298.168" y2="341.692" gradientUnits="userSpaceOnUse">
|
|
41
|
+
<stop stop-color="#E35930"/>
|
|
42
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
43
|
+
</linearGradient>
|
|
44
|
+
<linearGradient id="paint5_linear_7532_34147" x1="296.113" y1="233.976" x2="398.997" y2="233.976" gradientUnits="userSpaceOnUse">
|
|
45
|
+
<stop stop-color="#E35930"/>
|
|
46
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
47
|
+
</linearGradient>
|
|
48
|
+
<linearGradient id="paint6_linear_7532_34147" x1="254.521" y1="123.474" x2="360.19" y2="123.474" gradientUnits="userSpaceOnUse">
|
|
49
|
+
<stop stop-color="#E35930"/>
|
|
50
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
51
|
+
</linearGradient>
|
|
52
|
+
<linearGradient id="paint7_linear_7532_34147" x1="215.171" y1="367.813" x2="188.746" y2="413.168" gradientUnits="userSpaceOnUse">
|
|
53
|
+
<stop stop-color="#E35930"/>
|
|
54
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
55
|
+
</linearGradient>
|
|
56
|
+
<linearGradient id="paint8_linear_7532_34147" x1="338.968" y1="296.517" x2="358.324" y2="345.384" gradientUnits="userSpaceOnUse">
|
|
57
|
+
<stop stop-color="#E35930"/>
|
|
58
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
59
|
+
</linearGradient>
|
|
60
|
+
<linearGradient id="paint9_linear_7532_34147" x1="355.083" y1="155.258" x2="404.969" y2="170.504" gradientUnits="userSpaceOnUse">
|
|
61
|
+
<stop stop-color="#E35930"/>
|
|
62
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
63
|
+
</linearGradient>
|
|
64
|
+
<linearGradient id="paint10_linear_7532_34147" x1="257.48" y1="53.847" x2="300.803" y2="24.5734" gradientUnits="userSpaceOnUse">
|
|
65
|
+
<stop stop-color="#E35930"/>
|
|
66
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
67
|
+
</linearGradient>
|
|
68
|
+
<linearGradient id="paint11_linear_7532_34147" x1="113.063" y1="67.4599" x2="117.025" y2="14.9996" gradientUnits="userSpaceOnUse">
|
|
69
|
+
<stop stop-color="#E35930"/>
|
|
70
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
71
|
+
</linearGradient>
|
|
72
|
+
<linearGradient id="paint12_linear_7532_34147" x1="38.487" y1="185.33" x2="-0.0571299" y2="149.899" gradientUnits="userSpaceOnUse">
|
|
73
|
+
<stop stop-color="#E35930"/>
|
|
74
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
75
|
+
</linearGradient>
|
|
76
|
+
<linearGradient id="paint13_linear_7532_34147" x1="84.5546" y1="321.203" x2="32.9698" y2="328.916" gradientUnits="userSpaceOnUse">
|
|
77
|
+
<stop stop-color="#E35930"/>
|
|
78
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
79
|
+
</linearGradient>
|
|
80
|
+
<clipPath id="clip0_7532_34147">
|
|
81
|
+
<rect width="400" height="400" fill="white"/>
|
|
82
|
+
</clipPath>
|
|
83
|
+
</defs>
|
|
84
|
+
</svg>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<svg width="562" height="118" viewBox="0 0 562 118" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_7532_34078)">
|
|
3
|
+
<path d="M74.6261 24.7253C69.9876 22.7665 64.8892 21.6871 59.531 21.6871C54.1727 21.6871 49.0743 22.7665 44.4358 24.7253L58.3013 0.709587C58.8412 -0.229856 60.2007 -0.229856 60.7406 0.709587L74.6161 24.7253H74.6261Z" fill="url(#paint0_linear_7532_34078)"/>
|
|
4
|
+
<path d="M40.7468 26.5242C31.6098 31.5812 24.742 40.2161 22.0128 50.54L11.7061 24.2856C11.3063 23.2762 12.156 22.2168 13.2257 22.3767L40.7468 26.5242Z" fill="url(#paint1_linear_7532_34078)"/>
|
|
5
|
+
<path d="M28.9906 84.4099L0.999611 75.7751C-0.0400563 75.4552 -0.33996 74.126 0.449787 73.3965L21.2431 54.1079C20.9032 56.1767 20.7233 58.3054 20.7233 60.4741C20.7233 69.5088 23.8123 77.8238 28.9906 84.4099Z" fill="url(#paint2_linear_7532_34078)"/>
|
|
6
|
+
<path d="M58.951 99.2611L34.4089 115.981C33.5091 116.591 32.2895 116.011 32.2096 114.922L30.0203 85.6492C37.018 93.8443 47.3747 99.0812 58.951 99.2511V99.2611Z" fill="url(#paint3_linear_7532_34078)"/>
|
|
7
|
+
<path d="M88.9513 85.7692L86.772 114.892C86.692 115.971 85.4724 116.561 84.5727 115.951L60.0806 99.2612C71.6269 99.1013 81.9536 93.9043 88.9513 85.7692Z" fill="url(#paint4_linear_7532_34078)"/>
|
|
8
|
+
<path d="M118.042 75.6851L90.1711 84.28C95.2895 77.7139 98.3385 69.4488 98.3385 60.4741C98.3385 58.2754 98.1486 56.1167 97.7987 54.0179L118.582 73.2965C119.382 74.0361 119.072 75.3653 118.042 75.6751V75.6851Z" fill="url(#paint5_linear_7532_34078)"/>
|
|
9
|
+
<path d="M107.355 24.3356L97.0588 50.5801C94.3396 40.2662 87.4918 31.6413 78.3848 26.5643L105.836 22.4268C106.906 22.2668 107.755 23.3262 107.355 24.3356Z" fill="url(#paint6_linear_7532_34078)"/>
|
|
10
|
+
<path d="M59.5307 107.636C53.8026 107.636 49.1641 112.273 49.1641 118H69.9074C69.9074 112.273 65.2689 107.636 59.5407 107.636H59.5307Z" fill="url(#paint7_linear_7532_34078)"/>
|
|
11
|
+
<path d="M97.4388 90.6563C93.8699 95.1336 94.5997 101.66 99.0782 105.228L112.004 89.0172C107.526 85.4494 100.998 86.1789 97.4288 90.6563H97.4388Z" fill="url(#paint8_linear_7532_34078)"/>
|
|
12
|
+
<path d="M105.936 50.57C107.206 56.1567 112.774 59.6446 118.352 58.3653L113.733 38.1473C108.145 39.4166 104.656 44.9833 105.936 50.56V50.57Z" fill="url(#paint9_linear_7532_34078)"/>
|
|
13
|
+
<path d="M80.4942 18.8588C85.6525 21.3473 91.8505 19.1786 94.3397 14.0116L75.6557 5.01697C73.1665 10.1739 75.3358 16.3702 80.5042 18.8588H80.4942Z" fill="url(#paint10_linear_7532_34078)"/>
|
|
14
|
+
<path d="M38.0978 18.8588C43.2561 16.3702 45.4254 10.1739 42.9362 5.01697L24.2522 14.0116C26.7414 19.1686 32.9394 21.3373 38.0978 18.8488V18.8588Z" fill="url(#paint11_linear_7532_34078)"/>
|
|
15
|
+
<path d="M13.3958 50.57C14.6654 44.9833 11.1765 39.4266 5.58826 38.1573L0.979736 58.3754C6.56795 59.6446 12.1262 56.1567 13.3958 50.57Z" fill="url(#paint12_linear_7532_34078)"/>
|
|
16
|
+
<path d="M8.49731 89.0172L21.4332 105.228C25.9117 101.66 26.6415 95.1336 23.0726 90.6563C19.5038 86.1789 12.9759 85.4494 8.49731 89.0172Z" fill="url(#paint13_linear_7532_34078)"/>
|
|
17
|
+
<path d="M177.773 30.1321V59.8145H212.612V31.8511H228.487V98.4116H212.612V73.9661H177.773V98.4116H161.898V34.4195L177.773 30.1321Z" fill="#E84125"/>
|
|
18
|
+
<path d="M257.227 84.25H305.792L301.503 98.4016H241.363V31.8411H305.802L301.513 45.9927H257.237V58.0855H298.504V72.2371H257.237V84.25H257.227Z" fill="#E84125"/>
|
|
19
|
+
<path d="M331.274 31.8411V84.25H378.119L373.83 98.4016H315.399V31.8411H331.274Z" fill="#E84125"/>
|
|
20
|
+
<path d="M400.861 31.8411V98.4016H384.987V31.8411H400.861Z" fill="#E84125"/>
|
|
21
|
+
<path d="M467.44 31.8411H483.315V71.9872C483.315 91.3757 467.44 99.8607 446.937 99.8607C426.433 99.8607 411.668 90.7661 411.668 71.9872V34.4195L427.543 30.1321V71.9872C427.543 81.7614 434.061 85.4593 447.706 85.4593C461.352 85.4593 467.44 81.5116 467.44 71.9872V31.8411Z" fill="#E84125"/>
|
|
22
|
+
<path d="M491.382 52.0891C491.382 41.8851 499.45 31.8411 515.235 31.8411H560.54L556.252 45.9927H515.405C510.516 45.9927 508.107 49.0808 508.107 52.0791C508.107 55.0773 510.596 58.0855 515.405 58.0855H538.397C553.922 58.0855 561.99 68.1195 561.99 78.3335C561.99 88.5474 554.352 98.4016 538.397 98.4016H491.382L495.671 84.25H538.227C543.036 84.25 545.525 81.4217 545.525 78.3335C545.525 75.2453 543.126 72.1571 538.227 72.1571H515.235C499.19 72.1571 491.382 62.1231 491.382 52.0891Z" fill="#E84125"/>
|
|
23
|
+
</g>
|
|
24
|
+
<defs>
|
|
25
|
+
<linearGradient id="paint0_linear_7532_34078" x1="41.8666" y1="12.3627" x2="74.6261" y2="12.3627" gradientUnits="userSpaceOnUse">
|
|
26
|
+
<stop stop-color="#E35930"/>
|
|
27
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
28
|
+
</linearGradient>
|
|
29
|
+
<linearGradient id="paint1_linear_7532_34078" x1="9.61681" y1="36.4484" x2="40.7468" y2="36.4484" gradientUnits="userSpaceOnUse">
|
|
30
|
+
<stop stop-color="#E35930"/>
|
|
31
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
32
|
+
</linearGradient>
|
|
33
|
+
<linearGradient id="paint2_linear_7532_34078" x1="-0.919775" y1="69.2589" x2="28.9906" y2="69.2589" gradientUnits="userSpaceOnUse">
|
|
34
|
+
<stop stop-color="#E35930"/>
|
|
35
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
36
|
+
</linearGradient>
|
|
37
|
+
<linearGradient id="paint3_linear_7532_34078" x1="29.4704" y1="100.94" x2="58.951" y2="100.94" gradientUnits="userSpaceOnUse">
|
|
38
|
+
<stop stop-color="#E35930"/>
|
|
39
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
40
|
+
</linearGradient>
|
|
41
|
+
<linearGradient id="paint4_linear_7532_34078" x1="59.0809" y1="100.98" x2="88.9513" y2="100.98" gradientUnits="userSpaceOnUse">
|
|
42
|
+
<stop stop-color="#E35930"/>
|
|
43
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
44
|
+
</linearGradient>
|
|
45
|
+
<linearGradient id="paint5_linear_7532_34078" x1="88.3417" y1="69.149" x2="119.032" y2="69.149" gradientUnits="userSpaceOnUse">
|
|
46
|
+
<stop stop-color="#E35930"/>
|
|
47
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
48
|
+
</linearGradient>
|
|
49
|
+
<linearGradient id="paint6_linear_7532_34078" x1="75.9256" y1="36.4884" x2="107.455" y2="36.4884" gradientUnits="userSpaceOnUse">
|
|
50
|
+
<stop stop-color="#E35930"/>
|
|
51
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
52
|
+
</linearGradient>
|
|
53
|
+
<linearGradient id="paint7_linear_7532_34078" x1="64.1037" y1="108.682" x2="56.3294" y2="122.151" gradientUnits="userSpaceOnUse">
|
|
54
|
+
<stop stop-color="#E35930"/>
|
|
55
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
56
|
+
</linearGradient>
|
|
57
|
+
<linearGradient id="paint8_linear_7532_34078" x1="101.127" y1="87.5512" x2="106.808" y2="102.028" gradientUnits="userSpaceOnUse">
|
|
58
|
+
<stop stop-color="#E35930"/>
|
|
59
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
60
|
+
</linearGradient>
|
|
61
|
+
<linearGradient id="paint9_linear_7532_34078" x1="105.915" y1="45.8351" x2="120.779" y2="50.4203" gradientUnits="userSpaceOnUse">
|
|
62
|
+
<stop stop-color="#E35930"/>
|
|
63
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
64
|
+
</linearGradient>
|
|
65
|
+
<linearGradient id="paint10_linear_7532_34078" x1="76.8142" y1="15.9367" x2="89.6635" y2="7.17242" gradientUnits="userSpaceOnUse">
|
|
66
|
+
<stop stop-color="#E35930"/>
|
|
67
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
68
|
+
</linearGradient>
|
|
69
|
+
<linearGradient id="paint11_linear_7532_34078" x1="33.7238" y1="19.9762" x2="34.884" y2="4.46876" gradientUnits="userSpaceOnUse">
|
|
70
|
+
<stop stop-color="#E35930"/>
|
|
71
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
72
|
+
</linearGradient>
|
|
73
|
+
<linearGradient id="paint12_linear_7532_34078" x1="11.6598" y1="54.776" x2="0.258708" y2="44.1971" gradientUnits="userSpaceOnUse">
|
|
74
|
+
<stop stop-color="#E35930"/>
|
|
75
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
76
|
+
</linearGradient>
|
|
77
|
+
<linearGradient id="paint13_linear_7532_34078" x1="25.3906" y1="94.7132" x2="10.0098" y2="97.0344" gradientUnits="userSpaceOnUse">
|
|
78
|
+
<stop stop-color="#E35930"/>
|
|
79
|
+
<stop offset="1" stop-color="#E84125"/>
|
|
80
|
+
</linearGradient>
|
|
81
|
+
<clipPath id="clip0_7532_34078">
|
|
82
|
+
<rect width="562" height="118" fill="white"/>
|
|
83
|
+
</clipPath>
|
|
84
|
+
</defs>
|
|
85
|
+
</svg>
|
package/public/next.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
package/public/plane.glb
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clears all wallets and swap events from the database.
|
|
3
|
+
* Resets the city to a blank state.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* source .env.local && npx tsx scripts/clear-city.ts
|
|
7
|
+
*/
|
|
8
|
+
import { createClient } from "@supabase/supabase-js";
|
|
9
|
+
|
|
10
|
+
const SUPABASE_URL = process.env.NEXT_PUBLIC_SUPABASE_URL!;
|
|
11
|
+
const SUPABASE_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY!;
|
|
12
|
+
|
|
13
|
+
if (!SUPABASE_URL || !SUPABASE_KEY) {
|
|
14
|
+
console.error("ā Missing NEXT_PUBLIC_SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY");
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
|
|
19
|
+
|
|
20
|
+
async function main() {
|
|
21
|
+
console.log("šļø Clearing Heliopolis city...\n");
|
|
22
|
+
|
|
23
|
+
// Clear swap events first (no FK constraint)
|
|
24
|
+
const { error: swapErr } = await supabase
|
|
25
|
+
.from("swap_events")
|
|
26
|
+
.delete()
|
|
27
|
+
.neq("id", 0);
|
|
28
|
+
|
|
29
|
+
if (swapErr) {
|
|
30
|
+
console.error(" ā Swap events:", swapErr.message);
|
|
31
|
+
} else {
|
|
32
|
+
console.log(` ā Deleted swap events`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Clear ingestion queue (FK to wallets)
|
|
36
|
+
const { error: queueErr } = await supabase
|
|
37
|
+
.from("ingestion_queue")
|
|
38
|
+
.delete()
|
|
39
|
+
.neq("address", "");
|
|
40
|
+
|
|
41
|
+
if (queueErr) {
|
|
42
|
+
console.error(" ā Ingestion queue:", queueErr.message);
|
|
43
|
+
} else {
|
|
44
|
+
console.log(" ā Cleared ingestion queue");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Clear wallets
|
|
48
|
+
const { error: walletErr } = await supabase
|
|
49
|
+
.from("wallets")
|
|
50
|
+
.delete()
|
|
51
|
+
.neq("address", "");
|
|
52
|
+
|
|
53
|
+
if (walletErr) {
|
|
54
|
+
console.error(" ā Wallets:", walletErr.message);
|
|
55
|
+
} else {
|
|
56
|
+
console.log(" ā Cleared wallets");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Clear city snapshots
|
|
60
|
+
const { error: snapErr } = await supabase
|
|
61
|
+
.from("city_snapshots")
|
|
62
|
+
.delete()
|
|
63
|
+
.neq("id", 0);
|
|
64
|
+
|
|
65
|
+
if (snapErr) {
|
|
66
|
+
console.error(" ā City snapshots:", snapErr.message);
|
|
67
|
+
} else {
|
|
68
|
+
console.log(" ā Cleared city snapshots");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
console.log("\nšļø City is now blank! New wallets will be added when users paste addresses.\n");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
main().catch(console.error);
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Seed the Heliopolis city with famous/interesting Solana wallets.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* source .env.local && npx tsx scripts/seed-wallets.ts
|
|
6
|
+
*/
|
|
7
|
+
import { createClient } from "@supabase/supabase-js";
|
|
8
|
+
|
|
9
|
+
const SUPABASE_URL = process.env.NEXT_PUBLIC_SUPABASE_URL!;
|
|
10
|
+
const SUPABASE_KEY = process.env.SUPABASE_SERVICE_ROLE_KEY!;
|
|
11
|
+
|
|
12
|
+
if (!SUPABASE_URL || !SUPABASE_KEY) {
|
|
13
|
+
console.error("ā Missing NEXT_PUBLIC_SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY");
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
|
|
18
|
+
|
|
19
|
+
// Famous/interesting Solana wallets with realistic stats
|
|
20
|
+
const WALLETS = [
|
|
21
|
+
// Major DEX / Protocol wallets
|
|
22
|
+
{ address: "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", name: "Jupiter Exchange", type: "protocol", category: "DEX", txns: 89420, volume: 4200000, fees: 12500, age: 890, tokens: 340 },
|
|
23
|
+
{ address: "whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc", name: "Orca Whirlpools", type: "protocol", category: "DEX", txns: 72100, volume: 3100000, fees: 9800, age: 1050, tokens: 280 },
|
|
24
|
+
{ address: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM", name: "Raydium AMM", type: "protocol", category: "DEX", txns: 95000, volume: 5600000, fees: 15600, age: 1200, tokens: 450 },
|
|
25
|
+
|
|
26
|
+
// Major exchange wallets
|
|
27
|
+
{ address: "2AQdpHJ2JpcEgPiATUXjQxA8QmafFegfQwSLWSprPicm", name: "Coinbase", type: "exchange", category: "CEX", txns: 150000, volume: 12000000, fees: 45000, age: 1400, tokens: 120 },
|
|
28
|
+
{ address: "5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9", name: "Binance Hot", type: "exchange", category: "CEX", txns: 280000, volume: 25000000, fees: 85000, age: 1500, tokens: 200 },
|
|
29
|
+
{ address: "9n4nbM75f5Ui33ZbPYXn59EwSgE8CGsHtAeTH5YFeJ9E", name: "FTX Estate", type: "exchange", category: "CEX", txns: 45000, volume: 8000000, fees: 22000, age: 1100, tokens: 90 },
|
|
30
|
+
|
|
31
|
+
// Notable whales / traders
|
|
32
|
+
{ address: "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH", name: "Whale Alpha", type: "whale", category: "Trader", txns: 42000, volume: 7500000, fees: 18000, age: 950, tokens: 280 },
|
|
33
|
+
{ address: "5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1", name: "Solana Whale 1", type: "whale", category: "Trader", txns: 35000, volume: 5200000, fees: 14000, age: 1300, tokens: 150 },
|
|
34
|
+
{ address: "GhostKvpZHGWGRtHJ3VFWEfxXVH4MSTpYtaL8kXHNkPi", name: "Phantom Ghost", type: "whale", category: "NFT", txns: 28000, volume: 2100000, fees: 7500, age: 800, tokens: 420 },
|
|
35
|
+
|
|
36
|
+
// DeFi protocols
|
|
37
|
+
{ address: "MERLuDFBMmsHnsBPZw2sDQZHvXFGusWNfmo7MCWRahK", name: "Marinade Finance", type: "protocol", category: "Staking", txns: 62000, volume: 4800000, fees: 11000, age: 1100, tokens: 60 },
|
|
38
|
+
{ address: "mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68", name: "Mango Markets", type: "protocol", category: "DEX", txns: 85000, volume: 6200000, fees: 16500, age: 1050, tokens: 200 },
|
|
39
|
+
{ address: "DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1", name: "Drift Protocol", type: "protocol", category: "Perps", txns: 73000, volume: 3900000, fees: 9200, age: 920, tokens: 140 },
|
|
40
|
+
|
|
41
|
+
// NFT-heavy wallets
|
|
42
|
+
{ address: "3yFwqXBfZY4jBVUafQ1YEXw189y2dN3V5KQq9uzBDy1E", name: "NFT Maven", type: "collector", category: "NFT", txns: 18000, volume: 1200000, fees: 5500, age: 750, tokens: 580 },
|
|
43
|
+
{ address: "6ogzHhzdrQr9Pgv6hZ2MNze7UrzBMAFyBBWUYp1Fhitx", name: "DeGod Holder", type: "collector", category: "NFT", txns: 22000, volume: 1800000, fees: 6200, age: 820, tokens: 380 },
|
|
44
|
+
|
|
45
|
+
// MEV / Bot wallets
|
|
46
|
+
{ address: "Cw8CFyM9FHBdJj2hQUdMbN9rqU8MBC2E3Lxprvvnz3T5", name: "Jito MEV", type: "bot", category: "MEV", txns: 450000, volume: 15000000, fees: 120000, age: 600, tokens: 80 },
|
|
47
|
+
{ address: "96gYZGLnJYVFmbjzopPSU6QiEV5fGqZNyN9nmNhvrZU5", name: "Arb Bot Alpha", type: "bot", category: "MEV", txns: 380000, volume: 9800000, fees: 95000, age: 500, tokens: 50 },
|
|
48
|
+
|
|
49
|
+
// Random interesting wallets (mid-size traders)
|
|
50
|
+
{ address: "3kPUzv5P7BR11mBFfvJdaFwMYaWhUkAdBqjJDDqWCLuN", name: null, type: null, category: null, txns: 8500, volume: 420000, fees: 1800, age: 650, tokens: 45 },
|
|
51
|
+
{ address: "7UX2i7SucgLMQcfZ75s3VXmZZY4YRUyJN9X1RgfMoDUi", name: null, type: null, category: null, txns: 12000, volume: 850000, fees: 3200, age: 900, tokens: 72 },
|
|
52
|
+
{ address: "4Nd1mpYP4D5TBu3MfUPhCBHBPzVpcVQxz8JE7t2Y5sVB", name: null, type: null, category: null, txns: 3200, volume: 180000, fees: 850, age: 450, tokens: 28 },
|
|
53
|
+
{ address: "GTMzFVJiebj7PQxYmn2tRvBEnjPHZ1gGr5hRgLjVFsAW", name: null, type: null, category: null, txns: 5600, volume: 310000, fees: 1400, age: 720, tokens: 55 },
|
|
54
|
+
{ address: "BPFLoaderUpgradeab1e11111111111111111111111", name: "BPF Loader", type: "system", category: "Core", txns: 900000, volume: 0, fees: 0, age: 2000, tokens: 0 },
|
|
55
|
+
{ address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", name: "Token Program", type: "system", category: "Core", txns: 999999, volume: 0, fees: 0, age: 2000, tokens: 0 },
|
|
56
|
+
{ address: "11111111111111111111111111111111", name: "System Program", type: "system", category: "Core", txns: 999999, volume: 0, fees: 0, age: 2000, tokens: 0 },
|
|
57
|
+
|
|
58
|
+
// More mid-size wallets to fill out the city
|
|
59
|
+
{ address: "DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK", name: null, type: null, category: null, txns: 15600, volume: 920000, fees: 4100, age: 1050, tokens: 92 },
|
|
60
|
+
{ address: "7Zb1bGi32pfsrBkzWdqd4dFhUXwp5Nybr1zuaEwN5F91", name: null, type: null, category: null, txns: 6800, volume: 340000, fees: 1500, age: 580, tokens: 38 },
|
|
61
|
+
{ address: "Fxo9AEXWX1RYeKYiU2o5xHxaNh48c3sTPGbdZ4YJwBgq", name: null, type: null, category: null, txns: 21000, volume: 1500000, fees: 5800, age: 870, tokens: 110 },
|
|
62
|
+
{ address: "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm", name: null, type: null, category: null, txns: 9200, volume: 530000, fees: 2100, age: 680, tokens: 63 },
|
|
63
|
+
{ address: "CuieVDEDtLo7FypA9SbLM9saXFdb1dsshEkyErMqkRQq", name: null, type: null, category: null, txns: 4100, volume: 220000, fees: 950, age: 390, tokens: 32 },
|
|
64
|
+
{ address: "FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYW5Uv2fPHRUmJX", name: null, type: null, category: null, txns: 11500, volume: 780000, fees: 3300, age: 820, tokens: 85 },
|
|
65
|
+
{ address: "H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG", name: null, type: null, category: null, txns: 7400, volume: 410000, fees: 1700, age: 610, tokens: 48 },
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// Common token mints for swap events
|
|
69
|
+
const TOKEN_MINTS = [
|
|
70
|
+
"So11111111111111111111111111111111", // SOL
|
|
71
|
+
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC
|
|
72
|
+
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", // USDT
|
|
73
|
+
"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263", // BONK
|
|
74
|
+
"JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN", // JUP
|
|
75
|
+
"mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So", // mSOL
|
|
76
|
+
"DUSTawucrTsGU8hcqRdHDCbuYhCPADMLM2VcCb8VnFnQ", // DUST
|
|
77
|
+
"7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", // ETH
|
|
78
|
+
"rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof", // RENDER
|
|
79
|
+
"HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3", // PYTH
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
async function main() {
|
|
83
|
+
console.log("šļø Seeding Heliopolis with", WALLETS.length, "wallets...\n");
|
|
84
|
+
|
|
85
|
+
let inserted = 0;
|
|
86
|
+
let placed = 0;
|
|
87
|
+
|
|
88
|
+
for (const w of WALLETS) {
|
|
89
|
+
// Insert wallet with complete status
|
|
90
|
+
const firstTx = new Date();
|
|
91
|
+
firstTx.setDate(firstTx.getDate() - w.age);
|
|
92
|
+
|
|
93
|
+
const latestTx = new Date();
|
|
94
|
+
latestTx.setDate(latestTx.getDate() - Math.floor(Math.random() * 30));
|
|
95
|
+
|
|
96
|
+
const { error: upsertError } = await supabase
|
|
97
|
+
.from("wallets")
|
|
98
|
+
.upsert({
|
|
99
|
+
address: w.address,
|
|
100
|
+
txn_count: w.txns,
|
|
101
|
+
volume_traded_sol: w.volume,
|
|
102
|
+
fees_paid_sol: w.fees,
|
|
103
|
+
wallet_age_days: w.age,
|
|
104
|
+
first_tx_at: firstTx.toISOString(),
|
|
105
|
+
latest_tx_at: latestTx.toISOString(),
|
|
106
|
+
ingestion_status: "complete",
|
|
107
|
+
unique_tokens_swapped: w.tokens,
|
|
108
|
+
identity_name: w.name,
|
|
109
|
+
identity_type: w.type,
|
|
110
|
+
identity_category: w.category,
|
|
111
|
+
updated_at: new Date().toISOString(),
|
|
112
|
+
}, { onConflict: "address" });
|
|
113
|
+
|
|
114
|
+
if (upsertError) {
|
|
115
|
+
console.error(` ā ${w.address.slice(0, 8)}⦠ā ${upsertError.message}`);
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
inserted++;
|
|
120
|
+
const label = w.name ? `${w.name} (${w.address.slice(0, 8)}ā¦)` : `${w.address.slice(0, 8)}ā¦`;
|
|
121
|
+
console.log(` ā ${label}`);
|
|
122
|
+
|
|
123
|
+
// Assign city position
|
|
124
|
+
const { data: posData, error: posError } = await supabase.rpc("assign_city_position", {
|
|
125
|
+
p_address: w.address,
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
if (posError) {
|
|
129
|
+
console.error(` ā Position error: ${posError.message}`);
|
|
130
|
+
} else if (posData && posData.length > 0) {
|
|
131
|
+
const pos = posData[0];
|
|
132
|
+
console.log(` š Placed at block (${pos.assigned_row}, ${pos.assigned_col}) slot ${pos.assigned_slot}`);
|
|
133
|
+
placed++;
|
|
134
|
+
} else {
|
|
135
|
+
console.log(` š Already placed or no slot available`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Seed swap events for the activity feed
|
|
140
|
+
console.log("\nš Seeding swap events...\n");
|
|
141
|
+
|
|
142
|
+
const walletAddresses = WALLETS.filter(w => w.txns > 1000).map(w => w.address);
|
|
143
|
+
let swapCount = 0;
|
|
144
|
+
|
|
145
|
+
for (let i = 0; i < 50; i++) {
|
|
146
|
+
const wallet = walletAddresses[Math.floor(Math.random() * walletAddresses.length)];
|
|
147
|
+
const tokenIn = TOKEN_MINTS[Math.floor(Math.random() * TOKEN_MINTS.length)];
|
|
148
|
+
let tokenOut = TOKEN_MINTS[Math.floor(Math.random() * TOKEN_MINTS.length)];
|
|
149
|
+
while (tokenOut === tokenIn) {
|
|
150
|
+
tokenOut = TOKEN_MINTS[Math.floor(Math.random() * TOKEN_MINTS.length)];
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const amountSol = Math.random() * 50 + 0.1;
|
|
154
|
+
|
|
155
|
+
// Spread timestamps over the last hour
|
|
156
|
+
const createdAt = new Date();
|
|
157
|
+
createdAt.setMinutes(createdAt.getMinutes() - Math.floor(Math.random() * 60));
|
|
158
|
+
|
|
159
|
+
const signature = `seed${Date.now()}${i}${Math.random().toString(36).slice(2, 10)}`;
|
|
160
|
+
|
|
161
|
+
const { error } = await supabase.from("swap_events").insert({
|
|
162
|
+
wallet_address: wallet,
|
|
163
|
+
signature,
|
|
164
|
+
token_in: tokenIn,
|
|
165
|
+
token_out: tokenOut,
|
|
166
|
+
amount_sol: Number(amountSol.toFixed(4)),
|
|
167
|
+
created_at: createdAt.toISOString(),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
if (!error) {
|
|
171
|
+
swapCount++;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
console.log(` ā Created ${swapCount} swap events\n`);
|
|
176
|
+
|
|
177
|
+
// Also ensure the get_random_swaps function exists for the car system
|
|
178
|
+
console.log("š Summary:");
|
|
179
|
+
console.log(` Wallets inserted: ${inserted}`);
|
|
180
|
+
console.log(` Wallets placed: ${placed}`);
|
|
181
|
+
console.log(` Swap events: ${swapCount}`);
|
|
182
|
+
console.log("\nš City is ready! Refresh the page to see buildings.\n");
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
main().catch(console.error);
|