Omniscia Hot Cross Audit

CrossVesting Code Style Findings

CrossVesting Code Style Findings

CVG-01C: Variable Mutability Specifiers

TypeSeverityLocation
Gas OptimizationInformationalCrossVesting.sol:L21, L31

Description:

The linked variable is assigned to only once during the contract's constructor.

Example:

contracts/vesting/CrossVesting.sol
29constructor(ERC20 _token) {
30 require(Misc.isContract(address(_token)), "Invalid token address");
31 token = _token;
32}

Recommendation:

We advise it to be set as immutable greatly optimizing its gas cost.

Alleviation:

The immutable visibility specifier was properly introduced to the vesting contract.