-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SthChains improvements #452
Comments
The best I can think of here is to have all tools start from something like the chainlist
What do you mean by this? Perhaps an example would be helpful. Since we do have the
Adding block explorer URL for the reason mentioned is a nice idea. If we only add it to the |
@mds1, sure an example from a current project is having sth like this. We use them e.g. to validate that a script is run on the correct network: Or to work around issues with deal on certain networks: https://github.com/bgd-labs/aave-helpers/blob/master/src/CommonTestBase.sol#L34 Generally for us it has proved to be useful having chainIds exposed via human readable name, opposed to hardcoding numbers everywhere. Was just thinking as |
Makes sense, so you can get the chain ID from a human readable name using the forge-std/test/StdCheats.t.sol Line 404 in 1d9650e
|
@mds1 i understand but usability wise it is not the same right? With |
Right, it's just a string so it won't autocomplete. Probably could add an enum that has all the same strings as the enum values, along with a |
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:
StdChains.Arbitrum
)This is quite handy for when you want to e.g. ensure a script is run on a specific network.
viem
the chain struct also contains the blockexplorerThis 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:
The text was updated successfully, but these errors were encountered: