Just a small question regarding how solidity event works. Let's say I have a function buyCandy()
. At the end of the function I attached event
:
emit LogBuyCandy(msg.sender);
event LogBuyCandy(address _buyer);
Let's say there are 10 people who's in the site at the same time, viewing the list of candies to buy. When one of the users bought the candy which triggered the event, I'm popping up a message that reads something like "0x...(address) bought the candy".
ex:
listenToEvents: function() {
App.contracts.Candy.deployed().then(function(instance) {
instance.LogBuyCandy({},{}).watch(function(error, event) {
if (!error) {
// popup message
My question is, can everyone see that message at the same time? or is it just the one who bought the candy seeing the message only?