Irony is the literary element used in the Cast of Amontillado, specifically Dramatic Irony.
There are three types of Irony.
1) Verbal Irony - Using words. We say one thing but meaning another.
2) Situational Irony - Difference of what is expected to happen versus what actually happened.
3) Dramatic Irony - This is where the readers or viewers knew or is more aware of what is happening than the character in the story or play.