Fry grated coconut along with perinjeerakam (instead u can use 1/2 tsp garam masala too).
Add pepper and saute till coconut becomes golden brown.
Lower the flame and add chilly powder. Fry for a few seconds.
Turn off the flame and grind the above mixture along with a little water so as to make a paste.
Heat coconut oil in a pan and saute onion, tomato and green chillies.
After a few minutes, add cooked potato and egg (each egg sliced to two pieces).
Pour the coconut paste with some water and continue heating on medium heat.
When the gravy becomes thick, switch off the flame and serve.
This is a kerala style egg curry served with rice.