hats-finance / Proof-Of-Humanity-V2-0xef0709445d394a22704850c772a28a863bb780b0

Proof of Humanity Protocol v2
2 stars 1 forks source link

Lack of event emissions in functions that change critical params #17

Open hats-bug-reporter[bot] opened 3 weeks ago

hats-bug-reporter[bot] commented 3 weeks ago

Github username: @dinkras Twitter username: dinkras Submission hash (on-chain): 0xe4b5ae49b8e24d1563067ded8273570ce6627b9b77223d190038f70b5f376719 Severity: low

Description: Description\ The functions with onlyGovernor modifier that change critical parameters should emit events.

Sensitive setter functions in smart contracts often alter critical state variables. Without events emitted in these functions, external observers or dApps cannot easily track or react to these state changes. Missing events can obscure contract activity, hampering transparency and making integration more challenging. To resolve this, incorporate appropriate event emissions within these functions. Events offer an efficient way to log crucial changes, aiding in real-time tracking and post-transaction verification.

Recommendation

Add events to all onlyGovernor functions that change critical parameters.

clesaege commented 3 weeks ago

Similar to https://github.com/hats-finance/Proof-Of-Humanity-V2-0xef0709445d394a22704850c772a28a863bb780b0/issues/12