Skip to content

Commit

Permalink
feat(common): add chain icons (#2778)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored May 1, 2024
1 parent 0b6b70f commit bad3ad1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-eggs-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/common": patch
---

Added chain icons to Redstone and Garnet chain configs via `chain.iconUrls`.
3 changes: 2 additions & 1 deletion packages/common/src/chains/garnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const garnet = {
url: "https://explorer.garnetchain.com",
},
},
indexerUrl: "https://indexer.mud.garnetchain.com",
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
Expand All @@ -46,4 +45,6 @@ export const garnet = {
},
},
},
iconUrls: ["https://redstone.xyz/chain-icons/garnet.png"],
indexerUrl: "https://indexer.mud.garnetchain.com",
} as const satisfies MUDChain;
3 changes: 1 addition & 2 deletions packages/common/src/chains/mudFoundry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { MUDChain } from "./types";
export const mudFoundry = {
...foundry,
fees: {
// This is intentionally defined as a function as a workaround for https://github.com/wagmi-dev/viem/pull/1280
defaultPriorityFee: () => 0n,
defaultPriorityFee: 0n,
},
} as const satisfies MUDChain;
3 changes: 2 additions & 1 deletion packages/common/src/chains/redstone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export const redstone = {
url: "https://explorer.redstone.xyz",
},
},
indexerUrl: "https://indexer.mud.redstonechain.com",
contracts: {
multicall3: {
address: "0xca11bde05977b3631167028862be2a173976ca11",
},
},
iconUrls: ["https://redstone.xyz/chain-icons/redstone.png"],
indexerUrl: "https://indexer.mud.redstonechain.com",
} as const satisfies MUDChain;
2 changes: 2 additions & 0 deletions packages/common/src/chains/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Chain } from "viem/chains";

export type MUDChain = Chain & {
iconUrls?: readonly string[];
indexerUrl?: string;
/** @deprecated */
faucetUrl?: string;
};

0 comments on commit bad3ad1

Please sign in to comment.