Repository navigation
Conversation
sim_fundAccount returned a success-looking result hash but silently credited nothing when passed a lowercase address (e.g. from MetaMask). Ethereum JSON-RPC addresses are case-insensitive, so normalize to checksum format before the lookup. Closes genlayerlabs#1788
|
This PR targeted I retargeted it to |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
# Conflicts: # backend/protocol_rpc/endpoints.py
…lization test The expected address was not a valid EIP-55 checksum, so the test never passed. fund_account now commits the session (genlayerlabs#1760), which object() cannot do.
|
Thanks! I merged current
|
danieljrc888
left a comment
There was a problem hiding this comment.
Reviewed for the v0.123 release candidate; unit suite and CI green.
|
/run-e2e all Frozen landing cut: #1789 alone, head |
Lands four reviewed fork PRs together after a full E2E run on this exact head: - #1765: redact validator private keys from call receipts and explorer payloads - #1715: bind postgres, redis and ollama host ports to loopback - #1773: normalize addresses in raw-SQL balance operations - #1789: normalize the address in sim_fundAccount Co-authored-by: Kanan <93033289+kriss39@users.noreply.github.com> Co-authored-by: Starling <82058629+Starling-spell@users.noreply.github.com> Co-authored-by: Alicepoltora <Alicepoltora@users.noreply.github.com>
Summary
Fixes #1788:
sim_fundAccountreturned a success-looking result hash but silently credited nothing when passed a lowercase address (e.g. from MetaMask). Ethereum JSON-RPC addresses are case-insensitive, so normalize to checksum format before the lookup.Changes
backend/protocol_rpc/endpoints.py: addedto_checksum_addressnormalization after address validationtests/unit/test_simulator_sessions.py: added test for lowercase address normalizationImpact
Wallets such as MetaMask return lowercase addresses from
eth_accounts, so a faucet button that passes the connected address silently did nothing. Now the address is properly normalized before crediting.🤖 Generated with Claude Code
Summary by CodeRabbit