From bad3ad1bd9bb86bc7eb83cfb299df92d14c64c46 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Wed, 1 May 2024 11:13:31 +0100 Subject: [PATCH] feat(common): add chain icons (#2778) --- .changeset/shy-eggs-wave.md | 5 +++++ packages/common/src/chains/garnet.ts | 3 ++- packages/common/src/chains/mudFoundry.ts | 3 +-- packages/common/src/chains/redstone.ts | 3 ++- packages/common/src/chains/types.ts | 2 ++ 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/shy-eggs-wave.md diff --git a/.changeset/shy-eggs-wave.md b/.changeset/shy-eggs-wave.md new file mode 100644 index 0000000000..e37b2f2b0f --- /dev/null +++ b/.changeset/shy-eggs-wave.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/common": patch +--- + +Added chain icons to Redstone and Garnet chain configs via `chain.iconUrls`. diff --git a/packages/common/src/chains/garnet.ts b/packages/common/src/chains/garnet.ts index 1a09725a91..6e6de8b439 100644 --- a/packages/common/src/chains/garnet.ts +++ b/packages/common/src/chains/garnet.ts @@ -22,7 +22,6 @@ export const garnet = { url: "https://explorer.garnetchain.com", }, }, - indexerUrl: "https://indexer.mud.garnetchain.com", contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", @@ -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; diff --git a/packages/common/src/chains/mudFoundry.ts b/packages/common/src/chains/mudFoundry.ts index 29705d4684..1754534d8d 100644 --- a/packages/common/src/chains/mudFoundry.ts +++ b/packages/common/src/chains/mudFoundry.ts @@ -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; diff --git a/packages/common/src/chains/redstone.ts b/packages/common/src/chains/redstone.ts index 6581b0362a..e9feb4ff6e 100644 --- a/packages/common/src/chains/redstone.ts +++ b/packages/common/src/chains/redstone.ts @@ -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; diff --git a/packages/common/src/chains/types.ts b/packages/common/src/chains/types.ts index fcadfb423c..c78e74d4aa 100644 --- a/packages/common/src/chains/types.ts +++ b/packages/common/src/chains/types.ts @@ -1,6 +1,8 @@ import type { Chain } from "viem/chains"; export type MUDChain = Chain & { + iconUrls?: readonly string[]; indexerUrl?: string; + /** @deprecated */ faucetUrl?: string; };