Here is a sample contract which is designed to take xyz token. How can the contract verify that the sent is the xyz token?
xyz token
pragma &q