Skip to content

Conversation

@pcaversaccio
Copy link
Owner

@pcaversaccio pcaversaccio commented Sep 18, 2025

🕓 Changelog

This PR updates the validate_address function to enforce EIP-55 checksummed addresses. This ensures that all addresses submitted to the Safe transaction service API are correctly checksummed, preventing potential API errors caused by incorrectly-cased addresses. Furthermore, we redirect all error messages in the functions check_required_tools, get_latest_git_commit_hash, and the Bash version check to stderr for proper error handling.

Test Examples

Test Case 1

./safe_hashes.sh --network sepolia --address 0x657FF0D4EC65D82B2BC1247B0A558BCD2F80A0F1 --nonce 4

returns:

Invalid checksum: "0x657FF0D4EC65D82B2BC1247B0A558BCD2F80A0F1" (expected "0x657ff0D4eC65D82b2bC1247b0a558bcd2f80A0f1")

Test Case 2

./safe_hashes.sh --network sepolia --address 0x657ff0D4eC65D82b2bC1247b0a558bcd2f80A0f1 --nonce 4 --nested-safe-address 0x6bc56d6ce87c86cb0756c616becfd3cd32b09251 --nested-safe-nonce 4

returns:

Invalid checksum: "0x6bc56d6ce87c86cb0756c616becfd3cd32b09251" (expected "0x6bc56d6CE87C86CB0756c616bECFD3Cd32b09251")

Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio self-assigned this Sep 18, 2025
@pcaversaccio pcaversaccio added feature 💥 New feature or request refactor/cleanup ♻️ Code refactorings and cleanups labels Sep 18, 2025
@pcaversaccio pcaversaccio changed the title ♻️ Add Checksum Check in Address Validation ♻️ Enforce EIP-55 Checksums for Addresses Sep 18, 2025
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
Signed-off-by: Pascal Marco Caversaccio <pascal.caversaccio@hotmail.ch>
@pcaversaccio pcaversaccio merged commit 5dd0b6c into main Sep 18, 2025
4 of 6 checks passed
@pcaversaccio pcaversaccio deleted the feat/ensure-checksummed-addresses branch September 18, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 💥 New feature or request refactor/cleanup ♻️ Code refactorings and cleanups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants