Avalanche
Avalanche
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Avalanche
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
web3_sha3 computes the Keccak-256 hash of hex-encoded input and returns it as a 32-byte hex value. Despite the "sha3" in the name, this is Keccak-256 — the original submission, not the later NIST SHA3-256 standard — which is exactly the hash function the Avalanche C-Chain EVM uses for event topics, function selectors, and storage slots. Since the C-Chain is EVM-equivalent (the chain where AVAX pays for gas under Snowman/Avalanche consensus), the hashes it produces match what your contracts compute on-chain. Send the request to https://avalanche.therpc.io/YOUR_API_KEY (chain ID 43114, 0xa86a).
Transfer(address,address,uint256) — to build the topics array for eth_getLogs filters against C-Chain contracts such as Aave or Trader Joe.eth_call.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Avalanche playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | invalid argument | Input is not a valid 0x-prefixed hex string. |
sha3 function will produce different output unless it specifically implements the Ethereum Keccak variant — make sure your local tooling uses the right one so it agrees with what the C-Chain computes.المعاملات
0x-prefixed hex string