@gokulalex I’m not sure what you are intending the contract account to perform, so the following may not be what you are looking for.
Here is an example Hash Time Lock Contract (HTLC) for Algorand Standard Assets (ASA). It assumes 1) the ASA is already created on the network 2) the ASA can be sent to the escrow contract and 3) the ASA may be redeemed by the preimage or after timeout. The novel bit is the TEAL code provides a method to approve an opt-in transaction for a specific ASA, thus allowing the escrow contract to hold it.