Block interaction using Advancements

I am working on a small datapack that adds magic rituals to the game, I added custom blocks but I need to add interactions. The best way to do it is with advancements, I tried it but I am using a hopper for that custom block because of its shape. I need some help with the advancements (I dont know much about these). I want to make so that when a player right clicks on a hopper (locked and has a custom name) while holding any item, then a function is executed.
Continue to help post