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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"private": true,
"scripts": {
"build": "pnpm recursive run build",
"build:client": "pnpm --filter 'client' run build",
"dev": "mprocs",
"dev:client": "pnpm --filter 'client' run dev",
"dev:contracts": "pnpm --filter 'contracts' dev",
"foundry:up": "curl -L https://foundry.paradigm.xyz | bash && bash $HOME/.foundry/bin/foundryup",
"mud:up": "pnpm mud set-version --tag main && pnpm install",
"format:client": "pnpm --filter 'client' run format",
"lint:client": "pnpm --filter 'client' run lint",
"prepare": "(forge --version || pnpm foundry:up)",
"test": "pnpm recursive run test"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/client/.env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
VITE_WALLET_CONNECT_PROJECT_ID=
VITE_CHAIN_ID=31337
VITE_HTTPS_RPC_URL=
VITE_WS_RPC_URL=
40 changes: 33 additions & 7 deletions packages/client/src/mud/supportedChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,41 @@
*
*/

import {
garnet,
MUDChain,
mudFoundry,
redstone,
} from '@latticexyz/common/chains';
import { MUDChain, mudFoundry } from '@latticexyz/common/chains';

export const baseSepolia = {
name: 'Base Sepolia',
id: 84532,
network: 'Base Sepolia',
nativeCurrency: { decimals: 18, name: 'Ether', symbol: 'ETH' },
rpcUrls: {
default: {
http: [import.meta.env.VITE_HTTPS_RPC_URL],
webSocket: [import.meta.env.VITE_WS_RPC_URL],
},
public: {
http: [import.meta.env.VITE_HTTPS_RPC_URL],
webSocket: [import.meta.env.VITE_WS_RPC_URL],
},
},
blockExplorers: {
default: {
name: 'Base Sepolia',
url: 'https://sepolia-explorer.base.org',
},
},
};

const getSupportedChains = () => {
if (import.meta.env.DEV) {
return [mudFoundry];
}

return [baseSepolia];
};

/*
* See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
* for instructions on how to add networks.
*/
export const supportedChains: MUDChain[] = [mudFoundry, redstone, garnet];
export const supportedChains: MUDChain[] = getSupportedChains();
3 changes: 2 additions & 1 deletion packages/contracts/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
out/
out/*
!out/IWorld.sol
cache/
node_modules/
bindings/
Expand Down
3 changes: 3 additions & 0 deletions packages/contracts/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,6 @@ eth_rpc_url = "https://rpc.garnetchain.com"

[profile.redstone]
eth_rpc_url = "https://rpc.redstonechain.com"

[profile.base-sepolia]
eth_rpc_url = ""
Loading