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

Fix float and integer check for metaplex share allocation #776

Merged

Conversation

anselsol
Copy link

@anselsol anselsol commented Oct 22, 2021

Our 4000$ honest mistake

Yesterday we used the Fair Launch Protocol for the first time to launch our collection (I'm a developer on several other projects, but they didn't use the FLP). And it did go well up until we got to mint.

We got the error where it says that the creators shares must equal 100 for the metadata to be valid and that no one will be able to mint.

It's tough ! Because it was the first time we used multiple wallets and had to split the costs (and we had to change it last minute).

It looked like this :

"creators":[
    {"address":"_redacted_", "share":16.5},
    {"address":"_redacted_", "share":16.5},
    {"address":"_redacted_", "share":16.5},
    {"address":"_redacted_", "share":50.5}
]

The problem was that the verify_token_metadata returned no error when there actually was one. When we checked the rust code, we realised that the share number had to be of u8 type. No floaties allowed in there !

This PR is fixing this by throwing an error when the numbers in creators[].share are not integers. I hope this will help someone avoid this mistake in the future.

@vercel
Copy link

vercel bot commented Oct 22, 2021

Someone is attempting to deploy a commit to the Metaplex Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Oct 22, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

litjesus – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/litjesus/HCcyoCRrwpfPQ8YmqDcNHxZh3Wiu
✅ Preview: https://litjesus-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

ono-store – ./js

🔍 Inspect: https://vercel.com/metaplex/ono-store/6Kv3SvurP4kG3oxEjYXDCfHZNQVv
✅ Preview: Failed

rnftz – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/rnftz/4LqGXcceHakFNL7HPTS4coqDeTQy
✅ Preview: https://rnftz-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

fair-launch – ./js/packages/fair-launch

🔍 Inspect: https://vercel.com/metaplex/fair-launch/AU8hvxMHVuUky1onKfb5b1vcaJZV
✅ Preview: https://fair-launch-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

helium – ./js

🔍 Inspect: https://vercel.com/metaplex/helium/BsdQwuambKTJD7fKDC9weeFh7VXp
✅ Preview: Failed

nephrops – ./js

🔍 Inspect: https://vercel.com/metaplex/nephrops/9hP2VHJWNxDSNCnGeDF82N19bFR7
✅ Preview: https://nephrops-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

pinkskull – ./js

🔍 Inspect: https://vercel.com/metaplex/pinkskull/DV6CPkwDLH35rwVzazkSFZS2F3ff
✅ Preview: https://pinkskull-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

squidstuff – ./js

🔍 Inspect: https://vercel.com/metaplex/squidstuff/HpQf4C4GJfhQhy9WzEq8aY4gpRrb
✅ Preview: https://squidstuff-git-fork-arcnft-our-4000-mistake-metaplex.vercel.app

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

Successfully merging this pull request may close these issues.

None yet

3 participants