♻️ Use stdin to Hash Large Data Inputs
#35
Merged
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 fixes the
Argument list too longerrors (see, e.g., here) by piping the (potentially very) large inputs tocast keccakandcast hash-messageviastdininstead of passing it as a command-line argument. Please note that this PR relies on the patch forcast hash-messageintroduced in foundry-rs/foundry#10671, included in Foundry1.2.2and available in the latest stable release ofcast.Test Example
./safe_hashes.sh --network zksync --address 0x9fb5F754f5222449F98b904a34494cB21AADFdf8 --nonce 12returns:
Now compare with https://app.safe.global/transactions/tx?safe=zksync:0x9fb5F754f5222449F98b904a34494cB21AADFdf8&id=multisig_0x9fb5F754f5222449F98b904a34494cB21AADFdf8_0x8bf43f38a201cef8317d773de616d0dc75115c84d83fad4388f691cc00acd538.
This PR also adds
https://etherscan.ioto theawesome_botwhitelist in the CI pipelinechecks.yml.