Skip to content

Commit f71ed2a

Browse files
authored
Merge branch 'main' into origin/feat/local-json
2 parents da6c15d + 57e00b2 commit f71ed2a

File tree

3 files changed

+170
-15
lines changed

3 files changed

+170
-15
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://etherscan.io/address/0xe9Fa0c8B5d7F79DeC36D3F448B1Ac4cEdedE4e69

README.md

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ This Bash [script](./safe_hashes.sh) calculates the Safe transaction hashes by r
2222
- [Safe Message Hashes](#safe-message-hashes)
2323
- [Trust Assumptions](#trust-assumptions)
2424
- [Community-Maintained User Interface Implementations](#community-maintained-user-interface-implementations)
25+
- [💸 Donation](#-donation)
2526

2627
## Supported Networks
2728

@@ -31,20 +32,20 @@ This Bash [script](./safe_hashes.sh) calculates the Safe transaction hashes by r
3132
- Base (identifier: `base`, chain ID: `8453`)
3233
- Base Sepolia (identifier: `base-sepolia`, chain ID: `84532`)
3334
- Blast (identifier: `blast`, chain ID: `81457`)
34-
- BSC (Binance Smart Chain) (identifier: `bsc`, chain ID: `56`)
35+
- BSC (BNB Smart Chain) (identifier: `bsc`, chain ID: `56`)
3536
- Celo (identifier: `celo`, chain ID: `42220`)
3637
- Ethereum (identifier: `ethereum`, chain ID: `1`)
3738
- Gnosis (identifier: `gnosis`, chain ID: `100`)
3839
- Gnosis Chiado (identifier: `gnosis-chiado`, chain ID: `10200`)
3940
- Linea (identifier: `linea`, chain ID: `59144`)
4041
- Mantle (identifier: `mantle`, chain ID: `5000`)
41-
- Optimism (identifier: `optimism`, chain ID: `10`)
42+
- OP (Optimism) (identifier: `optimism`, chain ID: `10`)
4243
- Polygon (identifier: `polygon`, chain ID: `137`)
4344
- Polygon zkEVM (identifier: `polygon-zkevm`, chain ID: `1101`)
4445
- Scroll (identifier: `scroll`, chain ID: `534352`)
4546
- Sepolia (identifier: `sepolia`, chain ID: `11155111`)
4647
- World Chain (identifier: `worldchain`, chain ID: `480`)
47-
- X Layer (identifier: `xlayer`, chain ID: `195`)
48+
- X Layer (identifier: `xlayer`, chain ID: `196`)
4849
- ZKsync Era (identifier: `zksync`, chain ID: `324`)
4950

5051
## Usage
@@ -171,6 +172,13 @@ Multisig address: 0x111CEEee040739fD91D29C34C33E6B3E112F2177
171172
To: 0x111CEEee040739fD91D29C34C33E6B3E112F2177
172173
Value: 0
173174
Data: 0x0d582f130000000000000000000000000c75fa5a5f1c0997e3eea425cfa13184ed0ec9e50000000000000000000000000000000000000000000000000000000000000003
175+
Operation: Call
176+
Safe Transaction Gas: 0
177+
Base Gas: 0
178+
Gas Price: 0
179+
Gas Token: 0x0000000000000000000000000000000000000000
180+
Refund Receiver: 0x0000000000000000000000000000000000000000
181+
Nonce: 234
174182
Encoded message: 0xbb8310d486368db6bd6f849402fdd73ad53d316b5a4b2644ad6efe0f941286d8000000000000000000000000111ceeee040739fd91d29c34c33e6b3e112f21770000000000000000000000000000000000000000000000000000000000000000b34f85cea7c4d9f384d502fc86474cd71ff27a674d785ebd23a4387871b8cbfe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ea
175183
Method: addOwnerWithThreshold
176184
Parameters: [
@@ -234,6 +242,9 @@ A sample JSON file is provided in the repository as `sample_transaction.json`.
234242

235243
## Safe Message Hashes
236244

245+
> [!IMPORTANT]
246+
> At present, this [script](./safe_hashes.sh) does not support calculating Safe message hashes for [EIP-712](https://eips.ethereum.org/EIPS/eip-712)-based messages due to the inherent complexity of parsing the message and identifying the relevant type hashes. However, you can find my easily adjustable Bash script version [here](https://github.com/pcaversaccio/zksync-emergency-upgrades/blob/main/safe_hashes.sh) to calculate Safe message hashes for [EIP-712](https://eips.ethereum.org/EIPS/eip-712)-based messages.
247+
237248
This [script](./safe_hashes.sh) not only calculates Safe transaction hashes but also supports computing the corresponding hashes for off-chain messages following the [EIP-712](https://eips.ethereum.org/EIPS/eip-712) standard. To calculate the Safe message hashes for a specific message, specify the `network`, `address`, and `message` parameters. The `message` parameter must specify a valid file containing the raw message. This can be either the file name or a relative path (e.g., `path/to/message.txt`). Note that the [script](./safe_hashes.sh) normalises line endings to `LF` (`\n`) in the message file.
238249

239250
An example: Save the following message to a file named `message.txt`:
@@ -304,10 +315,14 @@ Safe message hash: 0x1866b559f56261ada63528391b93a1fe8e2e33baf7cace94fc6b42202d1
304315
## Community-Maintained User Interface Implementations
305316

306317
> [!IMPORTANT]
307-
> Please be aware that user interface implementations may introduce additional trust assumptions, such as relying on `npm` dependencies that have not undergone thorough review. Always verify and cross-reference with the main [script](./safe_hashes.sh).
318+
> Please be aware that user interface implementations may introduce additional trust assumptions, such as relying on `npm` dependencies that have not undergone thorough review or a deployment process that could be compromised by an attacker. Always verify and cross-reference with the main [script](./safe_hashes.sh).
308319
309-
- [`safehashpreview.com`](https://www.safehashpreview.com):
310-
- Code: [`josepchetrit12/safe-tx-hashes-util`](https://github.com/josepchetrit12/safe-tx-hashes-util)
320+
- [`safeutils.openzeppelin.com`](https://safeutils.openzeppelin.com):
321+
- Code: [`OpenZeppelin/safe-utils`](https://github.com/OpenZeppelin/safe-utils)
311322
- Authors: [`josepchetrit12`](https://github.com/josepchetrit12), [`xaler5`](https://github.com/xaler5)
312323

324+
## 💸 Donation
325+
326+
I am a strong advocate of the open-source and free software paradigm. However, if you feel my work deserves a donation, you can send it to this address: [`0xe9Fa0c8B5d7F79DeC36D3F448B1Ac4cEdedE4e69`](https://etherscan.io/address/0xe9Fa0c8B5d7F79DeC36D3F448B1Ac4cEdedE4e69). I can pledge that I will use this money to help fix more existing challenges in the Ethereum ecosystem 🤝.
327+
313328
[^1]: It is theoretically possible to query transactions prior to the first signature; however, this functionality is not incorporated into the main [script](https://github.com/pcaversaccio/safe-tx-hashes-util/blob/main/safe_hashes.sh). To do so, you would proceed through the [Safe UI](https://app.safe.global) as usual, stopping at the page where the transaction is signed or executed. At this point, the action is recorded in the [Safe Transaction Service API](https://docs.safe.global/core-api/transaction-service-overview), allowing you to retrieve the unsigned transaction by setting `trusted=false` in the [API](https://docs.safe.global/core-api/transaction-service-reference/mainnet#List-a-Safe's-Multisig-Transactions) query within your Bash script. For example, you might use a query such as: `https://safe-transaction-arbitrum.safe.global/api/v1/safes/0xB24A3AA250E209bC95A4a9afFDF10c6D099B3d34/multisig-transactions/?trusted=false&nonce=4`. This decision to not implement this feature avoids potential confusion caused by unsigned transactions in the queue, especially when multiple transactions share the same nonce, making it unclear which one to act upon. If this feature aligns with your needs, feel free to fork the [script](https://github.com/pcaversaccio/safe-tx-hashes-util/blob/main/safe_hashes.sh) and modify it as necessary.

safe_hashes.sh

Lines changed: 148 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ if [[ "${DEBUG:-false}" == "true" ]]; then
6060
set -x
6161
fi
6262

63+
# Set the zero address as global constant.
64+
readonly ZERO_ADDRESS="0x0000000000000000000000000000000000000000"
65+
6366
# Set the type hash constants.
6467
# => `keccak256("EIP712Domain(uint256 chainId,address verifyingContract)");`
6568
# See: https://github.com/safe-global/safe-smart-account/blob/a0a1d4292006e26c4dbd52282f4c932e1ffca40f/contracts/Safe.sol#L54-L57.
@@ -77,6 +80,66 @@ readonly SAFE_TX_TYPEHASH_OLD="0x14d461bc7412367e924637b363c7bf29b8f47e2f84869f4
7780
# See: https://github.com/safe-global/safe-smart-account/blob/febab5e4e859e6e65914f17efddee415e4992961/contracts/libraries/SignMessageLib.sol#L12-L13.
7881
readonly SAFE_MSG_TYPEHASH="0x60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca"
7982

83+
# Set the trusted (i.e. for delegate calls) `MultiSend` addresses:
84+
# MultiSend `v1.1.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.1.1/multi_send.json#L7,
85+
# MultiSend `v1.3.0` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send.json#L7,
86+
# MultiSend `v1.3.0` (eip155): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send.json#L11,
87+
# MultiSend `v1.3.0` (zksync): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send.json#L15,
88+
# Multisend `v1.4.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.4.1/multi_send.json#L7.
89+
declare -a -r MultiSend=(
90+
"0x8D29bE29923b68abfDD21e541b9374737B49cdAD" # MultiSend `v1.1.1` (canonical).
91+
"0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761" # MultiSend `v1.3.0` (canonical).
92+
"0x998739BFdAAdde7C933B942a68053933098f9EDa" # MultiSend `v1.3.0` (eip155).
93+
"0x0dFcccB95225ffB03c6FBB2559B530C2B7C8A912" # MultiSend `v1.3.0` (zksync).
94+
"0x38869bf66a61cF6bDB996A6aE40D5853Fd43B526" # MultiSend `v1.4.1` (canonical).
95+
)
96+
97+
# Set the trusted (i.e. for delegate calls) `MultiSendCallOnly` addresses:
98+
# MultiSendCallOnly `v1.3.0` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send_call_only.json#L7,
99+
# MultiSendCallOnly `v1.3.0` (eip155): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send_call_only.json#L11,
100+
# MultiSendCallOnly `v1.3.0` (zksync): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/multi_send_call_only.json#L15,
101+
# MultiSendCallOnly `v1.4.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.4.1/multi_send_call_only.json#L7.
102+
declare -a -r MultiSendCallOnly=(
103+
"0x40A2aCCbd92BCA938b02010E17A5b8929b49130D" # MultiSendCallOnly `v1.3.0` (canonical).
104+
"0xA1dabEF33b3B82c7814B6D82A79e50F4AC44102B" # MultiSendCallOnly `v1.3.0` (eip155).
105+
"0xf220D3b4DFb23C4ade8C88E526C1353AbAcbC38F" # MultiSendCallOnly `v1.3.0` (zksync).
106+
"0x9641d764fc13c8B624c04430C7356C1C7C8102e2" # MultiSendCallOnly `v1.4.1` (canonical).
107+
)
108+
109+
# Set the trusted (i.e. for delegate calls) `SafeMigration` addresses:
110+
# SafeMigration `v1.4.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.4.1/safe_migration.json#L7.
111+
declare -a -r SafeMigration=(
112+
"0x526643F69b81B008F46d95CD5ced5eC0edFFDaC6" # SafeMigration `v1.4.1` (canonical).
113+
)
114+
115+
# Set the trusted (i.e. for delegate calls) `SafeToL2Migration` addresses:
116+
# SafeToL2Migration `v1.4.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.4.1/safe_to_l2_migration.json#L7.
117+
declare -a -r SafeToL2Migration=(
118+
"0xfF83F6335d8930cBad1c0D439A841f01888D9f69" # SafeToL2Migration `v1.4.1` (canonical).
119+
)
120+
121+
# Set the trusted (i.e. for delegate calls) `SignMessageLib` addresses:
122+
# SignMessageLib `v1.3.0` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/sign_message_lib.json#L7,
123+
# SignMessageLib `v1.3.0` (eip155): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/sign_message_lib.json#L11,
124+
# SignMessageLib `v1.3.0` (zksync): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.3.0/sign_message_lib.json#L15,
125+
# SignMessageLib `v1.4.1` (canonical): https://github.com/safe-global/safe-deployments/blob/4e25b09f62a4acec92b4ebe6b8ae496b3852d440/src/assets/v1.4.1/sign_message_lib.json#L7.
126+
declare -a -r SignMessageLib=(
127+
"0xA65387F16B013cf2Af4605Ad8aA5ec25a2cbA3a2" # SignMessageLib `v1.3.0` (canonical).
128+
"0x98FFBBF51bb33A056B08ddf711f289936AafF717" # SignMessageLib `v1.3.0` (eip155).
129+
"0x357147caf9C0cCa67DfA0CF5369318d8193c8407" # SignMessageLib `v1.3.0` (zksync).
130+
"0xd53cd0aB83D845Ac265BE939c57F53AD838012c9" # SignMessageLib `v1.4.1` (canonical).
131+
)
132+
133+
# Set the trusted (i.e. for delegate calls) contract addresses.
134+
# See: https://github.com/safe-global/safe-transaction-service/blob/c3b42f0bebff74b99fcdd958aee54b149e27eca5/safe_transaction_service/contracts/management/commands/setup_safe_contracts.py#L10-L16.
135+
declare -A -r TRUSTED_FOR_DELEGATE_CALL=(
136+
["MultiSend"]="${MultiSend[@]}"
137+
["MultiSendCallOnly"]="${MultiSendCallOnly[@]}"
138+
["SafeMigration"]="${SafeMigration[@]}"
139+
["SafeToL2Migration"]="${SafeToL2Migration[@]}"
140+
["SignMessageLib"]="${SignMessageLib[@]}"
141+
)
142+
80143
# Define the supported networks from the Safe transaction service.
81144
# See https://docs.safe.global/advanced/smart-account-supported-networks?service=Transaction+Service.
82145
declare -A -r API_URLS=(
@@ -124,7 +187,7 @@ declare -A -r CHAIN_IDS=(
124187
["scroll"]="534352"
125188
["sepolia"]="11155111"
126189
["worldchain"]="480"
127-
["xlayer"]="195"
190+
["xlayer"]="196"
128191
["zksync"]="324"
129192
)
130193

@@ -203,13 +266,41 @@ print_transaction_data() {
203266
local to=$2
204267
local value=$3
205268
local data=$4
206-
local message=$5
269+
local operation=$5
270+
local safe_tx_gas=$6
271+
local base_gas=$7
272+
local gas_price=$8
273+
local gas_token=$9
274+
local refund_receiver=${10}
275+
local nonce=${11}
276+
local message=${12}
207277

208278
print_header "Transaction Data"
209279
print_field "Multisig address" "$address"
210280
print_field "To" "$to"
211281
print_field "Value" "$value"
212282
print_field "Data" "$data"
283+
case "$operation" in
284+
1)
285+
if [[ "$operation" -eq 1 && ! " ${TRUSTED_FOR_DELEGATE_CALL[@]} " =~ " ${to} " ]]; then
286+
print_field "Operation" "Delegatecall $(tput setaf 1)(UNTRUSTED DELEGATECALL; PLEASE VERIFY!)$(tput sgr0)"
287+
else
288+
print_field "Operation" "Delegatecall $(tput setaf 3)(trusted delegatecall)$(tput sgr0)"
289+
fi
290+
;;
291+
0)
292+
print_field "Operation" "Call"
293+
;;
294+
*)
295+
print_field "Operation" "Unknown"
296+
;;
297+
esac
298+
print_field "Safe Transaction Gas" "$safe_tx_gas"
299+
print_field "Base Gas" "$base_gas"
300+
print_field "Gas Price" "$gas_price"
301+
print_field "Gas Token" "$gas_token"
302+
print_field "Refund Receiver" "$refund_receiver"
303+
print_field "Nonce" "$nonce"
213304
print_field "Encoded message" "$message"
214305
}
215306

@@ -235,11 +326,15 @@ print_hash_info() {
235326

236327
# Utility function to print the ABI-decoded transaction data.
237328
print_decoded_data() {
238-
local data_decoded=$1
329+
local data=$1
330+
local data_decoded=$2
239331

240-
if [[ "$data_decoded" == "0x" ]]; then
332+
if [[ "$data" == "0x" && "$data_decoded" == "0x" ]]; then
241333
print_field "Method" "0x (ETH Transfer)"
242334
print_field "Parameters" "[]"
335+
elif [[ "$data" != "0x" && "$data_decoded" == "0x" ]]; then
336+
print_field "Method" "Unknown"
337+
print_field "Parameters" "Unknown"
243338
else
244339
local method=$(echo "$data_decoded" | jq -r ".method")
245340
local parameters=$(echo "$data_decoded" | jq -r ".parameters")
@@ -280,15 +375,15 @@ get_version() {
280375
validate_version() {
281376
local version=$1
282377
if [[ -z "$version" ]]; then
283-
echo "$(tput setaf 3)No Safe multisig contract found for the specified network. Please ensure that you have selected the correct network.$(tput setaf 0)"
378+
echo "$(tput setaf 3)No Safe multisig contract found for the specified network. Please ensure that you have selected the correct network.$(tput sgr0)"
284379
exit 0
285380
fi
286381

287382
local clean_version=$(get_version "$version")
288383

289384
# Ensure that the Safe multisig version is `>= 0.1.0`.
290385
if [[ "$(printf "%s\n%s" "$clean_version" "0.1.0" | sort -V | head -n1)" == "$clean_version" && "$clean_version" != "0.1.0" ]]; then
291-
echo "$(tput setaf 3)Safe multisig version \"${clean_version}\" is not supported!$(tput setaf 0)"
386+
echo "$(tput setaf 3)Safe multisig version \"${clean_version}\" is not supported!$(tput sgr0)"
292387
exit 0
293388
fi
294389
}
@@ -380,9 +475,9 @@ calculate_hashes() {
380475
awk '/Data:/ {gsub(/\x1b\[[0-9;]*m/, "", $3); print $3}')
381476

382477
# Print the retrieved transaction data.
383-
print_transaction_data "$address" "$to" "$value" "$data" "$message"
478+
print_transaction_data "$address" "$to" "$value" "$data" "$operation" "$safe_tx_gas" "$base_gas" "$gas_price" "$gas_token" "$refund_receiver" "$nonce" "$message"
384479
# Print the ABI-decoded transaction data.
385-
print_decoded_data "$data_decoded"
480+
print_decoded_data "$data" "$data_decoded"
386481
# Print the results with the same formatting for "Domain hash" and "Message hash" as a Ledger hardware device.
387482
print_hash_info "$domain_hash" "$message_hash" "$safe_tx_hash"
388483
}
@@ -429,6 +524,45 @@ validate_nonce() {
429524
fi
430525
}
431526

527+
# Utility function to warn the user if the transaction includes an untrusted delegate call.
528+
warn_if_delegate_call() {
529+
local operation="$1"
530+
local to="$2"
531+
532+
# Warn the user if `operation` equals `1`, implying a `delegatecall`, and if the `to` address is untrusted.
533+
# See: https://github.com/safe-global/safe-smart-account/blob/34359e8305d618b7d74e39ed370a6b59ab14f827/contracts/libraries/Enum.sol.
534+
if [[ "$operation" -eq 1 && ! " ${TRUSTED_FOR_DELEGATE_CALL[@]} " =~ " ${to} " ]]; then
535+
echo
536+
cat <<EOF
537+
$(tput setaf 1)WARNING: The transaction includes an untrusted delegate call to address $to!
538+
This may lead to unexpected behaviour or vulnerabilities. Please review it carefully before you sign!$(tput sgr0)
539+
540+
EOF
541+
fi
542+
}
543+
544+
# Utility function to check for a potential gas token attack.
545+
check_gas_token_attack() {
546+
local gas_price=$1
547+
local gas_token=$2
548+
local refund_receiver=$3
549+
local warning_message=""
550+
551+
if [[ "$gas_token" != "$ZERO_ADDRESS" && "$refund_receiver" != "$ZERO_ADDRESS" ]]; then
552+
warning_message+="$(tput setaf 1)WARNING: This transaction uses a custom gas token and a custom refund receiver.
553+
This combination can be used to hide a rerouting of funds through gas refunds.$(tput sgr0)\n"
554+
if [[ "$gas_price" != "0" ]]; then
555+
warning_message+="$(tput setaf 1)Furthermore, the gas price is non-zero, which increases the potential for hidden value transfers.$(tput sgr0)\n"
556+
fi
557+
elif [[ "$gas_token" != "$ZERO_ADDRESS" ]]; then
558+
warning_message+="$(tput setaf 3)WARNING: This transaction uses a custom gas token. Please verify that this is intended.$(tput sgr0)\n"
559+
elif [[ "$refund_receiver" != "$ZERO_ADDRESS" ]]; then
560+
warning_message+="$(tput setaf 3)WARNING: This transaction uses a custom refund receiver. Please verify that this is intended.$(tput sgr0)\n"
561+
fi
562+
563+
[[ -n "$warning_message" ]] && echo -e "$warning_message"
564+
}
565+
432566
# Utility function to validate the message file.
433567
validate_message_file() {
434568
local message_file="$1"
@@ -647,7 +781,7 @@ calculate_safe_hashes() {
647781

648782
# Inform the user that no transactions are available for the specified nonce.
649783
if [[ $count -eq 0 ]]; then
650-
echo "$(tput setaf 3)No transaction is available for this nonce!$(tput setaf 0)"
784+
echo "$(tput setaf 3)No transaction is available for this nonce!$(tput sgr0)"
651785
exit 0
652786
# Notify the user about multiple transactions with identical nonce values and prompt for user input.
653787
elif [[ $count -gt 1 ]]; then
@@ -698,6 +832,11 @@ EOF
698832
local nonce=$(echo "$response" | jq -r ".results[$idx].nonce // \"0\"")
699833
local data_decoded=$(echo "$response" | jq -r ".results[$idx].dataDecoded // \"0x\"")
700834

835+
# Warn the user if the transaction includes an untrusted delegate call.
836+
warn_if_delegate_call "$operation" "$to"
837+
# Check for a potential gas token attack.
838+
check_gas_token_attack "$gas_price" "$gas_token" "$refund_receiver"
839+
701840
# Calculate and display the hashes.
702841
echo "==================================="
703842
echo "= Selected Network Configurations ="

0 commit comments

Comments
 (0)