From 7f11a6f14839baca8d143a73a8b1a66ed0477c37 Mon Sep 17 00:00:00 2001 From: 0xMushow <105550256+0xMushow@users.noreply.github.com> Date: Fri, 11 Apr 2025 15:50:19 +0200 Subject: [PATCH] fix(book): Web3 JsonRPC incorrect keccak example (#15696) --- book/jsonrpc/web3.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/book/jsonrpc/web3.md b/book/jsonrpc/web3.md index d6ab8bf330..8221e5c250 100644 --- a/book/jsonrpc/web3.md +++ b/book/jsonrpc/web3.md @@ -28,7 +28,12 @@ Get the Keccak-256 hash of the given data. ### Example +```text +// > echo -n "rust is awesome" | xxd -p +7275737420697320617765736f6d65 +``` + ```js -// > {"jsonrpc":"2.0","id":1,"method":"web3_sha3","params":["rust is awesome"]} +// > {"jsonrpc":"2.0","id":1,"method":"web3_sha3","params":["0x7275737420697320617765736f6d65"]} {"jsonrpc":"2.0","id":1,"result":"0xe421b3428564a5c509ac118bad93a3b84485ec3f927e214b0c4c23076d4bc4e0"} ``` \ No newline at end of file