Skip to content

Commit

Permalink
feat: sei, filecoin, rootstock, mode chain support
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Jul 24, 2024
1 parent 41fb580 commit 4b290b2
Show file tree
Hide file tree
Showing 11 changed files with 112 additions and 5 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@emotion/styled": "^11.11.0",
"@fuels/connectors": "^0.5.0",
"@fuels/react": "^0.20.0",
"@guildxyz/types": "1.9.27",
"@guildxyz/types": "1.9.28",
"@hcaptcha/react-hcaptcha": "^1.4.4",
"@hookform/resolvers": "^3.3.4",
"@lexical/code": "^0.12.0",
Expand Down
10 changes: 10 additions & 0 deletions public/explorerLogos/seitrace.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/networkLogos/filecoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions public/networkLogos/mode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/networkLogos/rootstock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions public/networkLogos/sei.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/hooks/useTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ export const TokenApiURLs: Record<Chain, string[]> = {
TAIKO: [],
KLAYTN: [],
MINT: [],
SEI: [],
FILECOIN: [],
ROOTSTOCK: [],
MODE: [],
}

const fetchTokens = async ([_, chain]) =>
Expand Down
6 changes: 6 additions & 0 deletions src/requirements/WalletActivity/WalletActivityForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export const COVALENT_CHAINS = new Set<Chain>([
"ZETACHAIN",
"TAIKO",
"FANTOM",
"SEI",
"ROOTSTOCK",
"MODE",
])

const walletActivityRequirementTypes: SelectOption[] = [
Expand Down Expand Up @@ -126,6 +129,9 @@ const WalletActivityForm = ({
"ZETACHAIN",
"TAIKO",
"FANTOM",
"SEI",
"ROOTSTOCK",
"MODE",
]

for (const covalentChain of COVALENT_CHAINS.values()) {
Expand Down
43 changes: 43 additions & 0 deletions src/wagmiConfig/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
cyber,
evmos,
fantom,
filecoin,
gnosis,
goerli,
harmonyOne,
Expand All @@ -46,6 +47,7 @@ import {
manta,
mantle,
metis,
mode,
moonbeam,
moonriver,
opBNB,
Expand All @@ -54,8 +56,10 @@ import {
polygon,
polygonZkEvm,
ronin,
rootstock,
scroll,
scrollSepolia,
sei,
sepolia,
shimmer,
taiko,
Expand Down Expand Up @@ -659,6 +663,41 @@ const CHAIN_CONFIG: Record<Chain, GuildChain> = {
dark: "/networkLogos/mint.svg",
},
},
SEI: {
...generateChainConfig(sei, "/networkLogos/sei.svg"),
iconUrl: "/networkLogos/sei.svg",
blockExplorerIconUrl: {
light: "/explorerLogos/seitrace.svg",
dark: "/explorerLogos/seitrace.svg",
},
},
FILECOIN: {
...generateChainConfig(filecoin, "/networkLogos/filecoin.svg"),
iconUrl: "/networkLogos/filecoin.svg",
blockExplorerIconUrl: {
light: "/networkLogos/filecoin.svg",
dark: "/networkLogos/filecoin.svg",
},
},
ROOTSTOCK: {
...generateChainConfig(
rootstock,
"https://assets.coingecko.com/coins/images/1/standard/bitcoin.png"
),
iconUrl: "/networkLogos/rootstock.svg",
blockExplorerIconUrl: {
light: "/networkLogos/rootstock.svg",
dark: "/networkLogos/rootstock.svg",
},
},
MODE: {
...generateChainConfig(mode, ETH_ICON),
iconUrl: "/networkLogos/mode.svg",
blockExplorerIconUrl: {
light: "/networkLogos/mode.svg",
dark: "/networkLogos/mode.svg",
},
},
}

enum Chains {
Expand Down Expand Up @@ -723,6 +762,10 @@ enum Chains {
TAIKO = taiko.id,
KLAYTN = klaytn.id,
MINT = mint.id,
SEI = sei.id,
FILECOIN = filecoin.id,
ROOTSTOCK = rootstock.id,
MODE = mode.id,
}

export type Chain = keyof typeof Chains
Expand Down
12 changes: 12 additions & 0 deletions src/wagmiConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
cyber,
evmos,
fantom,
filecoin,
gnosis,
harmonyOne,
kava,
Expand All @@ -44,6 +45,7 @@ import {
manta,
mantle,
metis,
mode,
moonbeam,
moonriver,
opBNB,
Expand All @@ -52,8 +54,10 @@ import {
polygon,
polygonZkEvm,
ronin,
rootstock,
scroll,
scrollSepolia,
sei,
sepolia,
shimmer,
taiko,
Expand Down Expand Up @@ -130,6 +134,10 @@ export const wagmiConfig = createConfig({
taiko,
klaytn,
mint,
sei,
filecoin,
rootstock,
mode,
],
transports: {
[mainnet.id]: http(),
Expand Down Expand Up @@ -193,6 +201,10 @@ export const wagmiConfig = createConfig({
[taiko.id]: http(),
[klaytn.id]: http(),
[mint.id]: http(),
[sei.id]: http(),
[filecoin.id]: http(),
[rootstock.id]: http(),
[mode.id]: http(),
},
ssr: true,
connectors:
Expand Down

0 comments on commit 4b290b2

Please sign in to comment.