β¨ Add Support for New Chains and Throttle Safe API Requests #39
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.
π Changelog
This PR adds support for the following additional chains:
botanix, chain ID:3637),codex, chain ID:81224),katana, chain ID:747474),opbnb, chain ID:204),peaq, chain ID:3338),xdc, chain ID:50).All supported chains that use the Safe transaction service API can be retrieved via:
curl -s https://safe-config.safe.global/api/v1/chains/ | jq ".results[].chainName"which currently (17 September 2025) returns:
Furthermore, this PR ensures that all Safe API requests are throttled to one per second (implemented as
sleep 1.2) to respect future limits and provide some buffer for subsequent requests. TheAPI_URLSassociative array is updated to use the new canonical Safe transaction service API for all supported networks, including the newly added chains (Botanix, Codex, Katana, opBNB, peaq, and XDC Network). Eventually, the script now collects and reports all missing tools and version errors before exiting.Test Examples
Botanix
./safe_hashes.sh --network botanix --address 0xe1BefF4f60de58A4b27b6D0424E7e0d1316A138C --nonce 42returns:
Now compare with https://app.safe.global/transactions/tx?safe=btc:0xe1BefF4f60de58A4b27b6D0424E7e0d1316A138C&id=multisig_0xe1BefF4f60de58A4b27b6D0424E7e0d1316A138C_0xc38f8d54eb1d2ae62c7035da62fed09ae9c9dba74ee8c74f0318a187ed8a1ee4.
Codex
./safe_hashes.sh --network codex --address 0xFd917dE2A4fEB1bEdDCEc293530666e08F17BF43 --nonce 1returns:
Now compare with https://app.safe.global/transactions/tx?safe=codex:0xFd917dE2A4fEB1bEdDCEc293530666e08F17BF43&id=multisig_0xFd917dE2A4fEB1bEdDCEc293530666e08F17BF43_0x724183fbf6567945f180a4f2322e2c3e82459b3a831e82f8c9eee0356a4b54f9.
Katana
./safe_hashes.sh --network katana --address 0x67C912fF560951526BffDff66dFbD4DF8AE23756 --nonce 346returns:
Now compare with https://app.safe.global/transactions/tx?safe=katana:0x67C912fF560951526BffDff66dFbD4DF8AE23756&id=multisig_0x67C912fF560951526BffDff66dFbD4DF8AE23756_0x5097153af66bd25844c9ce000c0fb6d1a7e94e59f5956a644e52269794cbe416.
opBNB
./safe_hashes.sh --network opbnb --address 0x8888897D5C471f0193d817E1b13f2f1a41A649F1 --nonce 1returns:
Now compare with https://app.safe.global/transactions/tx?safe=opbnb:0x8888897D5C471f0193d817E1b13f2f1a41A649F1&id=multisig_0x8888897D5C471f0193d817E1b13f2f1a41A649F1_0xc17ef8a7c1ca2b063c02c77e5d5a7f37bc49d6c0f1c8d3c653ef0a1c2572827d.
peaq
./safe_hashes.sh --network peaq --address 0xEaA234e20627dF4f7B26E871876050f30E22495E --nonce 1returns:
Now compare with https://app.safe.global/transactions/tx?safe=peaq:0xEaA234e20627dF4f7B26E871876050f30E22495E&id=multisig_0xEaA234e20627dF4f7B26E871876050f30E22495E_0x6bed0dd1001ae38bbdbdb96a650afa777f2faa2ac5744f6410e59f9b16bb0d70.
XDC Network
./safe_hashes.sh --network xdc --address 0xddddD75045209CFf941E07457409CBd73bA6769F --nonce 0returns:
Now compare with https://app.safe.global/transactions/tx?safe=xdc:0xddddd75045209cff941e07457409cbd73ba6769f&id=multisig_0xddddD75045209CFf941E07457409CBd73bA6769F_0xb68acf7d6e3166c642bc72a6717b82cd26d414ce1c274401f9f86be83c8f0f9e.