Skip to content

Commit

Permalink
feat(common): add redstone chain config (#2749)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Apr 26, 2024
1 parent df4781a commit f23318e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .changeset/tall-steaks-give.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"@latticexyz/common": patch
---

Added Garnet chain config and deprecated Lattice Testnet.
Added Garnet testnet and Redstone mainnet chain configs and deprecated Lattice Testnet.

```ts
import { garnet } from "@latticexyz/common/chains";
import { garnet, redstone } from "@latticexyz/common/chains";
```
4 changes: 0 additions & 4 deletions packages/common/src/chains/garnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ export const garnet = {
name: "Blockscout",
url: "https://explorer.garnetchain.com",
},
blockscout: {
name: "Blockscout",
url: "https://garnet.blockscout.com",
},
},
contracts: {
multicall3: {
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export type { MUDChain } from "./types";
export { mudFoundry } from "./mudFoundry";
export { latticeTestnet } from "./latticeTestnet";
export { garnet } from "./garnet";
export { redstone } from "./redstone";
29 changes: 29 additions & 0 deletions packages/common/src/chains/redstone.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { chainConfig } from "viem/op-stack";
import type { MUDChain } from "./types";

const sourceId = 1; // Ethereum mainnet

export const redstone = {
...chainConfig,
id: 690,
sourceId,
name: "Redstone",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
http: ["https://rpc.redstonechain.com"],
webSocket: ["wss://rpc.redstonechain.com"],
},
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://explorer.redstone.xyz",
},
},
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
},
},
} as const satisfies MUDChain;

0 comments on commit f23318e

Please sign in to comment.