Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

217
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda