Arbitrum One
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
web3_sha3 computes the Keccak-256 hash of the hex-encoded data you pass in and returns it as a 0x-prefixed 32-byte value. Despite the sha3 in its name, it is the original Keccak-256 used throughout Ethereum — not the later NIST SHA3-256 standard, which produces different output for the same input. Arbitrum One (chain ID 42161) is EVM-equivalent — an Optimistic Rollup that settles to Ethereum and pays gas in ETH — so it hashes exactly as L1 does, and the result from https://arbitrum.therpc.io/YOUR_API_KEY matches what your contracts and tooling compute locally. This is a pure utility call: it touches no chain state and takes a single hex-string parameter.
Transfer(address,address,uint256) — to build topics filters for eth_getLogs against Arbitrum One contracts like Uniswap or Aave.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 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 Arbitrum One playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | invalid argument | Input is not a valid 0x-prefixed hex string. |
Transfer(address,address,uint256), encode it to hex first — passing the literal text yields the hash of the wrong bytes.sha3 function may return a different digest unless it specifically implements the Ethereum Keccak variant, so confirm your local hashing matches before relying on it interchangeably with this method.参数
0x-prefixed hex string