Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
Solidity - filter logs with indexed array

I've a contract which emits event with string array as follows:

event OnTransfer(
    address indexed to,
    address indexed from,
    string[] indexed indexedTransferIds,
    string[] transferIds,
    uint256 amount
);

function transfer(
    address to,
    uint256 amount,
    string[] memory transferId
) external {
    bool transfered = token.transfer(to, amount);

    require(transfered, "Transfer failed");

    emit OnTransfer(to, address(this), transferId, transferId, amount);
}

I want to filter logs with the indexedTransferIds topic. According to the documentation here the event parameter is hashed as below:

the encoding of an array (both dynamically- and statically-sized) is the concatenation of the encoding of its elements, always padded to a multiple of 32 bytes (even bytes and string) and without any length prefix

What's the way to create the data so i can use it as topic in my log queries?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda