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

Massmint: Make It Mint #5882

Merged
merged 79 commits into from
Jun 8, 2023
Merged

Massmint: Make It Mint #5882

merged 79 commits into from
Jun 8, 2023

Conversation

daiagi
Copy link
Contributor

@daiagi daiagi commented May 8, 2023

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

  • Bugfix
  • Feature
  • Refactoring

Context

Before submitting pull request, please make sure:

  • My contribution builds clean without any errors or warnings
  • I've merged recent default branch -- main and I've no conflicts
  • I've tried to respect high code quality standards
  • I've didn't break any original functionality

Optional

  • I've tested it at </ksm/collection>
  • I've tested PR on mobile
  • I've written unit tests 🧪
  • I've found edge cases

Had issue bounty label?

  • Fill up your KSM address: Payout

Community participation

Screenshot 📸

  • My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at cdabb9d

The pull request adds and refactors code for the mass mint feature, which allows the user to mint multiple NFTs from compressed media files. It introduces new components for the user interface, such as dropdowns, modals and a sidebar. It also updates the types and functions for the minting logic and the metadata construction. It modifies some existing components and files to support the new feature and improve the code quality.

🤖 Generated by Copilot at cdabb9d

We are the masters of the mint
We unleash the NFTs from the zip
We edit, delete and review
We choose the collection and the price

@daiagi daiagi requested a review from a team as a code owner May 8, 2023 13:06
@daiagi daiagi requested review from preschian and Jarsen136 and removed request for a team May 8, 2023 13:06
@kodabot
Copy link
Collaborator

kodabot commented May 8, 2023

WARNING @daiagi PR for issue #5863 which isn't assigned to you. Please be warned that this PR may get rejected if there's another assignee for issue #5863

@netlify
Copy link

netlify bot commented May 8, 2023

Deploy Preview for koda-canary ready!

Name Link
🔨 Latest commit d46e176
🔍 Latest deploy log https://app.netlify.com/sites/koda-canary/deploys/6481cb6f3170790008b1831d
😎 Deploy Preview https://deploy-preview-5882--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 settings.

@daiagi daiagi marked this pull request as draft May 8, 2023 13:06
@reviewpad reviewpad bot added the large Pull request is large label May 8, 2023
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
composables/transaction/mintToken/transactionMintRmrk.ts Outdated Show resolved Hide resolved
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
composables/transaction/mintToken/transactionMintRmrk.ts Outdated Show resolved Hide resolved
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
components/massmint/useMassMint.ts Outdated Show resolved Hide resolved
@@ -38,6 +37,26 @@ export const validFormats = [
'mp3',
'json',
]
export const mimeTypes: { [key: string]: string } = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

libs/static/src/mimeTypes.ts Show resolved Hide resolved
}
}

export const getListForSellItems = (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function getListForSellItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.

@@ -83,3 +96,60 @@ export const useCollectionForMint = () => {
collectionsEntites,
}
}

export const useMassMint = (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function useMassMint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.

@@ -83,3 +96,60 @@ export const useCollectionForMint = () => {
collectionsEntites,
}
}

export const useMassMint = (
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function useMassMint has 44 lines of code (exceeds 25 allowed). Consider refactoring.

return collectionUpdated
}

export const listForSell = (mintedNFts: TokenToList[]) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function listForSell has 28 lines of code (exceeds 25 allowed). Consider refactoring.

@daiagi
Copy link
Contributor Author

daiagi commented May 30, 2023

Large PR, big changes

yes indeed very large PR, too large

@prury
Copy link
Member

prury commented May 31, 2023

Added support for statemine/statmint was not able to teleport KSM into statmine(polkadot ui support for teleport is down at the moment) => could not test https://support.polkadot.network/support/solutions/articles/65000181119-how-to-teleport-dot-or-ksm-between-statemint-or-statemine

i was able to transport some ksm using the Talisman webapp, too bad DOT teleport isn't working there

@daiagi if i don't have a Statemine collection, will i be able to create one using this deployed version(using the massmint menu)?

@daiagi
Copy link
Contributor Author

daiagi commented May 31, 2023

@prury that's an issue as statemine create page is not implements yet
and i think it is out of the scope of this PR to create it (too big as it is)

}
}

export const kusamaMintAndList = (tokens) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function kusamaMintAndList has 50 lines of code (exceeds 25 allowed). Consider refactoring.

@prury
Copy link
Member

prury commented May 31, 2023

@prury that's an issue as statemine create page is not implements yet and i think it is out of the scope of this PR to create it (too big as it is)

Got it, its huge indeed, so, did some additional tests today and massminted NFTs on both RMRK2 and BSX, it went perfectly well, no console errors, some had price some others not, working fine on those two networks plus SNEK.

BSX, without listing:
https://basilisk.subscan.io/extrinsic/3477305-2

RMRK2, listing(not cheap tho):
https://kusama.subscan.io/extrinsic/18157435-5
https://kusama.subscan.io/extrinsic/18157429-3

@prury prury added the S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked label May 31, 2023
@Jarsen136
Copy link
Contributor

Please solve some conflicting code. @daiagi

@daiagi
Copy link
Contributor Author

daiagi commented Jun 6, 2023

Please solve some conflicting code. @daiagi

done

@vikiival vikiival enabled auto-merge (squash) June 8, 2023 12:37
@codeclimate
Copy link

codeclimate bot commented Jun 8, 2023

Code Climate has analyzed commit d46e176 and detected 25 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 13
Duplication 12

View more on Code Climate.

@vikiival vikiival disabled auto-merge June 8, 2023 15:30
@vikiival vikiival merged commit fc32042 into main Jun 8, 2023
17 of 19 checks passed
@vikiival vikiival deleted the massmint/make-it-mint branch June 8, 2023 15:30
@yangwao
Copy link
Member

yangwao commented Jun 8, 2023

pay 100 usd

@daiagi
Copy link
Contributor Author

daiagi commented Jun 9, 2023

pay 100 usd

@yangwao
bot didn't fire

@yangwao
Copy link
Member

yangwao commented Aug 4, 2023

pay 150 usd

@yangwao
Copy link
Member

yangwao commented Aug 4, 2023

😍 Perfect, I’ve sent the payout
💵 $150 @ 5.02 USD/DOT ~ 29.88 $DOT
🧗 1cAsKZYNRb8dkSCpn4eVkEn6ycNZTGoDo5dGDgB8J1UUWK8
🔗 0xed8af863ea4415cf7ae593a0f85a29a6047bcf4a7584eb2ca226e605c6daa1d1

🪅 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 Aug 4, 2023
@daiagi daiagi mentioned this pull request Aug 23, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large paid pull-request has been paid S-works-for-me-✅ qa-guild has tested PR from end user perspective and functionality worked waiting-for-review
Projects
None yet
8 participants