Skip to content

StdChain improvements #452

@sakulstra

Description

@sakulstra

Hey first time I noticed StdChains https://twitter.com/msolomon44/status/1699116841753534877 and checked if we can replace with our internal tooling for this.

Two things that would be quite useful for us is:

  • explicit constant getters for the chains defined (aka StdChains.Arbitrum)

This is quite handy for when you want to e.g. ensure a script is run on a specific network.

  • in viem the chain struct also contains the blockexplorer

This is quite handy as you can easily log addresses as blockexplorer link, making them directly clickable.

perhaps could make sense to somehow sync https://github.com/foundry-rs/forge-std/blob/master/src/StdChains.sol#L180 automatically with viem? It's a bit sad that support of chains is so different between:

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprovement to existing code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions