Find ICRC transaction by memo?

I couldn’t find any easy way to find a transaction by memo via the ICRC1 interface. Am I missing something?

I don’t think you’re missing something. I would love transactions to be indexed by memo, but unless something has changed last time I checked, I don’t believe they are.

Whatever functionality you were considering the memo field for, you could consider using a subaccount instead (as that would be indexed, but would mean you’d need to manage multiple addresses).

I think this is a standard pattern. For example when you top up ICP, a transaction is first sent to the cycles minting canister (CMC), and instead of the destination canister being specified in a memo of that transaction your ICP is actually sent to a subaccount on the CMC which is derived from the destination canister principal (or whatever will be holding the cycles, such as your dev principal). The CMC then needs notifying of the transfer (and the destination principal the subaccount is derived from) and it then burns the ICP in that subaccount.

Just providing this as an example of where a memo would be more intuitive, but a subaccount is more practical (given how the indexer works).

Thanks mate, I didn’t think about using subaccount for that!