Closed Jarsen136 closed 1 year ago
Name | Link |
---|---|
Latest commit | 1c57f57863855b599c935162e4d97cc7909c4cf9 |
Latest deploy log | https://app.netlify.com/sites/koda-canary/deploys/647df421a0ade500087b60cf |
Deploy Preview | https://deploy-preview-6137--koda-canary.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
WARNING @Jarsen136 PR for issue #6117 which isn't assigned to you. Please be warned that this PR may get rejected if there's another assignee for issue #6117
for testing image please use this one
[
"https://replicate.delivery/pbxt/xZ6WzuO5VNqFJNhgMwR4mpE3COFh8GRpkSio3NvQdLdmDOQE/out-0.png",
"https://replicate.delivery/pbxt/Cxfhi4qeTNvn6kcrrKlvL1YUPBKeAmbNrrf2ATtPVd6o5gDEB/out-1.png",
"https://replicate.delivery/pbxt/JRefeymjem3mpQY4fHABatiApzEoJhSxzFXvf5zD00dnmDOQE/out-2.png",
"https://replicate.delivery/pbxt/oxnUi6H6sqa3G94GLgmN9gnFrmce5agGMlOqV6vfd5xbO4ARA/out-3.png"
]
window for 10 waifus from each phase
So apparently there should be 10 waifus
[
"https://replicate.delivery/pbxt/PyQofrsc39W0LCzBel4ofvwStvZinbywkMoH1aNZ9wwer5EEB/out-0.png",
"https://replicate.delivery/pbxt/PtCm0mP3PBY5BdYKo1kqwmMmlgZl4V9uZzeGC5K624z7MngIA/out-0.png",
"https://replicate.delivery/pbxt/7900WedrZPyzFK5VI8Sb4K0NZ1JEt6TMRf2XpT1EBSmOaOBRA/out-0.png",
"https://replicate.delivery/pbxt/xZ6WzuO5VNqFJNhgMwR4mpE3COFh8GRpkSio3NvQdLdmDOQE/out-0.png",
"https://replicate.delivery/pbxt/Cxfhi4qeTNvn6kcrrKlvL1YUPBKeAmbNrrf2ATtPVd6o5gDEB/out-1.png",
"https://replicate.delivery/pbxt/JRefeymjem3mpQY4fHABatiApzEoJhSxzFXvf5zD00dnmDOQE/out-2.png",
"https://replicate.delivery/pbxt/oxnUi6H6sqa3G94GLgmN9gnFrmce5agGMlOqV6vfd5xbO4ARA/out-3.png",
"https://replicate.delivery/pbxt/T11jVf2EUExMdCqnjx5xH72WWWPedvZM82RrEbaADq8CaOBRA/out-0.png",
"https://replicate.delivery/pbxt/pamnM0QmQTbaDZasPiOievPg0ekfW2X2B23WbsuqgeveobHIC/out-0.png",
"https://replicate.delivery/pbxt/9sfHL1QbXjUGZqvJZBfyS90ZVR1souUUL03QsVWTYxPId7ARA/out-1.png",
"https://replicate.delivery/pbxt/m2MagsaOVSYuMxbgv32b3bDaTtD0ZCVaA17eRO42KklkudgIA/out-2.png"
]
Amazing, we can flex mobile in following issue.
@vikiival can prepare some testing minting for data and Luu can give feedback and go through, we have still two days before running for UTXO and testing it there :)
@Jarsen136 so url to obtain waifu images is
https://waifu-me.kodadot.workers.dev/latest
@Jarsen136 so url to obtain waifu images is
https://waifu-me.kodadot.workers.dev/latest
OK
Then I wonder where can I fetch the details data for this part. Or the data on this page is all static?
for testing you can use this collection https://canary.kodadot.xyz/stmn/collection/6?collectionId=6
total is collection.nftCount / (colllection.max || Infinity)
Other is just plain typescript (checking the current time)
Regarding to available for mint (I would check the query) (actually would subscribe that)
query mintedBetween($from: DateTime, $to: DateTime) {
minted: nftEntitiesConnection(orderBy: createdAt_DESC, where: {createdAt_gte: $from, createdAt_lte: $to}) {
count: totalCount
}
}
const MAX_PER_WINDOW = 10
const available = MAX_PER_WINDOW - minted.count
cc @Jarsen136
So I have also minting API
POST https://waifu-me.kodadot.workers.dev/
{
"image": "https://replicate.delivery/pbxt/9J9QidY2qn7fUSGG1MhM3gM1q6q22uxuTuYD2YUcTfyU9dnQA/out-0.png",
"metadata": "ipfs://ipfs/bafkreibp2b6dgpj5ff4jp4lxcn2htt5b5ejhttweuu6olazkex6vbftapa",
"address": "DJW45XKKomj9HPKzLuZKqaneKhb53QGQCLCkEx9PaZk6d4k"
}
So data to fill from frontend
import { createMetadata, unSanitizeIpfsUrl } from '@kodadot1/minimark/utils'
import { pinJson } from '@/services/nftStorage'
import { preheatFileFromIPFS } from '@/utils/ipfs'
const name = 'Corn Waifu'
const description = 'This anime waifu loves corn with butter and salt. Please dont microwave your corn, cook it like a normal person. Boil salty water and add corn - cook 15 minutes. Your anime waifu will make you a popcorn if you defeat her in a final battle. Only true winner can enjoy good dinner in a form of corn'
const image = selected.image
const meta = createMetadata(
name,
description,
imageHash,
undefined,
[],
'kodadot.xyz',
'image/png'
)
const metaHash = await pinJson(meta, image)
preheatFileFromIPFS(metaHash)
const hash = unSanitizeIpfsUrl(metaHash)
const { accountId } = useAuth()
const res = await doWaifu(accountId.value, hash, image)
@yangwao live bug hunting on utxo
i believe in @Jarsen136
yeah seems we will be rapidly and radically updating π
I have a few suggestions for changes but won't provide complete feedback.
this to 16px top, bottom margin, please
Otherwise, layout is correct, and visual things could be done ad-hoc
Thank you!
There are still some unclear things that need your guide. @vikiival
for testing you can use this collection https://canary.kodadot.xyz/stmn/collection/6?collectionId=6
total is
collection.nftCount / (colllection.max || Infinity)
I'm not sure how to get the
max
from collection.Regarding to available for mint (I would check the query) (actually would subscribe that)
query mintedBetween($from: DateTime, $to: DateTime) { minted: nftEntitiesConnection(orderBy: createdAt_DESC, where: {createdAt_gte: $from, createdAt_lte: $to}) { count: totalCount } }
It's strange that when I try to get the total count of nfts from this testing collection, it returns nothing.
/stmn/collection/6
It works on another collection.
So I have also minting API
POST https://waifu-me.kodadot.workers.dev/
So data to fill from frontend
import { createMetadata, unSanitizeIpfsUrl } from '@kodadot1/minimark/utils' import { pinJson } from '@/services/nftStorage' import { preheatFileFromIPFS } from '@/utils/ipfs' const name = 'Corn Waifu' const description = 'This anime waifu loves corn with butter and salt. Please dont microwave your corn, cook it like a normal person. Boil salty water and add corn - cook 15 minutes. Your anime waifu will make you a popcorn if you defeat her in a final battle. Only true winner can enjoy good dinner in a form of corn' const image = selected.image const meta = createMetadata( name, description, imageHash, undefined, [], 'kodadot.xyz', 'image/png' ) const metaHash = await pinJson(meta, image) preheatFileFromIPFS(metaHash) const hash = unSanitizeIpfsUrl(metaHash) const { accountId } = useAuth() const res = await doWaifu(accountId.value, hash, image)
I'm not sure about the minting process. Should the user select one of the 10 images and then post it? I thought nft was distributed to users randomly after minting. π
So I have also minting API
POST https://waifu-me.kodadot.workers.dev/
So data to fill from frontend
import { createMetadata, unSanitizeIpfsUrl } from '@kodadot1/minimark/utils' import { pinJson } from '@/services/nftStorage' import { preheatFileFromIPFS } from '@/utils/ipfs' const name = 'Corn Waifu' const description = 'This anime waifu loves corn with butter and salt. Please dont microwave your corn, cook it like a normal person. Boil salty water and add corn - cook 15 minutes. Your anime waifu will make you a popcorn if you defeat her in a final battle. Only true winner can enjoy good dinner in a form of corn' const image = selected.image const meta = createMetadata( name, description, imageHash, undefined, [], 'kodadot.xyz', 'image/png' ) const metaHash = await pinJson(meta, image) preheatFileFromIPFS(metaHash) const hash = unSanitizeIpfsUrl(metaHash) const { accountId } = useAuth() const res = await doWaifu(accountId.value, hash, image)
I'm not sure about the minting process. Should the user select one of the 10 images and then post it? I thought nft was distributed to users randomly after minting. π
Those are only possible drops - user cannot influence what nft they get
There are still some unclear things that need your guide
query collectionByIdId($id:String!) {
collectionEntityById(id: $id) {
id
name
image
max
nftCount
createdAt
}
}
you need to use stick v3
https://squid.subsquid.io/stick/v/v3/graphql
I thought It was pushed in some update
query mintedBetween($id: String!, $from: DateTime, $to: DateTime) {
minted: nftEntitiesConnection(orderBy: createdAt_DESC, where: { collection: { id_eq: $id }, createdAt_gte: $from, createdAt_lte: $to}) {
count: totalCount
}
}
So I have also minting API
POST https://waifu-me.kodadot.workers.dev/
So data to fill from frontend
import { createMetadata, unSanitizeIpfsUrl } from '@kodadot1/minimark/utils' import { pinJson } from '@/services/nftStorage' import { preheatFileFromIPFS } from '@/utils/ipfs' const name = 'Corn Waifu' const description = 'This anime waifu loves corn with butter and salt. Please dont microwave your corn, cook it like a normal person. Boil salty water and add corn - cook 15 minutes. Your anime waifu will make you a popcorn if you defeat her in a final battle. Only true winner can enjoy good dinner in a form of corn' const image = selected.image const meta = createMetadata( name, description, imageHash, undefined, [], 'kodadot.xyz', 'image/png' ) const metaHash = await pinJson(meta, image) preheatFileFromIPFS(metaHash) const hash = unSanitizeIpfsUrl(metaHash) const { accountId } = useAuth() const res = await doWaifu(accountId.value, hash, image)
I'm not sure about the minting process. Should the user select one of the 10 images and then post it? I thought nft was distributed to users randomly after minting. π
Those are only possible drops - user cannot influence what nft they get
So I guess we would not need to upload image and generate ipfs hash, at least on the frontend side. User only need to post the api with his/her address. What do you think? @vikiival
I guess we would not need to upload image and generate ipfs has
yes, it would be pre generated by api
User only need to post the api with his/her address. What do you think?
exactly! :)
You still need to generate metadata
Fixed
cc @exezbcz @yangwao
So people can see which one they will claim
Those are only possible drops - user cannot influence what nft they get
So selection is random?
BECAUSE THESE TWO STATEMENTS contradict each other
ready for review?
@Jarsen136 is it possible to make that mobile-friendly?
ready for review?
Yes, but I guess it needs some deeper refactoring in the future.
@Jarsen136 is it possible to make that mobile-friendly?
yes, it could be solved in another issue.
where to test? what is the expected behavior?
So people can see which one they will claim Those are only possible drops - user cannot influence what nft they get
So selection is random?
User supposed to select from 10 pregenerated waifus
The biggest one is selected
user selects from available mints for that hour/window
one random out of ten is selected
yes, it could be solved in another issue
I would merge it so we can have the mobile version started as we want to demonstrate it from mobile
getting a 500 from server and loader keeps spinning (tested on dot)
Because you can mint only one nft per accout
I can disable it
Probably better error messages? π It should be some 2xx or 4xx code if so?
I can disable it
for testing oke but hope not for production π
https://stackoverflow.com/questions/42013265/remove-unique-constraint-on-a-column-in-sqlite-database
I can't remove it rn without breaking something, please provide random email address (unique each time and it will mint)
Probably better error messages? π It should be some 2xx or 4xx code if so?
Changed it, now it throws 400
Probably better error messages? π It should be some 2xx or 4xx code if so?
Changed it, now it throws 400
Now it would display the message toast when error happens.
So people can see which one they will claim Those are only possible drops - user cannot influence what nft they get
So selection is random?
User supposed to select from 10 pregenerated waifus
The biggest one is selected
user selects from available mints for that hour/window
~one random out of ten is selected~
yeah, sorry for the confusion
can we merge, so someone can start on the mobile version?
refactor could be done afterwards.
can we merge, so someone can start on the mobile version?
refactor could be done afterwards.
at least fix this first before merge? https://github.com/kodadot/nft-gallery/pull/6137#discussion_r1217628384
maybe create separate graphql queries for this page? cc @Jarsen136 @vikiival
at least fix this first before merge? https://github.com/kodadot/nft-gallery/pull/6137#discussion_r1217628384
Yup otherwise it would f*ck the app
can we merge, so someone can start on the mobile version? refactor could be done afterwards.
at least fix this first before merge? #6137 (comment)
maybe create separate graphql queries for this page? cc @Jarsen136 @vikiival
Yes, I will make some quick fix.
I guess it could be merged now.
Code Climate has analyzed commit 1c57f578 and detected 0 issues on this pull request.
View more on Code Climate.
So let's merge
pay 200 usd
π Perfect, Iβve sent the payout π΅ $200 @ 5.27 USD/DOT ~ 37.951 $DOT π§ 16SjUbGKSdjCdWTy3NNT3JxbRVGGqD4mwkHpc6BD9U2Rp29Z π 0xaa97dd891d2705153378d92aa60b9bc0741b456b97ba15112374fd6237099b93
πͺ Letβs grab another issue and get rewarded! πͺ github.com/kodadot/nft-gallery/issues
Thank you for your contribution to the KodaDot - One Stop Shop for Polkadot NFTs.
π __ Let's make a quick check before the contribution.
PR Type
Context
Had issue bounty label?
Copilot Summary
π€ Generated by Copilot at cdbb2fb
This pull request adds a new feature to display unlockable collections on the NFT gallery. It introduces several new components, such as
CollectionBanner.vue
,CollectionInfo.vue
,CountdownTimer.vue
, andHeroButtons.vue
, that show various aspects of a collection, such as its banner image, description, mint phase, and social media links. It also adds a new layoutunlockable-mint-layout.vue
and a new pageunlockable-collection.vue
that use these components and set the SEO meta tags and canonical link for the page. The changes use GraphQL, Nuxt2Meta, KeenSlider, Brick, and other libraries to implement the functionality and design of the feature.π€ Generated by Copilot at cdbb2fb