Closed drortirosh closed 1 week ago
I think we're fetching that from etherscan API that is mapped to chain id (https://github.com/alloy-rs/chains/blob/main/src/named.rs#L1047), what you could try is to map the dev chainId "1337" (https://github.com/alloy-rs/chains/blob/main/src/named.rs#L170) to an Etherscan url / api, see https://book.getfoundry.sh/reference/config/etherscan Pls lmk if this helps, thank you
le: sorry, just noticed that's cast run so no foundry.toml config. maybe we can make etherscan url option available in cast run
possible related https://github.com/foundry-rs/foundry/issues/3473
marking as dupe of https://github.com/foundry-rs/foundry/issues/8606 and going to track impl there. thank you!
Component
Cast
Describe the feature you would like
doing
cast run <tx>
doesn't always fully decode calls and events. When executed against local node, it does parse methodIds, but not events. However, when decoding transaction on external chains (event testnet, like sepolia), it parses both methods and events.Apparently, it depends on the "chainId" of the local node, and when chainId is "1337", it fails to decode some information. with Anvil, I can add --chain-id, but some of my tests require geth, which can't easily change the chainid.
suggestion Either should be able to "push" symbol information to chain-id specific, or add a fallback, that if methodid/topicid are missing for a specific chain, then use them from another (after all, they can't differ much, the methodid/topicid depend on the method name and parameter types. the only thing that can differ between networks is the parameter names)
Additional context
No response