Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(common): add rhodolite chain #3295

Merged
merged 3 commits into from
Oct 16, 2024
Merged
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
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];
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
@@ -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.
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;