Skip to content

fix: normalize address in sim_fundAccount - #1789

Open
feafel wants to merge 1 commit into
genlayerlabs:v0.123-devfrom
feafel:fix/fund-account-normalize-address
Open

feafel wants to merge 1 commit into
genlayerlabs:v0.123-devfrom
feafel:fix/fund-account-normalize-address

Conversation

@feafel

@feafel feafel commented Oct 12, 2026 •

Copy link
Copy Markdown

Summary

Fixes #1788: 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.

Changes

  • backend/protocol_rpc/endpoints.py: added to_checksum_address normalization after address validation
  • tests/unit/test_simulator_sessions.py: added test for lowercase address normalization

Impact

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

  • Bug Fixes
    • Account funding now stores valid addresses in a consistent checksum format, including when lowercase addresses are provided. Invalid addresses continue to be rejected.

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
@github-actions
github-actions Bot changed the base branch from main to v0.123-dev October 12, 2026 11:52
@github-actions

Copy link
Copy Markdown
Contributor

This PR targeted main, which is only the default/static branch.

I retargeted it to v0.123-dev, the active development branch. Pushes to v0.123-dev automatically fast-forward main.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a7dc722a-3c0a-4f8d-989d-9893b812389e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sim_fundAccount returns success but credits nothing when the address is not EIP-55 checksummed

2 participants