Avalanche
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Avalanche
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | data | string | Sim | Arbitrary data to hash, provided as a 0x-prefixed hex string. Empty input (`"0x"`) is valid. |
| Tipo | Descrição |
|---|---|
| string | 0x-prefixed 32-byte (64-character) Keccak-256 hash of the input. |
Try it live in the Avalanche playground.
| Código | Mensagem | Causa |
|---|---|---|
-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.Parâmetros
0x-prefixed hex string