Omniscia vfat Audit

Admin Code Style Findings

Admin Code Style Findings

ANI-01C: Inefficient Emission of Zero Address

TypeSeverityLocation
Gas OptimizationAdmin.sol:L37

Description:

The Admin::constructor will emit an AdminSet event with the first argument of the event being the uninitialized admin storage entry.

Example:

contracts/base/Admin.sol
35/// @param admin_ Address of the admin
36constructor(address admin_) {
37 emit AdminSet(admin, admin_);
38 admin = admin_;
39}

Recommendation:

We advise an emission of the zero-address to be performed instead for that argument, optimizing the code's gas cost.

Alleviation (6ab7af3bb495b817ffec469255ea679b1813eecb):

The code was updated to utilize the address(0) value literal as the first argument of the AdminSet emission during the contract’s Admin::constructor, optimizing its gas cost.