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?