If I have an external method that does nothing but call another state-modifying internal method, natrix will trigger for NTX4.
Strangely it also triggers for the internal function which is more clearly modifying state.
/home/ben/Code/curve/fee_splitter_v2/src/GlobalFeeSplitter.vy:91:0 style NTX4: Function 'set_approval' reads contract state but is not marked as 'view'.
90: @external
-> 91: def set_approval():
-> 92: """
-> 93: @notice Set infinite approval for fee distributor
-> 94: @dev Only needs to be called once after deployment OR
-> 95: if the fee collector's target token is changed
-> 96: """
-> 97: ownable._check_owner()
-> 98: self._set_approval()
99:
/home/ben/Code/curve/fee_splitter_v2/src/GlobalFeeSplitter.vy:102:0 style NTX4: Function '_set_approval' reads contract state but is not marked as 'view'.
101: @internal
-> 102: def _set_approval():
-> 103: extcall fee_token.approve(
-> 104: fee_distributor.address, max_value(uint256), default_return_value=True
-> 105: )
106:
If I have an external method that does nothing but call another state-modifying internal method, natrix will trigger for NTX4.
Strangely it also triggers for the internal function which is more clearly modifying state.