Function redeemUnderlying - solidity

function redeemUnderlying(value)

how do i get the maximum value?
-1 doesn’t work in uint

Tip: try
~uint(0)
it should work out.

does not work by setting the value equal to zero

could you display the line of Solidity you try to compile ?
The biggest uint value in Solitidy (like for the Unlimited Approval) is ~uint(0), that you could also write 0xffff…fff with 64 ‘f’

what works is the function
IVenus(collateral).balanceOfUnderlying(account)

What about
IVenus(collateral).redeemUnderlying(0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)