Skip to content

Commit 1d354b8

Browse files
authored
feat(explorer): add pyrope testnet support (#3619)
1 parent 7ed24c7 commit 1d354b8

6 files changed

Lines changed: 58 additions & 2 deletions

File tree

.changeset/angry-otters-joke.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@latticexyz/common": patch
3+
"@latticexyz/explorer": patch
4+
---
5+
6+
Added Pyrope testnet chain.

examples/local-explorer/packages/contracts/foundry.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ eth_rpc_url = "https://rpc.garnetchain.com"
2727

2828
[profile.redstone]
2929
eth_rpc_url = "https://rpc.redstonechain.com"
30+
31+
[profile.pyrope]
32+
eth_rpc_url = "https://rpc.pyropechain.com"

examples/local-explorer/packages/contracts/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"clean": "forge clean && shx rm -rf src/**/codegen",
99
"deploy:garnet": "mud deploy --profile=garnet",
1010
"deploy:local": "mud deploy",
11+
"deploy:pyrope": "mud deploy --profile=pyrope",
1112
"deploy:redstone": "mud deploy --profile=redstone",
1213
"dev": "mud dev-contracts",
1314
"lint": "pnpm run prettier && pnpm run solhint",

packages/common/src/chains/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export { mudFoundry } from "./mudFoundry";
33
export { redstone } from "./redstone";
44
export { garnet } from "./garnet";
55
export { rhodolite } from "./rhodolite";
6+
export { pyrope } from "./pyrope";
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { chainConfig } from "viem/op-stack";
2+
import { MUDChain } from "./types";
3+
import { Chain } from "viem";
4+
5+
const sourceId = 11155111;
6+
7+
const defaultRpcUrls = {
8+
http: ["https://rpc.pyropechain.com"],
9+
webSocket: ["wss://rpc.pyropechain.com"],
10+
} as const satisfies Chain["rpcUrls"]["default"];
11+
12+
export const pyrope = {
13+
...chainConfig,
14+
name: "Pyrope Testnet",
15+
testnet: true,
16+
id: 695569,
17+
sourceId,
18+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
19+
rpcUrls: {
20+
default: defaultRpcUrls,
21+
bundler: defaultRpcUrls,
22+
quarryPassIssuer: defaultRpcUrls,
23+
wiresaw: defaultRpcUrls,
24+
},
25+
contracts: {
26+
...chainConfig.contracts,
27+
l1StandardBridge: {
28+
[sourceId]: {
29+
address: "0xC24932c31D9621aE9e792576152B7ef010cFC2F8",
30+
},
31+
},
32+
},
33+
blockExplorers: {
34+
default: {
35+
name: "Blockscout",
36+
url: "https://explorer.pyropechain.com",
37+
},
38+
worldsExplorer: {
39+
name: "MUD Worlds Explorer",
40+
url: "https://explorer.mud.dev/pyrope/worlds",
41+
},
42+
},
43+
iconUrls: ["https://lattice.xyz/brand/color/pyrope.svg"],
44+
indexerUrl: "https://indexer.mud.pyropechain.com",
45+
} as const satisfies MUDChain;

packages/explorer/src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { anvil } from "viem/chains";
2-
import { garnet, redstone, rhodolite } from "@latticexyz/common/chains";
2+
import { garnet, pyrope, redstone, rhodolite } from "@latticexyz/common/chains";
33

44
export const internalNamespaces = ["world", "store", "metadata", "puppet", "erc20-puppet", "erc721-puppet"];
55

6-
export const supportedChains = { anvil, rhodolite, garnet, redstone } as const;
6+
export const supportedChains = { anvil, rhodolite, garnet, redstone, pyrope } as const;
77
export type supportedChains = typeof supportedChains;
88

99
export type supportedChainName = keyof supportedChains;

0 commit comments

Comments
 (0)