Polygon
Polygon
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
web3_sha3 computes the Keccak-256 hash of the hex-encoded data you pass in and returns it as a 32-byte 0x-prefixed string. Despite the method name, this is the original Keccak-256 used throughout the EVM — not the later NIST SHA3-256 standard — which is exactly the hash Polygon and every EVM chain use for event topics and function selectors. Running it on a Polygon node lets you reproduce on-chain hashing without a local crypto library. Send the request to the Polygon mainnet endpoint at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89).
Transfer(address,address,uint256) — to build eth_getLogs filters for Polygon contracts such as the USDT token at 0xc2132D05D31c914a87C6611C10748AEb04B58e8F.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | data | string | نعم | Arbitrary data to hash, provided as a 0x-prefixed hex string. Empty input (`"0x"`) is valid. |
| النوع | الوصف |
|---|---|
| string | 0x-prefixed 32-byte (64-character) Keccak-256 hash of the input. |
Try it live in the Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | invalid argument | Input is not a valid 0x-prefixed hex string. |
Transfer(address,address,uint256), encode it to its hex byte representation first — passing the literal string will hash the wrong bytes.المعاملات
0x-prefixed hex string