Skip to content

Commit

Permalink
♻️ Fix Formatting
Browse files Browse the repository at this point in the history
>
> Test transaction: FOUNDRY_DISABLE_NIGHTLY_WARNING=1 ./safe_hashes.sh --network optimism --address 0xc95264b920B56C9786045A2FD7464E51013D2cCC --nonce 0

Signed-off-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
pcaversaccio committed Mar 5, 2025
1 parent 761b4fa commit d141da2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions safe_hashes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,10 @@ warn_if_delegate_call() {
if [[ "$operation" -eq 1 && ! " ${TRUSTED_FOR_DELEGATE_CALL[@]} " =~ " ${to} " ]]; then
echo
cat <<EOF
${BOLD}${RED}WARNING: The transaction includes an untrusted delegate call to address $to!
$(tput setaf 1)WARNING: The transaction includes an untrusted delegate call to address $to!
This may lead to unexpected behaviour or vulnerabilities.
Please review it carefully before you sign!${RESET}
Please review it carefully before you sign!$(tput sgr0)
EOF
fi
}
Expand Down Expand Up @@ -605,12 +606,12 @@ calculate_safe_hashes() {
validate_address "$address"

# Get the API URL and chain ID for the specified network.
local api_url=$(get_api_url "$network")
local api_url="https://safe-client.safe.global/v1/chains"
local chain_id=$(get_chain_id "$network")
local endpoint="${api_url}/api/v1/safes/${address}/multisig-transactions/?nonce=${nonce}"
local endpoint="${api_url}/${chain_id}/safes/${address}/multisig-transactions/raw?nonce=${nonce}"

# Get the Safe multisig version.
local version=$(curl -sf "${api_url}/api/v1/safes/${address}/" | jq -r ".version // \"0.0.0\"")
local version="1.3.0" # Set your Safe version here before running!

# Calculate the domain and message hashes for off-chain messages.
if [[ -n "$message_file" ]]; then
Expand Down

0 comments on commit d141da2

Please sign in to comment.