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: uid for drops #9956

Merged
merged 34 commits into from
Apr 4, 2024
Merged

fix: uid for drops #9956

merged 34 commits into from
Apr 4, 2024

Conversation

…tion

refactor(PaidGenerative.vue): remove unused code and simplify mintNft function
refactor(useDropMassMint.ts): comment out unused code and refactor allocateItems function
feat(fxart.ts): add updateMetadata function
fix(randomize.ts): increase length parameter in uidMathDate function
…temsGrid

refactor: update minting process in PaidGenerative.vue to store NFT metadata on-chain
fix: adjust useNft to accept displaySn parameter for controlling display of serial number
refactor: update useDropMassMint to include NFT metadata in updateMetadata call
fix: adjust useExperiments to rename uid to flagUid
refactor: update useNftMetadata to accept displaySn parameter for controlling display of serial number
fix: change BASE_URL in fxart service to localhost for local testing
refactor: update updateMetadata in fxart service to accept new parameters for updating metadata
fix(PaidGenerative.vue): modify args mapping and reverse order if more than one
feat(PaidGenerative.vue): implement mintedNfts array and metadata fetching
feat(PaidGenerative.vue): uncomment mintingSession value assignment and subscribeForNftsWithMetadata call
refactor(useDrops.ts): modify useDropStatus to accept drop parameter and fetch collection stats
fix(useDropMassMint.ts): resolve promise with result directly
refactor(useDropMassMintPreview.ts): change name assignment in getPreviewItemsToMintedNfts
feat(fxart.ts): add metadata field to DoResult type
fix(fxart.ts): change api method to 'get' in updateMetadata function
…ents

fix(PaidGenerative.vue): add error handling for metadata fetch
feat(MintOverview.vue): add hide-collection attribute to toMintNft component
feat(ConfirmPurchaseItemRow.vue): add hideCollection prop and adjust layout
fix(useGalleryItem.ts): sanitize IPFS URL for nftImage value
…actual values

fix(PaidGenerative.vue): reduce retry count from 20 to 12 and change error logging level from error to warn
fix(useDropMassMint.ts): rename 'sn' property to 'nft' in updateMetadata function call
feat(fxart.ts): update BASE_URL based on window location host
fix(fxart.ts): rename 'sn' property to 'nft' and update endpoint path in updateMetadata function
refactor(ItemsGrid.vue): remove unused flagUid experiment
feat(ItemsGrid.vue): add condition to display serial number only for NFTs with id less than 4 digits
…ed 'length' set

feat(crypto.spec.ts): add comment about uidCrypto() or uidMath() for more than 1k concurrent users
…mmented mintingSession from useDropMassMint.ts
fix: adjust flagUid condition to include '/ahk/' path only
chore: add console log to monitor route changes in useExperiments.ts
refactor(transactionMintDrop.ts): update execMintDrop function to use new hooks and storeToRefs
feat(transactionMintDrop.ts): add nftsMetadata computed property
refactor(transactionMintDrop.ts): update args mapping and transaction execution within flagUid conditional block
Copy link

netlify bot commented Apr 1, 2024

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit d03cd0a
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/660e58c17a89080008290b67
😎 Deploy Preview https://deploy-preview-9956--koda-canary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@preschian preschian changed the title feat: uid for drops fix: uid for drops Apr 1, 2024
@preschian
Copy link
Member Author

preschian commented Apr 1, 2024

Hi team @prury @kodadot/internal-dev, feel free to test this PR. Let me know what your concerns are. Make sure to test it only on ahk paid-drop.

Changes:

NFT IDs

The significant change is that nft now has ten length ID
before: https://deploy-preview-9956--koda-canary.netlify.app/ahk/gallery/403-65
after: https://deploy-preview-9956--koda-canary.netlify.app/ahk/gallery/403-2404222150

SN on Metadata

in the last step, metadata will be set to our fxart worker: https://fxart-beta.kodadot.workers.dev/metadata/v1/json?chain=ahk&collection=403&nft=2404222150&metadata=ipfs:%2F%2Fbafybeiagizkxnmsovz3xczaejzbjslgudgzz4gpktki6zoo3qptuknwx64%2F0.json

How sn works: extend ipfs metadata, and override name with ${collection.name} #${index}. the index relies on the nft index from our graphql query. ref: https://github.com/kodadot/private-workers/pull/105/files

No dependencies to allocate and count endpoints

There is no need to allocate first. And replace count with a graphql query. There is no need for real-time count here because the uid is intended to fix the issue of minting with concurrent users.

@yangwao
Copy link
Member

yangwao commented Apr 1, 2024

This is multi kill, looking forward, amazing work! 💪

Screenshot_20240401_133031_GitHub.png

@prury
Copy link
Member

prury commented Apr 1, 2024

@preschian it seems that in this PR, sn is no longer showing inside collections

https://deploy-preview-9956--koda-canary.netlify.app/ahp/collection/112

@preschian
Copy link
Member Author

it seems that in this PR, sn is no longer showing inside collections

on it, I just realized that grid list on drops page and collection page was use different setting

should be show up like this https://deploy-preview-9956--koda-canary.netlify.app/ahp/drops/convergente

@prury
Copy link
Member

prury commented Apr 1, 2024

ok was finally able to mint on the purple pills using this PR

https://deploy-preview-9956--koda-canary.netlify.app/ahk/gallery/406-2404717144

image

@preschian
Copy link
Member Author

if this one gets merged will it affect all the other paid drops as well? because you asked for it to be tested on the ahk paid drop specifically

yes, it will affect all paid drops on ahk and ahp. steps before deployment to production:

lmk if done testing, I will remove the flag and deploy the PR on fxart

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label Apr 3, 2024
@prury
Copy link
Member

prury commented Apr 3, 2024

if this one gets merged will it affect all the other paid drops as well? because you asked for it to be tested on the ahk paid drop specifically

yes, it will affect all paid drops on ahk and ahp. steps before deployment to production:

* remove this flag https://github.com/kodadot/nft-gallery/pull/9956/files#diff-86009d10a2cbd323fd909dc0a7e4486275c59d24e9bda716786aea27e2baef11R25-R26

* deploy fxart PR [poc: drops uid private-workers#105](https://github.com/kodadot/private-workers/pull/105)

lmk if done testing, I will remove the flag and deploy the PR on fxart

perfect, good to go for me, better to merge to canary today so i can detected any other thing before tomorrows drop
i wish other people got time to test it as well but lets go

@preschian
Copy link
Member Author

so i can detected any other thing before tomorrows drop

updated 👍🏻

@prury prury requested review from daiagi and removed request for hassnian April 3, 2024 15:04
@prury
Copy link
Member

prury commented Apr 3, 2024

@kodadot/internal-dev can we get some ❤️ reviews?

utils/randomize.ts Outdated Show resolved Hide resolved
Copy link

codeclimate bot commented Apr 4, 2024

Code Climate has analyzed commit d03cd0a and detected 4 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2
Duplication 2

View more on Code Climate.

Copy link

sonarqubecloud bot commented Apr 4, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

oke it's on canary too.

cc @preschian

maybe we can try swap to Filebase? since we are it paying anyways iirc

image

image

image

@yangwao yangwao mentioned this pull request Apr 4, 2024
@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

Once got #9974 resolved I'm gonna merge this and then probably release.

@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

tested single
image
multiple
image
maybe I would make those previews bit bigger?

cc @exezbcz

@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

Thanks!
pay 150 usd

@yangwao yangwao merged commit e28e707 into main Apr 4, 2024
18 of 19 checks passed
@yangwao yangwao deleted the poc-drops-with-uid branch April 4, 2024 11:13
@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

😍 Perfect, I’ve sent the payout
💵 $150 @ 8.47 USD/DOT ~ 17.71 $DOT
🧗 1xjvRADwdJcnmUCLWerEHR4iGCT5EBTm4D4fzLLg4LcAC9p
🔗 0xa5fd08daf80ee71f538acc6e771406bb180d2a81dbbd1e312c818bc51da17ed6

🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

@yangwao yangwao added the paid pull-request has been paid label Apr 4, 2024
@yangwao
Copy link
Member

yangwao commented Apr 4, 2024

My fav video

Screen.Recording.2024-04-04.at.13.13.19.mov

This was referenced Apr 4, 2024
This was referenced Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paid pull-request has been paid S-expected-in-upcoming-release-🚚 S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked
Projects
None yet
5 participants