The function onTokenTransfer in the contract lacks the view modifier, which should be added because the function only reads the contract's state without modifying it.
The function onTokenTransfer performs a check on the sender (msg.sender) against the address of the stakingPool, but does not alter the contract's state.
Functions that only read state should be marked with the view modifier to optimize gas consumption and improve code clarity.
No direct security risk, but omitting the view modifier can lead to inefficient gas usage and unclear intent in the code.
Wake extension (VSCode).
Add the view modifier to the function onTokenTransfer as it does not mutate the contract's state:
Line: contracts/linkStaking/OperatorVCS.sol 94-96
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.