A way to check if a chest with a specific pool of items inside is opened?

Example: You open a chest that has one block of dirt in the middle, it triggers a function. Is it possible?
Continue to help post