sherlock-audit / 2024-06-boost-aa-wallet-judging

3 stars 1 forks source link

Albort - Uninitialized immutable variable #458

Open sherlock-admin2 opened 1 month ago

sherlock-admin2 commented 1 month ago

Albort

High

Uninitialized immutable variable

Summary

In the AAction contract, there is an immutable variable VALIDATOR, but it has not been initialized either at the time of declaration or within the constructor. In Solidity, immutable variables must be assigned a value either during declaration or in the constructor, otherwise, a compilation error will occur.

Vulnerability Detail

Since AAction is an abstract contract, the derived contract is expected to initialize the VALIDATOR variable in its constructor. However, in the derived contract EventAction, VALIDATOR is also not initialized, which will result in a compilation failure.

Impact

Code Snippet

https://github.com/sherlock-audit/2024-06-boost-aa-wallet/blob/main/boost-protocol/packages/evm/contracts/actions/EventAction.sol#L26

Tool used

Manual Review

Recommendation