In the following example from the Solidity documentation, what does emit do?

highestBidder = msg.sender;
highestBid = msg.value;
emit HighestBidIncreased(msg.sender, msg.value);
  • It means "when this transaction is written into the blockchain, write alongside it a HighestBidIncreased event with the current values of msg.sender and msg.value". Oct 28, 2019 at 15:19

1 Answer 1


Emit keyword is used to emit an event in solidity, which can be read by the client in Dapp.

Event in solidity is to used to log the transactions happening in the blockchain.

Reference: https://solidity.readthedocs.io/en/v0.4.24/contracts.html#events


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.