Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Update Filecoin chain configuration #103

Merged
merged 11 commits into from
Feb 7, 2023
Merged

Update Filecoin chain configuration #103

merged 11 commits into from
Feb 7, 2023

Conversation

navFooh
Copy link
Contributor

@navFooh navFooh commented Feb 7, 2023

Description

  • For Filecoin Mainnet, it is also advised to use the v1 RPC url. When the FEVM launches on Mainnet, v1 is required to use the eth_ RPC methods.
  • The Glif block explorer was missing from the Mainnet chain.
  • The Calibrationnet configuration was missing
  • The glif key was misspelled in the blockExplorers object for Hyperspacenet

Additional Information

@changeset-bot
Copy link

changeset-bot bot commented Feb 7, 2023

🦋 Changeset detected

Latest commit: 3dfaf48

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wagmi/chains Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@tmm tmm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a path changeset and export the new chains from the packages/chains/src/index.ts file.

Also, looks like the Glif block explorer doesn't follow EIP-3091. Would be great if the url could be a base URL so folks can add on different paths (e.g. /address, /tx). Right now, with the query param at the end, this won't work by default. Seems like switching to Filescan or another could be the way to go (e.g. https://calibration.filscan.io and https://hyperspace.filscan.io).

Comment on lines 3 to 19
export const filecoinCalibration: Chain = {
id: 314159,
name: 'Filecoin Calibration',
network: 'filecoin-calibration',
nativeCurrency: {
decimals: 18,
name: 'testnet filecoin',
symbol: 'tFIL',
},
rpcUrls: {
default: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
public: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
},
blockExplorers: {
default: { name: 'Glif', url: 'https://explorer.glif.io/?network=calibration' },
},
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export const filecoinCalibration: Chain = {
id: 314159,
name: 'Filecoin Calibration',
network: 'filecoin-calibration',
nativeCurrency: {
decimals: 18,
name: 'testnet filecoin',
symbol: 'tFIL',
},
rpcUrls: {
default: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
public: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
},
blockExplorers: {
default: { name: 'Glif', url: 'https://explorer.glif.io/?network=calibration' },
},
}
export const filecoinCalibration = {
id: 314_159,
name: 'Filecoin Calibration',
network: 'filecoin-calibration',
nativeCurrency: {
decimals: 18,
name: 'testnet filecoin',
symbol: 'tFIL',
},
rpcUrls: {
default: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
public: { http: ['https://api.calibration.node.glif.io/rpc/v1'] },
},
blockExplorers: {
default: { name: 'Glif', url: 'https://explorer.glif.io/?network=calibration' },
},
} as const satisfies Chain

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tmm, thank you for the feedback!

Actually, Glif does support the EIP-3091 standard:

Although currently there is no support for the /block and /token routes.

@navFooh navFooh requested a review from tmm February 7, 2023 15:14
.changeset/old-adults-jump.md Outdated Show resolved Hide resolved
@tmm tmm merged commit 337ffeb into wevm:main Feb 7, 2023
@navFooh
Copy link
Contributor Author

navFooh commented Feb 7, 2023

@tmm thanks for getting this over the finish line.

Out of curiosity, what's the motivation for replacing Glif with Filscan a calibration / hyperspace explorer?

Glif does support the EIP-3091 standard where Filscan doesn't:

Also I'm working on the Glif tools, so would like to know if there is anywhere we can do better!

@tmm
Copy link
Member

tmm commented Feb 7, 2023

My mistake, thought it didn't work. Feel free to submit a new PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants