create-mud 2.0.0-alpha.1.21 → 2.0.0-alpha.1.211
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 +1 -1
- package/dist/cli.js +1 -1
- package/dist/templates/{minimal/packages/client → phaser}/.eslintrc +1 -3
- package/dist/templates/phaser/package.json +28 -0
- package/dist/templates/phaser/packages/art/.gitignore +0 -0
- package/dist/templates/phaser/packages/art/README.md +33 -0
- package/dist/templates/phaser/packages/art/config-sprites.json +21 -0
- package/dist/templates/phaser/packages/art/package.json +27 -0
- package/dist/templates/phaser/packages/art/scripts/cli.mjs +190 -0
- package/dist/templates/phaser/packages/art/scripts/export-tiled-types.ts +292 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/0.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/1.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/2.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/3.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/4.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/attack/5.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/death/0.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/death/1.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/death/2.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/idle/0.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/idle/1.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/idle/2.png +0 -0
- package/dist/templates/phaser/packages/art/sprites/golem/idle/3.png +0 -0
- package/dist/templates/phaser/packages/art/tilesets/images/world.png +0 -0
- package/dist/templates/phaser/packages/art/tilesets/world.tsx +19 -0
- package/dist/templates/phaser/packages/client/.env +1 -0
- package/dist/templates/phaser/packages/client/.eslintrc +7 -0
- package/dist/templates/phaser/packages/client/index.html +39 -0
- package/dist/templates/phaser/packages/client/package.json +48 -0
- package/dist/templates/phaser/packages/client/public/assets/atlases/atlas.json +292 -0
- package/dist/templates/phaser/packages/client/public/assets/atlases/atlas.png +0 -0
- package/dist/templates/phaser/packages/client/public/assets/tilesets/world.png +0 -0
- package/dist/templates/phaser/packages/client/src/artTypes/world.ts +9 -0
- package/dist/templates/phaser/packages/client/src/index.tsx +11 -0
- package/dist/templates/phaser/packages/client/src/layers/network/createNetworkLayer.ts +24 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/configurePhaser.ts +91 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/constants.ts +22 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/createPhaserLayer.ts +33 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/systems/createCamera.ts +13 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/systems/createMapSystem.ts +32 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/systems/index.ts +1 -0
- package/dist/templates/phaser/packages/client/src/layers/phaser/systems/registerSystems.ts +8 -0
- package/dist/templates/phaser/packages/client/src/mud/contractComponents.ts +24 -0
- package/dist/templates/phaser/packages/client/src/mud/createClientComponents.ts +10 -0
- package/dist/templates/phaser/packages/client/src/mud/createSystemCalls.ts +21 -0
- package/dist/templates/phaser/packages/client/src/mud/getNetworkConfig.ts +53 -0
- package/dist/templates/phaser/packages/client/src/mud/setup.ts +16 -0
- package/dist/templates/phaser/packages/client/src/mud/setupNetwork.ts +102 -0
- package/dist/templates/phaser/packages/client/src/mud/supportedChains.ts +5 -0
- package/dist/templates/phaser/packages/client/src/mud/world.ts +3 -0
- package/dist/templates/phaser/packages/client/src/store.ts +38 -0
- package/dist/templates/phaser/packages/client/src/ui/App.tsx +23 -0
- package/dist/templates/phaser/packages/client/src/ui/LoadingScreen/BootScreen.tsx +42 -0
- package/dist/templates/phaser/packages/client/src/ui/LoadingScreen/LoadingBar.tsx +21 -0
- package/dist/templates/phaser/packages/client/src/ui/LoadingScreen/LoadingScreen.tsx +52 -0
- package/dist/templates/phaser/packages/client/src/ui/LoadingScreen/index.ts +1 -0
- package/dist/templates/phaser/packages/client/src/ui/PhaserLayer.tsx +20 -0
- package/dist/templates/phaser/packages/client/src/ui/UIRoot.tsx +20 -0
- package/dist/templates/phaser/packages/client/src/ui/Wrapper.tsx +5 -0
- package/dist/templates/phaser/packages/client/src/ui/hooks/useNetworkLayer.tsx +17 -0
- package/dist/templates/phaser/packages/client/src/ui/hooks/usePhaserLayer.tsx +87 -0
- package/dist/templates/phaser/packages/client/src/ui/hooks/usePromiseValue.ts +24 -0
- package/dist/templates/phaser/packages/client/src/ui/theme/ClickWrapper.tsx +18 -0
- package/dist/templates/phaser/packages/client/src/ui/theme/SpriteImage.tsx +52 -0
- package/dist/templates/{minimal → phaser}/packages/client/tsconfig.json +3 -4
- package/dist/templates/phaser/packages/client/vite.config.ts +15 -0
- package/dist/templates/phaser/packages/contracts/.env +8 -0
- package/dist/templates/{minimal → phaser}/packages/contracts/.gitignore +3 -2
- package/dist/templates/{minimal → phaser}/packages/contracts/.solhint.json +2 -1
- package/dist/templates/phaser/packages/contracts/foundry.toml +22 -0
- package/dist/templates/phaser/packages/contracts/mud.config.ts +10 -0
- package/dist/templates/phaser/packages/contracts/package.json +45 -0
- package/dist/templates/phaser/packages/contracts/remappings.txt +3 -0
- package/dist/templates/phaser/packages/contracts/script/PostDeploy.s.sol +17 -0
- package/dist/templates/phaser/packages/contracts/src/codegen/Tables.sol +6 -0
- package/dist/templates/phaser/packages/contracts/src/codegen/tables/Counter.sol +120 -0
- package/dist/templates/phaser/packages/contracts/src/codegen/world/IIncrementSystem.sol +8 -0
- package/dist/templates/phaser/packages/contracts/src/codegen/world/IWorld.sol +16 -0
- package/dist/templates/phaser/packages/contracts/src/systems/IncrementSystem.sol +14 -0
- package/dist/templates/phaser/packages/contracts/test/CounterTest.t.sol +38 -0
- package/dist/templates/phaser/packages/contracts/tsconfig.json +13 -0
- package/dist/templates/phaser/packages/contracts/worlds.json +5 -0
- package/dist/templates/react/.eslintrc +10 -0
- package/dist/templates/react/package.json +13 -3
- package/dist/templates/react/packages/client/.env +1 -0
- package/dist/templates/react/packages/client/.eslintrc +2 -12
- package/dist/templates/react/packages/client/package.json +18 -21
- package/dist/templates/react/packages/client/src/App.tsx +11 -13
- package/dist/templates/react/packages/client/src/MUDContext.tsx +21 -0
- package/dist/templates/react/packages/client/src/index.tsx +12 -31
- package/dist/templates/react/packages/client/src/mud/contractComponents.ts +24 -0
- package/dist/templates/react/packages/client/src/mud/createClientComponents.ts +10 -0
- package/dist/templates/react/packages/client/src/mud/createSystemCalls.ts +21 -0
- package/dist/templates/react/packages/client/src/mud/getNetworkConfig.ts +53 -0
- package/dist/templates/react/packages/client/src/mud/setup.ts +16 -0
- package/dist/templates/react/packages/client/src/mud/setupNetwork.ts +102 -0
- package/dist/templates/react/packages/client/src/mud/supportedChains.ts +5 -0
- package/dist/templates/react/packages/client/src/mud/world.ts +3 -0
- package/dist/templates/react/packages/client/tsconfig.json +0 -3
- package/dist/templates/react/packages/client/vite.config.ts +3 -0
- package/dist/templates/react/packages/contracts/.env +8 -0
- package/dist/templates/react/packages/contracts/.gitignore +3 -2
- package/dist/templates/react/packages/contracts/.solhint.json +2 -1
- package/dist/templates/react/packages/contracts/foundry.toml +13 -2
- package/dist/templates/react/packages/contracts/mud.config.ts +10 -0
- package/dist/templates/react/packages/contracts/package.json +25 -20
- package/dist/templates/react/packages/contracts/remappings.txt +3 -9
- package/dist/templates/react/packages/contracts/script/PostDeploy.s.sol +24 -0
- package/dist/templates/react/packages/contracts/src/codegen/Tables.sol +6 -0
- package/dist/templates/react/packages/contracts/src/codegen/tables/Counter.sol +120 -0
- package/dist/templates/react/packages/contracts/src/codegen/world/IIncrementSystem.sol +8 -0
- package/dist/templates/react/packages/contracts/src/codegen/world/IWorld.sol +16 -0
- package/dist/templates/react/packages/contracts/src/systems/IncrementSystem.sol +7 -15
- package/dist/templates/react/packages/contracts/test/CounterTest.t.sol +38 -0
- package/dist/templates/react/packages/contracts/tsconfig.json +9 -8
- package/dist/templates/react/packages/contracts/worlds.json +5 -0
- package/dist/templates/threejs/.eslintrc +10 -0
- package/dist/templates/threejs/.gitignore +1 -0
- package/dist/templates/threejs/.vscode/extensions.json +3 -0
- package/dist/templates/threejs/.vscode/settings.json +3 -0
- package/dist/templates/threejs/package.json +28 -0
- package/dist/templates/threejs/packages/client/.env +1 -0
- package/dist/templates/threejs/packages/client/.eslintrc +7 -0
- package/dist/templates/threejs/packages/client/.gitignore +3 -0
- package/dist/templates/threejs/packages/client/index.html +12 -0
- package/dist/templates/threejs/packages/client/package.json +41 -0
- package/dist/templates/threejs/packages/client/src/App.tsx +81 -0
- package/dist/templates/threejs/packages/client/src/MUDContext.tsx +21 -0
- package/dist/templates/threejs/packages/client/src/index.tsx +19 -0
- package/dist/templates/threejs/packages/client/src/mud/contractComponents.ts +26 -0
- package/dist/templates/threejs/packages/client/src/mud/createClientComponents.ts +10 -0
- package/dist/templates/threejs/packages/client/src/mud/createSystemCalls.ts +15 -0
- package/dist/templates/threejs/packages/client/src/mud/getNetworkConfig.ts +53 -0
- package/dist/templates/threejs/packages/client/src/mud/setup.ts +16 -0
- package/dist/templates/threejs/packages/client/src/mud/setupNetwork.ts +102 -0
- package/dist/templates/threejs/packages/client/src/mud/supportedChains.ts +5 -0
- package/dist/templates/threejs/packages/client/src/mud/world.ts +3 -0
- package/dist/templates/threejs/packages/client/src/useKeyboardMovement.ts +60 -0
- package/dist/templates/threejs/packages/client/tsconfig.json +19 -0
- package/dist/templates/threejs/packages/client/vite.config.ts +15 -0
- package/dist/templates/threejs/packages/contracts/.env +8 -0
- package/dist/templates/threejs/packages/contracts/.gitignore +11 -0
- package/dist/templates/threejs/packages/contracts/.prettierrc +8 -0
- package/dist/templates/threejs/packages/contracts/.solhint.json +12 -0
- package/dist/templates/threejs/packages/contracts/foundry.toml +22 -0
- package/dist/templates/threejs/packages/contracts/mud.config.ts +13 -0
- package/dist/templates/threejs/packages/contracts/package.json +45 -0
- package/dist/templates/threejs/packages/contracts/remappings.txt +3 -0
- package/dist/templates/threejs/packages/contracts/src/codegen/Tables.sol +6 -0
- package/dist/templates/threejs/packages/contracts/src/codegen/tables/Position.sol +263 -0
- package/dist/templates/threejs/packages/contracts/src/codegen/world/IMoveSystem.sol +8 -0
- package/dist/templates/threejs/packages/contracts/src/codegen/world/IWorld.sol +16 -0
- package/dist/templates/threejs/packages/contracts/src/systems/MoveSystem.sol +25 -0
- package/dist/templates/threejs/packages/contracts/tsconfig.json +13 -0
- package/dist/templates/threejs/packages/contracts/worlds.json +5 -0
- package/dist/templates/threejs/pnpm-workspace.yaml +2 -0
- package/dist/templates/vanilla/.eslintrc +10 -0
- package/dist/templates/vanilla/.gitignore +1 -0
- package/dist/templates/vanilla/.vscode/extensions.json +3 -0
- package/dist/templates/vanilla/.vscode/settings.json +3 -0
- package/dist/templates/vanilla/package.json +28 -0
- package/dist/templates/vanilla/packages/client/.env +1 -0
- package/dist/templates/vanilla/packages/client/.gitignore +3 -0
- package/dist/templates/vanilla/packages/client/package.json +32 -0
- package/dist/templates/vanilla/packages/client/src/index.ts +22 -0
- package/dist/templates/vanilla/packages/client/src/mud/contractComponents.ts +24 -0
- package/dist/templates/vanilla/packages/client/src/mud/createClientComponents.ts +10 -0
- package/dist/templates/vanilla/packages/client/src/mud/createSystemCalls.ts +21 -0
- package/dist/templates/vanilla/packages/client/src/mud/getNetworkConfig.ts +53 -0
- package/dist/templates/vanilla/packages/client/src/mud/setup.ts +16 -0
- package/dist/templates/vanilla/packages/client/src/mud/setupNetwork.ts +102 -0
- package/dist/templates/vanilla/packages/client/src/mud/supportedChains.ts +5 -0
- package/dist/templates/vanilla/packages/client/src/mud/world.ts +3 -0
- package/dist/templates/vanilla/packages/client/tsconfig.json +18 -0
- package/dist/templates/{minimal → vanilla}/packages/client/vite.config.ts +3 -0
- package/dist/templates/vanilla/packages/contracts/.env +8 -0
- package/dist/templates/vanilla/packages/contracts/.gitignore +11 -0
- package/dist/templates/vanilla/packages/contracts/.prettierrc +8 -0
- package/dist/templates/vanilla/packages/contracts/.solhint.json +12 -0
- package/dist/templates/vanilla/packages/contracts/foundry.toml +22 -0
- package/dist/templates/vanilla/packages/contracts/mud.config.ts +10 -0
- package/dist/templates/vanilla/packages/contracts/package.json +45 -0
- package/dist/templates/vanilla/packages/contracts/remappings.txt +3 -0
- package/dist/templates/vanilla/packages/contracts/script/PostDeploy.s.sol +24 -0
- package/dist/templates/vanilla/packages/contracts/src/codegen/Tables.sol +6 -0
- package/dist/templates/vanilla/packages/contracts/src/codegen/tables/Counter.sol +120 -0
- package/dist/templates/vanilla/packages/contracts/src/codegen/world/IIncrementSystem.sol +8 -0
- package/dist/templates/vanilla/packages/contracts/src/codegen/world/IWorld.sol +16 -0
- package/dist/templates/vanilla/packages/contracts/src/systems/IncrementSystem.sol +14 -0
- package/dist/templates/vanilla/packages/contracts/test/CounterTest.t.sol +38 -0
- package/dist/templates/vanilla/packages/contracts/tsconfig.json +13 -0
- package/dist/templates/vanilla/packages/contracts/worlds.json +5 -0
- package/dist/templates/vanilla/pnpm-workspace.yaml +2 -0
- package/package.json +14 -11
- package/dist/templates/minimal/package.json +0 -18
- package/dist/templates/minimal/packages/client/package.json +0 -37
- package/dist/templates/minimal/packages/client/src/config.ts +0 -22
- package/dist/templates/minimal/packages/client/src/index.ts +0 -37
- package/dist/templates/minimal/packages/contracts/chainSpec.json +0 -5
- package/dist/templates/minimal/packages/contracts/deploy.json +0 -4
- package/dist/templates/minimal/packages/contracts/exports.sh +0 -22
- package/dist/templates/minimal/packages/contracts/foundry.toml +0 -11
- package/dist/templates/minimal/packages/contracts/package.json +0 -40
- package/dist/templates/minimal/packages/contracts/remappings.txt +0 -9
- package/dist/templates/minimal/packages/contracts/src/components/CounterComponent.sol +0 -9
- package/dist/templates/minimal/packages/contracts/src/libraries/LibMath.sol +0 -10
- package/dist/templates/minimal/packages/contracts/src/systems/IncrementSystem.sol +0 -22
- package/dist/templates/minimal/packages/contracts/src/systems/README.md +0 -7
- package/dist/templates/minimal/packages/contracts/src/test/Deploy.sol +0 -19
- package/dist/templates/minimal/packages/contracts/src/test/Deploy.t.sol +0 -14
- package/dist/templates/minimal/packages/contracts/src/test/LibDeploy.sol +0 -22
- package/dist/templates/minimal/packages/contracts/tsconfig.json +0 -12
- package/dist/templates/react/packages/client/src/config.ts +0 -22
- package/dist/templates/react/packages/contracts/chainSpec.json +0 -5
- package/dist/templates/react/packages/contracts/deploy.json +0 -4
- package/dist/templates/react/packages/contracts/exports.sh +0 -22
- package/dist/templates/react/packages/contracts/src/components/CounterComponent.sol +0 -9
- package/dist/templates/react/packages/contracts/src/libraries/LibMath.sol +0 -10
- package/dist/templates/react/packages/contracts/src/systems/README.md +0 -7
- package/dist/templates/react/packages/contracts/src/test/Deploy.sol +0 -19
- package/dist/templates/react/packages/contracts/src/test/Deploy.t.sol +0 -14
- package/dist/templates/react/packages/contracts/src/test/LibDeploy.sol +0 -22
- /package/dist/templates/{minimal → phaser}/.gitignore +0 -0
- /package/dist/templates/{minimal → phaser}/.vscode/extensions.json +0 -0
- /package/dist/templates/{minimal → phaser}/.vscode/settings.json +0 -0
- /package/dist/templates/{minimal → phaser}/packages/client/.gitignore +0 -0
- /package/dist/templates/{minimal → phaser}/packages/contracts/.prettierrc +0 -0
- /package/dist/templates/{minimal → phaser}/pnpm-workspace.yaml +0 -0
- /package/dist/templates/{minimal → vanilla}/packages/client/index.html +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node_modules
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mud-template-threejs",
|
|
3
|
+
"private": true,
|
|
4
|
+
"scripts": {
|
|
5
|
+
"build": "pnpm recursive run build",
|
|
6
|
+
"dev": "concurrently -n contracts,client -c cyan,magenta \"cd packages/contracts && pnpm run dev\" \"cd packages/client && pnpm run dev\"",
|
|
7
|
+
"dev:client": "pnpm --filter 'client' run dev",
|
|
8
|
+
"dev:contracts": "pnpm --filter 'contracts' dev",
|
|
9
|
+
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
|
|
10
|
+
"initialize": "pnpm recursive run initialize",
|
|
11
|
+
"mud:up": "pnpm recursive exec mud set-version -v canary && pnpm install",
|
|
12
|
+
"prepare": "(forge --version || pnpm foundry:up)",
|
|
13
|
+
"test": "pnpm recursive run test"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@latticexyz/cli": "{{mud-version}}",
|
|
17
|
+
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
18
|
+
"@typescript-eslint/parser": "5.46.1",
|
|
19
|
+
"concurrently": "^8.0.1",
|
|
20
|
+
"eslint": "8.29.0",
|
|
21
|
+
"rimraf": "^3.0.2",
|
|
22
|
+
"typescript": "^4.9.5"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": "18.x",
|
|
26
|
+
"pnpm": "8.x"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
VITE_CHAIN_ID=31337
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>a minimal MUD client</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="react-root"></div>
|
|
10
|
+
<script type="module" src="/src/index.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "client",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "vite build",
|
|
9
|
+
"dev": "wait-port localhost:8545 && vite",
|
|
10
|
+
"initialize": "pnpm build",
|
|
11
|
+
"preview": "vite preview",
|
|
12
|
+
"test": "tsc --noEmit"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@ethersproject/providers": "^5.7.2",
|
|
16
|
+
"@latticexyz/common": "{{mud-version}}",
|
|
17
|
+
"@latticexyz/dev-tools": "{{mud-version}}",
|
|
18
|
+
"@latticexyz/network": "{{mud-version}}",
|
|
19
|
+
"@latticexyz/react": "{{mud-version}}",
|
|
20
|
+
"@latticexyz/recs": "{{mud-version}}",
|
|
21
|
+
"@latticexyz/schema-type": "{{mud-version}}",
|
|
22
|
+
"@latticexyz/std-client": "{{mud-version}}",
|
|
23
|
+
"@latticexyz/utils": "{{mud-version}}",
|
|
24
|
+
"@latticexyz/world": "{{mud-version}}",
|
|
25
|
+
"@react-three/fiber": "^8.12.0",
|
|
26
|
+
"@wagmi/chains": "^0.2.22",
|
|
27
|
+
"contracts": "workspace:*",
|
|
28
|
+
"ethers": "^5.7.2",
|
|
29
|
+
"react": "^18.2.0",
|
|
30
|
+
"react-dom": "^18.2.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/react": "^18.2.6",
|
|
34
|
+
"@types/react-dom": "^18.2.4",
|
|
35
|
+
"@vitejs/plugin-react": "^3.1.0",
|
|
36
|
+
"eslint-plugin-react": "7.31.11",
|
|
37
|
+
"eslint-plugin-react-hooks": "4.6.0",
|
|
38
|
+
"vite": "^4.2.1",
|
|
39
|
+
"wait-port": "^1.0.4"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Canvas, Color, ThreeElements, useThree } from "@react-three/fiber";
|
|
3
|
+
import { useComponentValue, useEntityQuery } from "@latticexyz/react";
|
|
4
|
+
import { getComponentValueStrict, Has } from "@latticexyz/recs";
|
|
5
|
+
import { useMUD } from "./MUDContext";
|
|
6
|
+
import { useKeyboardMovement } from "./useKeyboardMovement";
|
|
7
|
+
|
|
8
|
+
const Plane = (props: ThreeElements["mesh"]) => {
|
|
9
|
+
return (
|
|
10
|
+
<mesh {...props}>
|
|
11
|
+
{/* eslint-disable-next-line react/no-unknown-property */}
|
|
12
|
+
<boxGeometry args={[10, 5, 10]} />
|
|
13
|
+
<meshStandardMaterial color="green" />
|
|
14
|
+
</mesh>
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Player = (props: ThreeElements["mesh"] & { color: Color }) => {
|
|
19
|
+
return (
|
|
20
|
+
<mesh {...props}>
|
|
21
|
+
{/* eslint-disable-next-line react/no-unknown-property */}
|
|
22
|
+
<boxGeometry args={[1, 2, 1]} />
|
|
23
|
+
<meshStandardMaterial color={props.color} />
|
|
24
|
+
</mesh>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const Scene = () => {
|
|
29
|
+
const {
|
|
30
|
+
components: { Position },
|
|
31
|
+
network: { playerEntity },
|
|
32
|
+
} = useMUD();
|
|
33
|
+
|
|
34
|
+
useKeyboardMovement();
|
|
35
|
+
|
|
36
|
+
const playerPosition = useComponentValue(Position, playerEntity);
|
|
37
|
+
const players = useEntityQuery([Has(Position)]).map((entity) => {
|
|
38
|
+
const position = getComponentValueStrict(Position, entity);
|
|
39
|
+
return {
|
|
40
|
+
entity,
|
|
41
|
+
position,
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
useThree(({ camera }) => {
|
|
46
|
+
if (playerPosition) {
|
|
47
|
+
camera.position.set(playerPosition.x - 5, playerPosition.y + 5, playerPosition.z + 5);
|
|
48
|
+
} else {
|
|
49
|
+
camera.position.set(-5, 5, 5);
|
|
50
|
+
}
|
|
51
|
+
camera.rotation.order = "YXZ";
|
|
52
|
+
camera.rotation.y = -Math.PI / 4;
|
|
53
|
+
camera.rotation.x = Math.atan(-1 / Math.sqrt(2));
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<group>
|
|
58
|
+
<ambientLight />
|
|
59
|
+
{/* eslint-disable-next-line react/no-unknown-property */}
|
|
60
|
+
<pointLight position={[10, 10, 10]} />
|
|
61
|
+
<Plane position={[0, -5, 0]} />
|
|
62
|
+
{players.map((p, i) => (
|
|
63
|
+
<Player
|
|
64
|
+
key={i}
|
|
65
|
+
color={Math.floor(parseInt(p.entity) * 123456) % 16777215}
|
|
66
|
+
position={[p.position.x, p.position.y, p.position.z]}
|
|
67
|
+
/>
|
|
68
|
+
))}
|
|
69
|
+
</group>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const styles = { height: "100vh" };
|
|
74
|
+
|
|
75
|
+
export const App = () => {
|
|
76
|
+
return (
|
|
77
|
+
<Canvas style={styles}>
|
|
78
|
+
<Scene />
|
|
79
|
+
</Canvas>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createContext, ReactNode, useContext } from "react";
|
|
2
|
+
import { SetupResult } from "./mud/setup";
|
|
3
|
+
|
|
4
|
+
const MUDContext = createContext<SetupResult | null>(null);
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
value: SetupResult;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const MUDProvider = ({ children, value }: Props) => {
|
|
12
|
+
const currentValue = useContext(MUDContext);
|
|
13
|
+
if (currentValue) throw new Error("MUDProvider can only be used once");
|
|
14
|
+
return <MUDContext.Provider value={value}>{children}</MUDContext.Provider>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const useMUD = () => {
|
|
18
|
+
const value = useContext(MUDContext);
|
|
19
|
+
if (!value) throw new Error("Must be used within a MUDProvider");
|
|
20
|
+
return value;
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ReactDOM from "react-dom/client";
|
|
2
|
+
import { mount as mountDevTools } from "@latticexyz/dev-tools";
|
|
3
|
+
import { App } from "./App";
|
|
4
|
+
import { setup } from "./mud/setup";
|
|
5
|
+
import { MUDProvider } from "./MUDContext";
|
|
6
|
+
|
|
7
|
+
const rootElement = document.getElementById("react-root");
|
|
8
|
+
if (!rootElement) throw new Error("React root not found");
|
|
9
|
+
const root = ReactDOM.createRoot(rootElement);
|
|
10
|
+
|
|
11
|
+
// TODO: figure out if we actually want this to be async or if we should render something else in the meantime
|
|
12
|
+
setup().then((result) => {
|
|
13
|
+
root.render(
|
|
14
|
+
<MUDProvider value={result}>
|
|
15
|
+
<App />
|
|
16
|
+
</MUDProvider>
|
|
17
|
+
);
|
|
18
|
+
mountDevTools();
|
|
19
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
|
|
3
|
+
import { TableId } from "@latticexyz/utils";
|
|
4
|
+
import { defineComponent, Type as RecsType, World } from "@latticexyz/recs";
|
|
5
|
+
|
|
6
|
+
export function defineContractComponents(world: World) {
|
|
7
|
+
return {
|
|
8
|
+
Position: (() => {
|
|
9
|
+
const tableId = new TableId("", "Position");
|
|
10
|
+
return defineComponent(
|
|
11
|
+
world,
|
|
12
|
+
{
|
|
13
|
+
x: RecsType.Number,
|
|
14
|
+
y: RecsType.Number,
|
|
15
|
+
z: RecsType.Number,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
metadata: {
|
|
19
|
+
contractId: tableId.toHexString(),
|
|
20
|
+
tableId: tableId.toString(),
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
})(),
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SetupNetworkResult } from "./setupNetwork";
|
|
2
|
+
|
|
3
|
+
export type ClientComponents = ReturnType<typeof createClientComponents>;
|
|
4
|
+
|
|
5
|
+
export function createClientComponents({ components }: SetupNetworkResult) {
|
|
6
|
+
return {
|
|
7
|
+
...components,
|
|
8
|
+
// add your client components or overrides here
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { awaitStreamValue } from "@latticexyz/utils";
|
|
2
|
+
import { SetupNetworkResult } from "./setupNetwork";
|
|
3
|
+
|
|
4
|
+
export type SystemCalls = ReturnType<typeof createSystemCalls>;
|
|
5
|
+
|
|
6
|
+
export function createSystemCalls({ worldSend, txReduced$ }: SetupNetworkResult) {
|
|
7
|
+
const move = async (x: number, y: number, z: number) => {
|
|
8
|
+
const tx = await worldSend("move", [x, y, z]);
|
|
9
|
+
await awaitStreamValue(txReduced$, (txHash) => txHash === tx.hash);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
move,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { SetupContractConfig, getBurnerWallet } from "@latticexyz/std-client";
|
|
2
|
+
import worldsJson from "contracts/worlds.json";
|
|
3
|
+
import { supportedChains } from "./supportedChains";
|
|
4
|
+
|
|
5
|
+
const worlds = worldsJson as Partial<Record<string, { address: string; blockNumber?: number }>>;
|
|
6
|
+
|
|
7
|
+
type NetworkConfig = SetupContractConfig & {
|
|
8
|
+
privateKey: string;
|
|
9
|
+
faucetServiceUrl?: string;
|
|
10
|
+
snapSync?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export async function getNetworkConfig(): Promise<NetworkConfig> {
|
|
14
|
+
const params = new URLSearchParams(window.location.search);
|
|
15
|
+
|
|
16
|
+
const chainId = Number(params.get("chainId") || import.meta.env.VITE_CHAIN_ID || 31337);
|
|
17
|
+
const chainIndex = supportedChains.findIndex((c) => c.id === chainId);
|
|
18
|
+
const chain = supportedChains[chainIndex];
|
|
19
|
+
if (!chain) {
|
|
20
|
+
throw new Error(`Chain ${chainId} not found`);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const world = worlds[chain.id.toString()];
|
|
24
|
+
const worldAddress = params.get("worldAddress") || world?.address;
|
|
25
|
+
if (!worldAddress) {
|
|
26
|
+
throw new Error(`No world address found for chain ${chainId}. Did you run \`mud deploy\`?`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const initialBlockNumber = params.has("initialBlockNumber")
|
|
30
|
+
? Number(params.get("initialBlockNumber"))
|
|
31
|
+
: world?.blockNumber ?? -1; // -1 will attempt to find the block number from RPC
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
clock: {
|
|
35
|
+
period: 1000,
|
|
36
|
+
initialTime: 0,
|
|
37
|
+
syncInterval: 5000,
|
|
38
|
+
},
|
|
39
|
+
provider: {
|
|
40
|
+
chainId,
|
|
41
|
+
jsonRpcUrl: params.get("rpc") ?? chain.rpcUrls.default.http[0],
|
|
42
|
+
wsRpcUrl: params.get("wsRpc") ?? chain.rpcUrls.default.webSocket?.[0],
|
|
43
|
+
},
|
|
44
|
+
privateKey: getBurnerWallet().value,
|
|
45
|
+
chainId,
|
|
46
|
+
modeUrl: params.get("mode") ?? chain.modeUrl,
|
|
47
|
+
faucetServiceUrl: params.get("faucet") ?? chain.faucetUrl,
|
|
48
|
+
worldAddress,
|
|
49
|
+
initialBlockNumber,
|
|
50
|
+
snapSync: params.get("snapSync") === "true",
|
|
51
|
+
disableCache: params.get("cache") === "false",
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createClientComponents } from "./createClientComponents";
|
|
2
|
+
import { createSystemCalls } from "./createSystemCalls";
|
|
3
|
+
import { setupNetwork } from "./setupNetwork";
|
|
4
|
+
|
|
5
|
+
export type SetupResult = Awaited<ReturnType<typeof setup>>;
|
|
6
|
+
|
|
7
|
+
export async function setup() {
|
|
8
|
+
const network = await setupNetwork();
|
|
9
|
+
const components = createClientComponents(network);
|
|
10
|
+
const systemCalls = createSystemCalls(network);
|
|
11
|
+
return {
|
|
12
|
+
network,
|
|
13
|
+
components,
|
|
14
|
+
systemCalls,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { setupMUDV2Network } from "@latticexyz/std-client";
|
|
2
|
+
import { createFastTxExecutor, createFaucetService, getSnapSyncRecords } from "@latticexyz/network";
|
|
3
|
+
import { getNetworkConfig } from "./getNetworkConfig";
|
|
4
|
+
import { defineContractComponents } from "./contractComponents";
|
|
5
|
+
import { world } from "./world";
|
|
6
|
+
import { Contract, Signer, utils } from "ethers";
|
|
7
|
+
import { JsonRpcProvider } from "@ethersproject/providers";
|
|
8
|
+
import { IWorld__factory } from "contracts/types/ethers-contracts/factories/IWorld__factory";
|
|
9
|
+
import { getTableIds } from "@latticexyz/utils";
|
|
10
|
+
import storeConfig from "contracts/mud.config";
|
|
11
|
+
|
|
12
|
+
export type SetupNetworkResult = Awaited<ReturnType<typeof setupNetwork>>;
|
|
13
|
+
|
|
14
|
+
export async function setupNetwork() {
|
|
15
|
+
const contractComponents = defineContractComponents(world);
|
|
16
|
+
const networkConfig = await getNetworkConfig();
|
|
17
|
+
const result = await setupMUDV2Network<typeof contractComponents, typeof storeConfig>({
|
|
18
|
+
networkConfig,
|
|
19
|
+
world,
|
|
20
|
+
contractComponents,
|
|
21
|
+
syncThread: "main",
|
|
22
|
+
storeConfig,
|
|
23
|
+
worldAbi: IWorld__factory.abi,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Request drip from faucet
|
|
27
|
+
const signer = result.network.signer.get();
|
|
28
|
+
if (networkConfig.faucetServiceUrl && signer) {
|
|
29
|
+
const address = await signer.getAddress();
|
|
30
|
+
console.info("[Dev Faucet]: Player address -> ", address);
|
|
31
|
+
|
|
32
|
+
const faucet = createFaucetService(networkConfig.faucetServiceUrl);
|
|
33
|
+
|
|
34
|
+
const requestDrip = async () => {
|
|
35
|
+
const balance = await signer.getBalance();
|
|
36
|
+
console.info(`[Dev Faucet]: Player balance -> ${balance}`);
|
|
37
|
+
const lowBalance = balance?.lte(utils.parseEther("1"));
|
|
38
|
+
if (lowBalance) {
|
|
39
|
+
console.info("[Dev Faucet]: Balance is low, dripping funds to player");
|
|
40
|
+
// Double drip
|
|
41
|
+
await faucet.dripDev({ address });
|
|
42
|
+
await faucet.dripDev({ address });
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
requestDrip();
|
|
47
|
+
// Request a drip every 20 seconds
|
|
48
|
+
setInterval(requestDrip, 20000);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const provider = result.network.providers.get().json;
|
|
52
|
+
const signerOrProvider = signer ?? provider;
|
|
53
|
+
// Create a World contract instance
|
|
54
|
+
const worldContract = IWorld__factory.connect(networkConfig.worldAddress, signerOrProvider);
|
|
55
|
+
|
|
56
|
+
if (networkConfig.snapSync) {
|
|
57
|
+
const currentBlockNumber = await provider.getBlockNumber();
|
|
58
|
+
const tableRecords = await getSnapSyncRecords(
|
|
59
|
+
networkConfig.worldAddress,
|
|
60
|
+
getTableIds(storeConfig),
|
|
61
|
+
currentBlockNumber,
|
|
62
|
+
signerOrProvider
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
console.log(`Syncing ${tableRecords.length} records`);
|
|
66
|
+
result.startSync(tableRecords, currentBlockNumber);
|
|
67
|
+
} else {
|
|
68
|
+
result.startSync();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Create a fast tx executor
|
|
72
|
+
const fastTxExecutor =
|
|
73
|
+
signer?.provider instanceof JsonRpcProvider
|
|
74
|
+
? await createFastTxExecutor(signer as Signer & { provider: JsonRpcProvider })
|
|
75
|
+
: null;
|
|
76
|
+
|
|
77
|
+
// TODO: infer this from fastTxExecute signature?
|
|
78
|
+
type BoundFastTxExecuteFn<C extends Contract> = <F extends keyof C>(
|
|
79
|
+
func: F,
|
|
80
|
+
args: Parameters<C[F]>,
|
|
81
|
+
options?: {
|
|
82
|
+
retryCount?: number;
|
|
83
|
+
}
|
|
84
|
+
) => Promise<ReturnType<C[F]>>;
|
|
85
|
+
|
|
86
|
+
function bindFastTxExecute<C extends Contract>(contract: C): BoundFastTxExecuteFn<C> {
|
|
87
|
+
return async function (...args) {
|
|
88
|
+
if (!fastTxExecutor) {
|
|
89
|
+
throw new Error("no signer");
|
|
90
|
+
}
|
|
91
|
+
const { tx } = await fastTxExecutor.fastTxExecute(contract, ...args);
|
|
92
|
+
return await tx;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
...result,
|
|
98
|
+
worldContract,
|
|
99
|
+
worldSend: bindFastTxExecute(worldContract),
|
|
100
|
+
fastTxExecutor,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { MUDChain, latticeTestnet } from "@latticexyz/common/chains";
|
|
2
|
+
import { foundry } from "@wagmi/chains";
|
|
3
|
+
|
|
4
|
+
// If you are deploying to chains other than anvil or Lattice testnet, add them here
|
|
5
|
+
export const supportedChains: MUDChain[] = [foundry, latticeTestnet];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getComponentValue } from "@latticexyz/recs";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
import { useMUD } from "./MUDContext";
|
|
4
|
+
|
|
5
|
+
export const useKeyboardMovement = () => {
|
|
6
|
+
const {
|
|
7
|
+
components: { Position },
|
|
8
|
+
network: {
|
|
9
|
+
worldSend,
|
|
10
|
+
network: { signer },
|
|
11
|
+
playerEntity,
|
|
12
|
+
},
|
|
13
|
+
} = useMUD();
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
const moveTo = async (x: number, y: number, z: number) => {
|
|
17
|
+
const s = signer.get();
|
|
18
|
+
if (!s) throw new Error("No signer");
|
|
19
|
+
|
|
20
|
+
const txResult = await worldSend("move", [x, y, z]);
|
|
21
|
+
await txResult.wait();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const moveBy = async (deltaX: number, deltaY: number, deltaZ: number) => {
|
|
25
|
+
if (playerEntity) {
|
|
26
|
+
const playerPosition = getComponentValue(Position, playerEntity);
|
|
27
|
+
|
|
28
|
+
if (playerPosition) {
|
|
29
|
+
await moveTo(playerPosition.x + deltaX, playerPosition.y + deltaY, playerPosition.z + deltaZ);
|
|
30
|
+
} else {
|
|
31
|
+
await moveTo(deltaX, deltaY, deltaZ);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const listener = (e: KeyboardEvent) => {
|
|
37
|
+
if (e.key === "ArrowUp") {
|
|
38
|
+
moveBy(1, 0, 0);
|
|
39
|
+
}
|
|
40
|
+
if (e.key === "ArrowDown") {
|
|
41
|
+
moveBy(-1, 0, 0);
|
|
42
|
+
}
|
|
43
|
+
if (e.key === "ArrowLeft") {
|
|
44
|
+
moveBy(0, 0, -1);
|
|
45
|
+
}
|
|
46
|
+
if (e.key === "ArrowRight") {
|
|
47
|
+
moveBy(0, 0, 1);
|
|
48
|
+
}
|
|
49
|
+
if (e.key === " ") {
|
|
50
|
+
moveBy(0, 1, 0);
|
|
51
|
+
}
|
|
52
|
+
if (e.ctrlKey) {
|
|
53
|
+
moveBy(0, -1, 0);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
window.addEventListener("keydown", listener);
|
|
58
|
+
return () => window.removeEventListener("keydown", listener);
|
|
59
|
+
}, [Position, playerEntity, signer, worldSend]);
|
|
60
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"types": ["vite/client"],
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"lib": ["ESNext", "DOM"],
|
|
8
|
+
"moduleResolution": "Node",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
"jsxImportSource": "react"
|
|
17
|
+
},
|
|
18
|
+
"include": ["src"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This .env file is for demonstration purposes only.
|
|
2
|
+
#
|
|
3
|
+
# This should usually be excluded via .gitignore and the env vars attached to
|
|
4
|
+
# your deployment enviroment, but we're including this here for ease of local
|
|
5
|
+
# development. Please do not commit changes to this file!
|
|
6
|
+
#
|
|
7
|
+
# Anvil default private key:
|
|
8
|
+
PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": ["solhint:recommended", "mud"],
|
|
3
|
+
"plugins": ["mud"],
|
|
4
|
+
"rules": {
|
|
5
|
+
"compiler-version": ["error", ">=0.8.0"],
|
|
6
|
+
"avoid-low-level-calls": "off",
|
|
7
|
+
"no-inline-assembly": "off",
|
|
8
|
+
"func-visibility": ["warn", { "ignoreConstructors": true }],
|
|
9
|
+
"no-empty-blocks": "off",
|
|
10
|
+
"no-complex-fallback": "off"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[profile.default]
|
|
2
|
+
solc_version = "0.8.13"
|
|
3
|
+
ffi = false
|
|
4
|
+
fuzz_runs = 256
|
|
5
|
+
optimizer = true
|
|
6
|
+
optimizer_runs = 3000
|
|
7
|
+
verbosity = 2
|
|
8
|
+
src = "src"
|
|
9
|
+
test = "test"
|
|
10
|
+
out = "out"
|
|
11
|
+
allow_paths = ["../../node_modules", "../../../../packages"]
|
|
12
|
+
extra_output_files = [
|
|
13
|
+
"abi",
|
|
14
|
+
"evm.bytecode"
|
|
15
|
+
]
|
|
16
|
+
fs_permissions = [{ access = "read", path = "./"}]
|
|
17
|
+
|
|
18
|
+
[profile.lattice-testnet]
|
|
19
|
+
eth_rpc_url = "https://follower.testnet-chain.linfra.xyz"
|
|
20
|
+
|
|
21
|
+
[profile.hackathon-testnet]
|
|
22
|
+
eth_rpc_url = "https://lattice-goerli-sequencer.optimism.io"
|