Dec 19, 2023
Tutorials
ZxStim
Events allow logging to the Ethereum blockchain or other evm-equivalent blockchains. Some use cases for events are:
solidityEvents.sol// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract Event { // Event declaration // Up to 3 parameters can be indexed. // Indexed parameters helps you filter the logs by the indexed parameter event Log(address indexed sender, string message); event AnotherLog(); function test() public { emit Log(msg.sender, "Hello World!"); emit Log(msg.sender, "Hello EVM!"); emit AnotherLog(); } }