Prepare the sambal by putting the chili, shallots, garlic, and tomatoes in a food processor and grind it until smooth
Prepare the eggs:
Preheat 2 Tbsp of cooking oil in a medium-size skillet. When the oil is hot, gently place the hard-boiled eggs on the pan and let them pan-fried and use tongs to rotate the egg so the surface touches the hot oil and blistered up evenly all over. Keep the oil to saute the sambal
Cooking the sambal:
In the same pan you use to pan-fry the egg, add the ground chili mixture, and stir fry until really fragrant, about 3 minutes. Add the aromatics and seasonings and continue to saute until the sambal turns slightly darker in color (the sugar will caramelize and darken the sambal)
Have a taste. The sambal should taste more at a sweet side. Adjust by adding more salt or sugar to your liking. The sambal should be thick as liquid evaporates when you cook. If you like it runnier, just cook until the consistency you prefer. Place the eggs back into the pan and mix with sambal. Remove from the heat and serve