Skip to content

Commit 583330c

Browse files
authored
Merge pull request #788 from transmissions11/patch-10
seth: Use raw jq output in 4byte
2 parents 5cd96ed + a9cc49b commit 583330c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/dapp-tests/integration/tests.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,13 @@ test-lookup-address2() {
417417
}
418418
test-lookup-address2
419419

420+
# SETH 4BYTE TESTS
421+
# seth 4byte
422+
test-4byte() {
423+
[[ $(seth 4byte a9059cbb | tail -n 1) = "transfer(address,uint256)" ]] || error
424+
}
425+
test-4byte
426+
420427
# SETH FIXED POINT TESTS
421428
# seth --from-fix
422429
test-from-fix1() {

src/seth/libexec/seth/seth-4byte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ set -e
1313
if [[ $SETH_VERBOSE ]]; then
1414
curl -s "https://www.4byte.directory/api/v1/signatures/?hex_signature=${1:0:10}" | jq .
1515
else
16-
curl -s "https://www.4byte.directory/api/v1/signatures/?hex_signature=${1:0:10}" | jq '.results[] | .text_signature'
16+
curl -s "https://www.4byte.directory/api/v1/signatures/?hex_signature=${1:0:10}" | jq -r '.results[] | .text_signature'
1717
fi

0 commit comments

Comments
 (0)