0

i am want create max approval fot approve token transaction on polygon exchange like this

const maxApproval = new BigNumber(2).pow(256).minus(1);

i see the documention in https://docs.0x.org/0x-api-swap/advanced-topics/how-to-set-your-token-allowances#setting-allowances-on-etherscan

but i got error in run build like this

invalid BigNumber value (argument="value", value="115792089237316195423570985008687907853269984665640564039457584007913129639935

what the best max approval token allowance in polygon ?

0x.js: ^9.2.0, typescript": 4.9.3

1
  • How are you using that value?
    – Ismael
    Commented Dec 20, 2022 at 17:53

1 Answer 1

1

in ethers you can use the built-in max numbers like:

ethers.constants.MaxUint256

ethers.constants.MaxInt256

Hope to helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.