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

transaction error when the second NFT to be mint #1

Open
jianguda opened this issue Sep 16, 2021 · 4 comments
Open

transaction error when the second NFT to be mint #1

jianguda opened this issue Sep 16, 2021 · 4 comments

Comments

@jianguda
Copy link

jianguda commented Sep 16, 2021

Thanks for sharing such a great NFT market implementation! However, I found a hidden but critical issue, that is when the second NFT to be mint, the MetaMask always claims a transaction error.

I tried to debug the contract but sadly I failed to find the real cause :< so I decide to report the issue to you!

Best!

@jianguda
Copy link
Author

@devpavan04

@devpavan04
Copy link
Owner

@jianguda can you share the metamask error.

@Yorzaren
Copy link

@jianguda Depending on how you create the second token, you might run into an issue with the colours not being unique.

If you did something like me you'd end up getting a nondescript contract error with metamask because of the colour issue.

Token 1: You shift some of the colour selectors but leave a few as default. Token gets created.
Token 2: You shift some of the colour selectors but leave a few as default. (At least one colour is not unique) Contract fails.

It comes from this part of the CryptoBoys.sol and isn't bug.

    // loop through the colors passed and check if each colors already exists or not
    for(uint i=0; i<_colors.length; i++) {
      require(!colorExists[_colors[i]]);
    }

There should be some sort of warning/popup about the colour not being unique but that message might have been missed by you. Try making sure that the colours you are using for each CryptoBoy is unique/set. Hopefully that resolves the issue you were seeing.

Repository owner deleted a comment from DavidGhedini Mar 14, 2024
@trandinhthang14
Copy link

@jianguda I have an error connecting the wallet. Can you show me this step?
"CRYPTO BOYS CONTRACT NOT DEPLOYED TO THIS NETWORK.
Connect Metamask to Kovan Testnet Or Localhost 7545 running a custom RPC like Ganache."

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