Koda - Generative Art Marketplace
Artist InterviewsMarketplaceSwag ShopChat
  • About Us
    • Koda - Generative Art Marketplace
    • 👅Why KodaDot?
    • 🧑‍🔬Alpha Products
      • 💲Pay per contribution model
      • 🛍️Web3 merchandise shop
      • 🪢KodaDot API - Uniquery
      • 🎟️NFT ticketing system
      • 📀Phygitals
    • 🤔Who are we?
      • ✨Getting Started with KodaDot
      • ⭐Beginning of Story
      • 🏆Achievements
    • 🗝️Why are NFTs valuable?
  • Information
    • 🪙Fees
    • 🌀Existential Deposit
    • 🦒Migrator
  • GENERATIVE
    • 🎲Generative Art
    • ✅Code Checker
    • 🩵Preparation for the Drop
    • 🔮Generative Drops
      • 🎉Drop Party
    • 🖼️Farcaster Frames
  • Tutorials
    • 🌟How to launch a successful collection
    • ✨Before you start
    • 👛Wallet
      • 1️⃣Create your wallet
      • 2️⃣Connect your wallet
      • 3️⃣Add Funds to your wallet
    • ⛏️Minting
    • 💵Buying
      • 🐦Buying NFTs on Kusama
    • 🧑‍🦰Profiles
    • 🔆Asset Hub
      • ➡️Moving your funds TO Asset Hub
      • ⬅️Moving your funds OUT of Asset Hub
    • ↔️Transfers
    • ↔️Teleport
      • 🟢Auto Teleport
      • 🔵Teleport (Bridge)
    • 🔥Burning
    • Swap NFT for NFT
  • Fandom Toolbox
    • 👥Audience Growth
      • 🖌️Custom collection landing
      • 💬Collection owners chat
      • 🔓Unlockables
      • 🎨Upcoming Fandom Toolbox
      • 🩸Custom Drop Page Campaigns
    • 🖼️Drop Page
    • 👕Merchandise Shop
  • Ecosystem
    • 🗓️KodaDot events
    • 🖼️KodaDot Exhibitions
    • ❓FAQ
  • Be part of KodaDot!
    • 👨‍💻Join as a Developer
      • Why Should You Contribute?
      • Contributing as a Developer
      • Contibute as a helper!
      • Hiring
    • 🎆KodaDot's Programs
      • Ambassador Program
      • Artist Ambassador Program
      • Artist Referral Program
      • Conference Ambassador
    • 👕Contribute to our Merchshop
    • 🎨Contributing as an artist
  • nft-standard
    • EVM
      • ERC721
      • ERC1155
      • ERC6551
    • Kusama Network
      • RMRK1.0
      • RMRK2.0
    • Pallet-level
      • NFT Pallet on Asset Hub
      • Uniques V2 (Next generation NFTs)
      • Basilisk NFT Pallet
    • Smart Contracts
      • Ink! NFTs
      • GNFT (ERC-721)
      • Dynamic NFTs
  • Legal
    • Rights
Powered by GitBook
LogoLogo

Connect with us

  • Farcaster
  • Twitter
  • Telegram

Publications

  • Medium
  • Weekly Roundup
  • Press Kit

Feel Free Fork Us @ 2023

On this page
  • Getting Started
  • Prerequisites
  • Installation
  • Using KodaDot on Kusama
  • Installation
  • Running local Polkadot and Subquery nodes
  • Checking your code
  • Linting code
  • Generating changelog
  • Troubleshooting
  • How can I read some data from GraphQL?
  • How can I read on-chain data from the RPC node?
  • Is it possible to subscribe to the on-chain data from the RPC node?
  • How can I make an on-chain transaction?
  • How can I test Kodadot without spending KSM?
  • Notice for contributors before January 15, 2022
  • Contributing Guidelines
  • Failure to do so can lead to your PR being rejected
  • Meta-Hours
  • References

Was this helpful?

Export as PDF
  1. Be part of KodaDot!
  2. Join as a Developer

Contributing as a Developer

PreviousWhy Should You Contribute?NextContibute as a helper!

Last updated 2 years ago

Was this helpful?

Getting Started

We are using a pnpm workspace, installing things via npm will result in broken dependencies.

Prerequisites

You're using a version of node that's on/after version 16.13.2

  • Install node by visiting

You have pnpm installed.

  • You can install pnpm by running in your terminal

npm install -g pnpm

Installation

  1. Fork our

  2. Go to the forked repo and click the green "Code" button

  3. Copy the HTTPS link (i.e https://github.com/your-username/nft-gallery.git)

  4. Go to your IDE and open the terminal

  5. Type in the terminal "git clone your-HTTPS-link".

For example,

git clone https://github.com/your-username/nft-gallery.git
  1. Then paste these two commands in the terminal

cd nft-gallery;
pnpm i;

If you come across ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version), run

nvm use 16
  1. Lastly, start the server by running

pnpm dev

Using KodaDot on Kusama

Installation

  1. Build the docker image

    docker-compose up --build
  2. Check if the container is up:

    docker ps
  3. Run:

    docker-compose up

KodaDot supports Hot Module Replacement on Docker; any changes made will take effect immediately.

Running local Polkadot and Subquery nodes

Current Indexers, we have/use:

  • SubSquid

  • SubQuery

Checking your code

Linting code

Show all problems

yarn lint

Show only errors

yarn lint --quiet

Fix errors

yarn lint --fix

Generating changelog

To generate a changelog, use GitHub CLI List only merged

If you need a limit, use -L

gh pr list -s merged --json mergedAt,baseRefName,number,title,headRefName -B main -L 37 | jq -r '.[] | .number, .title' | sed '/^[0-9]/{N; s/\n/ /;}'

Troubleshooting

How can I resolve conflict on yarn.lock?

CONFLICT (content): Merge conflict in yarn.lock

When you see conflict on yarn.lock and you are on your pull-request branch, merge the upstream branch and run yarn, unless you have a conflict on package.json, which requires manual resolution.

git fetch --all 
git merge origin/main
yarn

How can I read some data from GraphQL?

Every .graphql file is located in the src/queries/.

query nftByIdMinimal($id: String!) {
  nFTEntity(id: $id) {
    id
    currentOwner
    price
  }
}

To use it inside the .vue file, we can import it like a regular module: For specific purposes, we also need to import the PrefixMixin. Thanks to that app, know which indexer is using.

PrefixMixin is only applicable to the SubQuery indexers. To use SubSquid, please use client: 'subsquid' in the query call.

Then we can use it like this:

<script lang="ts">
  import { Component, mixins } from "nuxt-property-decorator"

  import nftByIdMinimal from "@/queries/nftByIdMinimal.graphql"
  import PrefixMixin from "~/utils/mixins/prefixMixin"

  @Component({})
  export default class GalleryItem extends mixins(PrefixMixin) {
    id: string = ""
    nft: NFT = emptyObject<NFT>()

    async fetch() {
      const { data } = await this.$apollo.query({
        client: this.urlPrefix,
        query: nftByIdMinimal,
        variables: { id: this.id },
      })

      this.nft = data.nFTEntity
      console.log("nft", this.nft)
    }
  }
</script>

How can I read on-chain data from the RPC node?

<script lang="ts">
  import { Component, Vue } from "nuxt-property-decorator"
  import Connector from "@kodadot1/sub-api"

  @Component({})
  export default class GalleryItem extends Vue {
    id = "0"
    collectionId = "0"

    async fetch() {
      const { api } = Connector.getInstance()
      const nft = await api.query.uniques.asset(this.collectionId, this.id)
      console.log("nft", nft)
    }
  }
</script>

Is it possible to subscribe to the on-chain data from the RPC node?

<script lang="ts">
  import { Component, mixins } from "nuxt-property-decorator"
  import SubscribeMixin from "@/utils/mixins/subscribeMixin"

  @Component({})
  export default class GalleryItem extends mixins(SubscribeMixin) {
    id = "0"
    collectionId = "0"

    async created() {
      this.subscribe(
        api.query.uniques.asset,
        [this.collectionId, this.id],
        (nft: any) => console.log(nft) // callback which returns the data
      )
    }
  }
</script>

How can I make an on-chain transaction?

<script lang="ts">
  import { Component, mixins } from "nuxt-property-decorator"
  import MetaTransactionMixin from "@/utils/mixins/metaMixin"
  // import AuthMixin from '~/utils/mixins/authMixin' // get currently logged in account

  import Connector from "@kodadot1/sub-api"

  @Component({})
  export default class GalleryItem extends mixins(MetaTransactionMixin) {
    async submit() {
      const cb = api.tx.system.remark
      const args = "Hello World"

      await this.howAboutToExecute(
        this.accountId, // sender can be obtained from the AuthMixin
        cb,
        [args],
        (blockNumber) =>
          console.log(`Remark ${args} saved in block ${blockNumber}`)
      )
    }
  }
</script>

How can I test Kodadot without spending KSM?

Notice for contributors before January 15, 2022

If you've forked nft-gallery before January 15, 2022, you have an older fork that doesn't include our newest additions.

There are two ways you can work around this:

Learn more about these issues here:

Contributing Guidelines

Failure to do so can lead to your PR being rejected

Meta-Hours

References

KodaDot will be available at .

If you want to try out our KodaDot on Kusama, you must have Docker () and docker-compose () installed to have a local setup and node.

KodaDot will be available at .

To run the complete local environment, we recommend running a . In case you are using Apple M1, we have a

RMRK:

RMRK:

Statemine (Unique NFT pallet):

You can change the network in the navbar. Currently supported networks are Kusama, Westend, statemine, westmint. Do you want to add more networks?

Before submitting your pull request, read up on our and make sure it follows:

We our contributors in $KSM for their time and effort with every issue they solve. If you're finding yourself to be more involved with KodaDot, we are always .

We have bi-weekly meetings with contributors of KodaDot to share each other's progress as well as future goals in our . Before speaking, please make sure you're prepared as a .

Is this your first time joining? Feel free to catch up on our !

This is the original posting from our bi-weekly digests on progress and development

👨‍💻
https://nodejs.org/en/download/
Repository
localhost:9090
install here
install here
localhost:9090
Polkadot/Kusama node
tutorial for that 🍏
rubick
magick
unique
You can obtain some Westend (WND)
Open a PR on vuex-options
Re-forking
Syncing your fork
Issue 1845
Issue 1844
documentation
Code of Conduct
Contribution Guidelines
Style Guide
reward
hiring
Discord server
speaker
past Meta_Hour
Meta_Hours 2
Github Repository KodaDot/NFT-gallery