feat: return checksummed addresses from contract calls #294
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
fixes: #262
How I did it
call
to_checksum_address()
on the data being return so long that it is of an address type.How to verify it
Two things:
Test that tests this new feature: https://github.com/unparalleled-js/ape-demo-project/blob/main/tests/test_fund.py#L17-L21,
The other tests pass as well in that demo project.
Thus, this addresses the issue.
NOTE: eth-abi python package naturally returns HexAddress as "normalized". It is not much effort to change that, but to fix their test suite against that is actually kind of challenging believe it or not and I am not sure they would want that.. Though I have started the process to see what it's like: ethereum/eth-abi#152
Checklist