I thought of this looking at this question, where contingency is used to cast revivify (which consumes 300 gp worth of diamonds). A more common example would be stoneskin, which consumes 100 gp worth of diamond dust.
The spell contingency reads, in part:
Choose a spell of 5th level or lower that you can cast, that has a casting time of 1 action, and that can target you. You cast that spell—called the contingent spell—as part of casting contingency, expending spell slots for both, but the contingent spell doesn’t come into effect. Instead, it takes effect when a certain circumstance occurs...
The contingent spell takes effect immediately after the circumstance is met for the first time, whether or not you want it to, and then contingency ends...
If you cast this spell again, the effect of another contingency spell on you ends. Also, contingency ends on you if its material component is ever not on your person.
Contingency says that you cast the contingent spell. Full stop. As long as you satisfy the listed requirements, the spell gets cast, and the contingency is set. The listed requirements are: it's a level 5 or lower spell; you can cast it; it has a casting time of 1 action; it can target you.
How is the material requirement for revivify handled? Is the 300 gp worth of diamonds consumed when the contingency spell is cast? What happens if someone swipes your 300 gp worth of diamonds part way into the casting of contingency?
Is the general idea that you have to burn a material component every time you set the contingency, whether it's triggered or not?