Closed cicada-fi closed 4 weeks ago
Can I work on this ?
This is a straightforward fix, we are still using debug formatting (:?
) from legacy ethers code in some places.
With alloy, removing it will display addresses in the checksum form.
@ShantelPeters Sure, I've assigned you, feel free to comment here if you can't work on it anymore so someone else can take it.
@zerosnacks could i take this one?
@zerosnacks could i take this one?
Sure! Assigning to you
This is a straightforward fix, we are still using debug formatting (
:?
) from legacy ethers code in some places. With alloy, removing it will display addresses in the checksum form.@ShantelPeters Sure, I've assigned you, feel free to comment here if you can't work on it anymore so someone else can take it.
Hey @DaniPopes ! Could you clarify your comment? If I get it right the issue occurs here when we serialize the Sequence type. We could either add a serialization on the Address
type (assuming that we always want to output checksum format address when serializing to json or adding a serialization function for the fields in question. Or did I get something wrong?
reopening since the implemented solution caused a bug further down the line for reth users e.g. see https://github.com/paradigmxyz/reth/issues/11541#issuecomment-2397852547
users actually expect a lowercase format and implementing variation of the format should be on the consumer/ui side, so to be decided if we should actually implement this or leave it to the user to implement the correct format
users actually expect a lowercase format and implementing variation of the format should be on the consumer/ui side, so to be decided if we should actually implement this or leave it to the user to implement the correct format
On a general note, when working on the client side I've found that consistently casting to lowercase was required when dealing with addresses sourced from external services as most of the time you likely end up with a mix between the two
When printing addresses we use checksum by default, in JSON output we don't anymore because this caused issues, so partially fixed, partially wontfix.
Component
Anvil
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (fa0e0c2 2024-08-22T00:19:05.396104000Z)
What command(s) is the bug in?
forge script
Operating System
Linux
Describe the bug
Anvil and Forge use lowercase address notation in Anvil's output and when saving addresses to JSON artifacts in the cache folder. This behavior does not comply with EIP-55, which recommends using checksummed addresses.
Lowercase format is incompatible with web3 libraries like web3.py and leads to parsing errors like this: