Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major error with DApp, resulting in the application freezing during minting. #18

Open
tdev00 opened this issue Nov 2, 2021 · 3 comments

Comments

@tdev00
Copy link

tdev00 commented Nov 2, 2021

Hi all.

I'm having issues minting using the DApp. It seems as though minting over 10 NFTs at 100 MATIC or 100000000000000000000 WEI per NFT, throws an error. What seems to solve the issue is when the price is less than 100 MATIC.
The specific error code is as follows:
"Error: [number-to-bn] while converting number "1.3e+21" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1.3e+21""

I believe the source of the issue is the claimNFTs() function. Does anyone have an idea of how to fix this?

unknown
unknown2

@NoWeiBruh
Copy link

having same error right now

@hamzahoda
Copy link

having same error.

@mike7user
Copy link

mike7user commented Apr 14, 2022

Hi all.

I'm having issues minting using the DApp. It seems as though minting over 10 NFTs at 100 MATIC or 100000000000000000000 WEI per NFT, throws an error. What seems to solve the issue is when the price is less than 100 MATIC. The specific error code is as follows: "Error: [number-to-bn] while converting number "1.3e+21" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported. Given value: "1.3e+21""

I believe the source of the issue is the claimNFTs() function. Does anyone have an idea of how to fix this?

This can be a few issues.
ONE:
HERE is a link on converting your price from big numbers to small numbers. Use a [Eth to Wei converter] (https://eth-converter.com/) to get the correctly proportioned eth price.

or

TWO:
You may have the incorrectly addressed the ".mint" function. Try reviewing back to see what call name you labeled the function during contract deployment and ensure that the to are one and the same. A common issue would be ".saleMint" value in SmartContract.sol and a ".mint" value in the App.js. obviously, They need to be the same for the imported contract to communicate with the Dapp script.

THREE:
You may be inputting the big number value incorrectly. This link may help you understand how to format the value to get the correct output.

Goodluck. If I notice your reply, I will respond asap. The struggle is real! Keep on truckin!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants