Event
Solidityपरिभाषा
Event एक Solidity construct है जो blockchain के transaction logs में data emit करने के लिए use होता है। Events cheap हैं (storage से काफी कम gas) और off-chain applications इन्हें efficiently query कर सकते हैं। Indexed parameters filter करने के लिए use होते हैं।
English version
Event is a Solidity construct used to emit data to the blockchain's transaction logs. Events are cheap (much less gas than storage) and can be efficiently queried by off-chain applications. Indexed parameters are used for filtering.
Code Example
// Déclaration d'événement (jusqu'à 3 indexed)
event Transfer(
address indexed from,
address indexed to,
uint256 amount
);
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
// Émettre un événement
emit Transfer(msg.sender, recipient, 100);संबंधित पेज
Solingo पर इस concept को practice करें
Event को interactive exercises और integrated IDE के साथ master करें।
मुफ्त में शुरू करें