Heat the oil in your wok over medium heat and add beaten eggs. Gently scramble the eggs, remove from the wok, and set aside.
Keeping the heat at medium, add the bacon to the wok and allow it to render down and become crisp. The level of crispiness you achieve here is totally based on personal preference. Once the bacon's looking good to you, take it out of the wok and set aside along with the scrambled eggs.
Add the diced onion to the wok and stir-fry until translucent. Once they're translucent, add the cooked rice and stir-fry for 2 minutes. Use your wok spatula to flatten out and break up any clumps. Add the salt, sugar, and soy sauces, and spread the Shaoxing wine (if using) around the perimeter of the wok to get a good sizzle going.
Give everything a good stir for another minute or so. When you start to see steam coming off the rice, that means it's heated through. If the rice looks a little dry, feel free to sprinkle in some water or chicken stock. Adding some liquid directly to large clumps of rice will also help to break them up.
To finish the dish, stir in the scrambled eggs, bacon, pepper, and scallions. Serve!