Closed jenpaff closed 2 months ago
verifyingContract
field. From preliminary tests it looks like checksumming was already handled here so the resulting hash after the proposed changes should stay the same - worth double checking.cc @DaniPopes please correct me if I'm wrong
Tip: for CI fmt
task failing run: cargo +nightly fmt --all --check
Motivation
Partially closes https://github.com/foundry-rs/foundry/issues/8715 We want to serialize Address type in checksum format.
Solution
Solution is to implement a custom serialization function for
Address
type.I ran into some issues: 1) The
impl_serde
macro conflicts withimpl Serialize for Address
(Address
is wrapped with thewrap_fixed_bytes
macro which callsimpl_serde
), so I added a workaround inimpl_serde
to bypassAddress
type. Another solution would be to just move the impl directly into the macro- if preferred.2) There's another type
EIP712Domain
which uses the typeAddress
, I wanted to double check that it is okay for this to also be serialized in checksum format, I added another unit test to make it explicit.PR Checklist