Solady has this feature on their ERC20 contract where the Permit2 address gets infinite allowance. I want to do similar functionality, but for an arbitrary contract I specify, and I want to do it on the OpenZepplin ERC20 instead.
What is the best way to go about this?
Perfect, thank you!
Full solution for anyone else looking:
function _spendAllowance(address _owner, address _spender, uint256 _amount) internal override(ERC20) { if (_spender == INFINITE_SPENDER) { return; } super._spendAllowance(_owner, _spender, _amount); }