Writing contracts is the fundamental purpose of Solidity. However, writing a contract demands sound error and exception handling. Errors and exceptions are the norm in programming and Solidity provides ample infrastructure for managing both. Writing robust contracts with proper error and exception management is one of the top best practices. Events are another important construct in Solidity. For all topics that we've discussed so far, we've seen a caller that invokes functions in contracts; however we have not discussed any mechanism through which a contract notifies its caller and others about changes in its state and otherwise. This is where events come in. Events are a part of event-driven programs where, based on changes within a program, it proactively notifies its caller about the changes. The caller is free to use this information...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine