Skip to content

Commit f1d7f35

Browse files
committed
seth: sig: display error when tuples are encountered
1 parent d10bcd6 commit f1d7f35

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/dapp-tests/integration/tests.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,13 @@ test_sig_5() {
461461
assert_equals "0xe548799c" "$(seth sig 'registerCrowdsale(address,address,uint256[8])')"
462462
}
463463

464-
test_sig_fuzz() {
464+
# tuples currently broken: https://github.com/dapphub/dapptools/issues/861
465+
todo_sig_6() {
466+
assert_equals "0x5cc5e3d9" "$(seth sig 'createIncentive((address,address,uint256,uint256,address),uint256)')"
467+
}
468+
469+
# ignored for now due to https://github.com/dapphub/dapptools/issues/861
470+
todo_sig_fuzz() {
465471
echo
466472
for _ in $(seq "$FUZZ_RUNS"); do
467473
id=$(mod "$(uint256)" 236272)
@@ -477,7 +483,6 @@ test_sig_fuzz() {
477483
done
478484
}
479485

480-
481486
test_keccak_1() {
482487
local output
483488
output=$(seth keccak 0xcafe)

src/seth/libexec/seth/seth-sig

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ for input in $inputs; do
1717
end=${type: -1} # get the last character to check for array types
1818
if [[ "$end" = "]" ]]; then
1919
arg="[]"
20+
elif [[ "$end" = ")" ]]; then
21+
echo "tuple types are not currently supported"
22+
exit 1
2023
elif [[ "$type" =~ ^byte.*$ ]]; then
2124
arg="0x"
2225
elif [[ "$type" =~ ^string$ ]]; then

0 commit comments

Comments
 (0)