Skip to content

Commit

Permalink
feat(common): add rhodolite chain (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Oct 16, 2024
1 parent 4b46409 commit 41a6e2f
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 65 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-turkeys-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/common": patch
---

Added Rhodolite devnet chain config and removed the old and now-defunct Lattice testnet chain config.
6 changes: 3 additions & 3 deletions e2e/packages/client-vanilla/src/mud/supportedChains.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";
import { MUDChain, mudFoundry } from "@latticexyz/common/chains";

// If you are deploying to chains other than anvil or Lattice testnet, add them here
export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];
// If you are deploying to chains other than anvil, add them here
export const supportedChains: MUDChain[] = [mudFoundry];
20 changes: 2 additions & 18 deletions examples/local-explorer/packages/client/src/mud/supportedChains.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
/*
* The supported chains.
* By default, there are only two chains here:
*
* - mudFoundry, the chain running on anvil that pnpm dev
* starts by default. It is similar to the viem anvil chain
* (see https://viem.sh/docs/clients/test.html), but with the
* basefee set to zero to avoid transaction fees.
* - latticeTestnet, our public test network.
*
*/
import { MUDChain, mudFoundry, redstone, garnet, rhodolite } from "@latticexyz/common/chains";

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

/*
* 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[] = [mudFoundry, redstone, garnet, rhodolite];
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";
import { MUDChain, mudFoundry } from "@latticexyz/common/chains";

// If you are deploying to chains other than anvil or Lattice testnet, add them here
export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];
// If you are deploying to chains other than anvil, add them here
export const supportedChains: MUDChain[] = [mudFoundry];
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";
import { MUDChain, mudFoundry } from "@latticexyz/common/chains";

// If you are deploying to chains other than anvil or Lattice testnet, add them here
export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];
// If you are deploying to chains other than anvil, add them here
export const supportedChains: MUDChain[] = [mudFoundry];
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";
import { MUDChain, mudFoundry } from "@latticexyz/common/chains";

// If you are deploying to chains other than anvil or Lattice testnet, add them here
export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];
// If you are deploying to chains other than anvil, add them here
export const supportedChains: MUDChain[] = [mudFoundry];
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ import worlds from "contracts/worlds.json";

/*
* The supported chains.
* By default, there are only two chains here:
*
* - mudFoundry, the chain running on anvil that pnpm dev
* starts by default. It is similar to the viem anvil chain
* (see https://viem.sh/docs/clients/test.html), but with the
* basefee set to zero to avoid transaction fees.
* - latticeTestnet, our public test network.
*
* See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
* for instructions on how to add networks.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
/*
* The supported chains.
* By default, there are only two chains here:
*
* - mudFoundry, the chain running on anvil that pnpm dev
* starts by default. It is similar to the viem anvil chain
* (see https://viem.sh/docs/clients/test.html), but with the
* basefee set to zero to avoid transaction fees.
* - latticeTestnet, our public test network.
*
*/

import { MUDChain, latticeTestnet, mudFoundry } from "@latticexyz/common/chains";
import { MUDChain, mudFoundry } from "@latticexyz/common/chains";

/*
* See https://mud.dev/tutorials/minimal/deploy#run-the-user-interface
* for instructions on how to add networks.
*/
export const supportedChains: MUDChain[] = [mudFoundry, latticeTestnet];
export const supportedChains: MUDChain[] = [mudFoundry];
4 changes: 2 additions & 2 deletions packages/common/src/chains/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export type { MUDChain } from "./types";
export { mudFoundry } from "./mudFoundry";
export { latticeTestnet } from "./latticeTestnet";
export { garnet } from "./garnet";
export { redstone } from "./redstone";
export { garnet } from "./garnet";
export { rhodolite } from "./rhodolite";
25 changes: 0 additions & 25 deletions packages/common/src/chains/latticeTestnet.ts

This file was deleted.

20 changes: 20 additions & 0 deletions packages/common/src/chains/rhodolite.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { chainConfig } from "viem/op-stack";
import { MUDChain } from "./types";

const sourceId = 17001;

export const rhodolite = {
...chainConfig,
name: "Rhodolite Devnet",
testnet: true,
id: 17420,
sourceId,
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.rhodolitechain.com"],
},
},
iconUrls: ["https://redstone.xyz/chain-icons/rhodolite.png"],
indexerUrl: "https://indexer.mud.rhodolitechain.com",
} as const satisfies MUDChain;

0 comments on commit 41a6e2f

Please sign in to comment.