I needed max value for token.approve(contract, amount). My token is 18 decimals and used, BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") this was big enough for my case.
token.approve(contract, amount)
BigInt("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")