Show ENS avatars in rotki's transaction decoders

rotki is the portfolio tracker and accounting tool that protects your privacy

This is intended as an application for a small bounty to implement this issue https://github.com/rotki/rotki/issues/5622 and bring ENS and rotki integration even closer by showing ENS avatars in all rotki views, but especially in the decoded EVM transactions view.

You can find more (and up to date) info in the issue, but will copy paste its description here:

Abstract

At the moment in rotki we are showing the blockies icons for each evm address. Also if it's a primary ENS name we show its name.

Fos7Zd3X0AAzv4r

This is nice but it would be a much more personal touch, bring us closer to ENS and give a social spin to rotki if where both an avatar and a primary ens name is set, then instead of the blockies to show the avatar.

Task

Backend

  • Fetch avatars for evm addresses that have primary ens name and avatars set. We should probably have a local cache of those in a directory to not have to make remote network queries all the time. We assume a user's tracked accounts, and all the accounts it interacts with will have very limited amount with avatars set. That cache should be invalidated every X hours since avatars can change
  • Add the avatar existence information in the api, perhaps in the exact same endpoing as the reverse ens name check. But we shoudl discuss with @rotki/frontend about this

Frontend

  • When an evm account appears, if it has a primary ENS name (reverse resolution) set AND an avatar set, then instead of the blockie, show that avatar.