<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Viki Val on Medium]]></title>
        <description><![CDATA[Stories by Viki Val on Medium]]></description>
        <link>https://medium.com/@vikiival?source=rss-c0563bcb89d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_jBpeLfA1G0B1h5-Y4Kyyg.jpeg</url>
            <title>Stories by Viki Val on Medium</title>
            <link>https://medium.com/@vikiival?source=rss-c0563bcb89d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:25:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vikiival/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Farewell of KodaDot]]></title>
            <link>https://blog.kodadot.xyz/the-farewell-of-kodadot-f66b45c448ff?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f66b45c448ff</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Sun, 17 Aug 2025 09:39:43 GMT</pubDate>
            <atom:updated>2025-08-26T12:11:23.146Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Farewell of KodaDot: winding down</h3><p>There is a saying that you will always be proud of the creations you have made with your hands, but no one will prepare you for the fact that you will need to close a chapter of something extraordinary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ACux50k575meBUWbkO6RTQ.png" /></figure><p>After deep reflection and many conversations with our investors, contributors, and partners, I’m announcing that we are<strong> beginning an orderly wind-down of KodaDot</strong>.</p><p>After years of pioneering in the NFT space on the Polkadot and Kusama ecosystems, we’ve reached a consensus to close this chapter gracefully. This was a tough decision, and with <a href="https://medium.com/u/15bb61921cf3">Matej</a>, <strong>we have been exploring various paths to make KodaDot a successful project</strong>. However, the numbers that we needed weren’t reached, and the budget was getting tighter. Therefore, we have decided that it is the right time to wind down our operations and gradually close the project. <strong>Our services will remain operational until October 31, 2025</strong>. After that, we will archive repositories and stop accepting pull requests on our <a href="http://github.com/kodadot">GitHub</a>.</p><h3>What was KodaDot?</h3><p>KodaDot began as a passion project in the early days of the Polkadot ecosystem, inspired by the need for a more inclusive NFT platform that would be a fair competitor in the existing market. Launched on Kusama in 2021, we positioned ourselves as an open-source, creator-first NFT platform, leveraging the highly effective Substrate-based chains. From day one, we committed to building a marketplace that prioritized creativity without technical complexities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5NCjBRY_D66ZZEvmSmZSpQ.jpeg" /></figure><p><strong>Over the years, with our technical expertise, we have successfully implemented nine different NFT standards across six blockchain networks</strong>, <a href="https://hello.kodadot.xyz/">making Kodadot</a> one of the most comprehensive NFT platforms in existence. Alongside, we have onboarded more than 130 contributors and distributed almost half a million dollars in the on-chain bounties. All these metrics skyrocketed us into being the most successful dApp in the Polkadot and Kusama ecosystem.</p><p>On top of that, we have won countless hackathons, where we incubated many amazing ideas and then started various pivots. For the last 2 years, we have been primarily focused on generative art and brought 100+ talented artists into the Polkadot Ecosystem (thanks <a href="https://medium.com/u/7f41e2685626">Just_Luuuu</a>).</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/LikeMurvin/status/1780968246373474368&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/4198232c0c308338270a8dc3444ca947/href">https://medium.com/media/4198232c0c308338270a8dc3444ca947/href</a></iframe><p>To expand our surface of success, we have grown our operations on Farcaster, and therefore we have implemented a very lean EVM version that was running on top of the Base.</p><p>What’s more, through initiatives like <strong>physical NFT galleries</strong> and educational outreach programs, KodaDot has successfully bridged digital and physical art worlds, organizing 10+ exhibitions in locations from Bangkok to Berlin. These initiatives have promoted digital art, and many people are proudly wearing our unique anime waifus on their chests.</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//x.com/Just_Luuuu/status/1570699465224499205&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e95bfbb1da796d93eda386a697f8d1f/href">https://medium.com/media/5e95bfbb1da796d93eda386a697f8d1f/href</a></iframe><h3>Famous last words</h3><p>KodaDot’s legacy extends far beyond being a successful NFT marketplace; the platform has established new standards for <strong>open-source collaboration, technical innovation, and community building</strong> in Web3. Our unique approach brought many talented people into the ecosystem, and we are happy to see them having a positive impact in the blockchain ecosystem.</p><p>Through its journey from a Vue.js component library to the premier NFT marketplace on Polkadot, KodaDot has demonstrated that <strong>technical excellence, community focus, and care for creators</strong> can create lasting remark (pun intended) in the blockspace. Whether KodaDot helped you publish your first piece, discover a new artist, or learn how on-chain art works, then the project did its job.</p><p>Thank you for being part of this chapter. We’re proud of what we built and even prouder of the community that formed around it. I would like to explicitly say thank you to: <br>- <a href="https://medium.com/u/7f41e2685626">Just_Luuuu</a> for bringing the best-in-class artists to the ecosystem,<br>- <a href="https://medium.com/u/70b079ee41e3">damsky</a> for managing ops, marketing, and organizing events with a lasting impact, <br>- Exez for destilling hard technical features into easy-to-use UIs,<br>- <a href="https://github.com/hassnian">Hassnian</a>, <a href="https://github.com/preschian">Preschian</a>, and <a href="https://github.com/Jarsen136">Jarsen</a> for translating the complex specification into functional code with pixel-perfect accuracy.<br><strong>And most importantly, I would like to say thank you to </strong><a href="https://medium.com/u/15bb61921cf3"><strong>Matej</strong></a><strong>, who gave it a shot with me and tried his best to make all the ideas into reality.</strong></p><p>With gratitude,<br>Viki Val<br>Co-founder of KodaDot</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f66b45c448ff" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/the-farewell-of-kodadot-f66b45c448ff">The Farewell of KodaDot</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The tech stack behind KodaDot]]></title>
            <link>https://blog.kodadot.xyz/the-tech-stack-behind-kodadot-f8c694756a0f?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f8c694756a0f</guid>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[kusama]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[kodadot]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Mon, 10 Jul 2023 09:21:25 GMT</pubDate>
            <atom:updated>2023-07-10T09:21:25.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-1KMS_25Sz3xURLNW7-_xw.png" /></figure><p>Building visually compelling and functional websites is a heavy task.<br>Especially if we are<strong> building a decentralized </strong><a href="https://kodadot.xyz/"><strong>NFT marketplace </strong></a><strong>in the Polkadot ecosystem.</strong></p><p>Let’s enter the realm of technological brilliance and prepare to be dazzled by the transformative power of <a href="https://github.com/kodadot">Kodadot’s tech stack</a>. Behind the scenes of this trailblazing entity lies a symphony of cutting-edge tools and frameworks harmoniously orchestrated to fuel our vision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9inGHb-ychPhJyZFI1Cwxw.png" /></figure><p>Since we have written our first technical article about KodaDot, we added a huge amount of code. To this day, <strong>more than 100 contributors added around 250 000 lines of business logic</strong> to create a synergy between good user interface in the decentralized environment.</p><h4>So what does the KodaDot stack look like?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*eoZhbOKXXXfdk_kYIKxQNg.jpeg" /></figure><p>The heart of our whole stack is the <a href="https://kodadot.xyz/"><strong>NTF Marketplace — Kodadot.xyz.</strong></a></p><p>We are building KodaDot with the latest stack.</p><p>As the frontend framework, we decided to use <a href="https://medium.com/u/9b930cf6db26">Vue.js</a> + <a href="https://medium.com/u/20f059d252cc">Nuxt.js</a>. We love their tech and have <strong>the same alignment to the open-source code</strong>. But how can KodaDot look so good? The secret spice lies in our custom CSS framework that we call Brick. Brick is based on the <a href="https://oruga.io/">Oruga</a> Library by <br><a href="https://github.com/jtommy">Walter Tommasi</a> (he previously wrote <a href="https://buefy.org/">Buefy</a>). <strong>Thanks to the Oruga, we can write custom and reusable components pretty fast, with a guarantee of future migration to Vue3</strong>.<br>To get data from our storage, we leverage <a href="https://medium.com/u/9360eb7d79eb">Apollo</a> <a href="https://graphql.org/">GraphQL</a>. Apart from standard <a href="https://www.redhat.com/en/topics/api/what-is-a-rest-api">REST API</a>, <a href="https://graphql.org/"><strong>GraphQL</strong></a><strong> allows us to fetch the data we need without over-fetching.</strong> Therefore, client devices have less data to process.</p><p>As we can see in the image below, getting the data for a particular NFT is pretty simple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*dJS8dBUloFQw9OlusfWksQ.png" /></figure><p>However, it is said in the Web3 ecosystem: Don’t trust, verify; as the other data source, we use RPC Nodes provided by <a href="https://medium.com/u/433b0bc6fa9e">Parity Technologies</a> and others. <strong>Therefore we can guarantee that unless NFT is not burned, we can retrieve its data</strong>. To perform this kind of reading, we use the PolkadotJS library, which allows us to manage accounts, subscribe for new data, and make NFT (transactions) changes.</p><h4>What’s the source of data for KodaDot?</h4><p>That is a very good and valid question. For that, we decided to partner with <a href="https://medium.com/u/989be7cdf6b8">Subsquid</a>. <strong>Their indexing services offer top-notch quality, and super-fast technology, making them a crucial part of our infrastructure</strong>.</p><p>What makes KodaDot’s indexers special is our finely-crafted GraphQL schema. While studying chain data from various chain types, we found an overlap between the NFT data. <strong>Our Universal Schema is a unified data structure that guarantees that around 80% of the data looks similar</strong>. What does that mean? The same event types are available on the EVM if we fetch events for the particular NFT from the Substrate chain.</p><p>Thanks to this not-trivial and extensive hacking on the indexer, <strong>our UI works “magically” out of the box</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*Py7BfOFKEenjiOkKIyOUfA.png" /></figure><p>At the point of writing, <strong>we support 7 various NFT standards across 9 parachains</strong>. As this number rises, it would be hard for us and other contributors to integrate new parachains. Therefore we decided to use our state-of-the-art API. <a href="https://github.com/kodadot/uniquery"><strong>Uniquery</strong></a><strong> is a client-first and chain-agnostic GraphQL builder and fetcher</strong>. In simpler words, <strong>instead of building queries by yourself, Uniquery offers easy-to-understand functions</strong>. You can fetch any data from the Universal Schema in a few lines of code. <br>How can Uniquery <strong>help us to get </strong><a href="https://kodadot.xyz/stmn/gallery/32%E2%80%931"><strong>NFTs from Polkadot Decoded 2023</strong></a>?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zZWdKHcvC85PrGqEZ3ttgg.png" /></figure><p>The image above demonstrates the simple yet powerful way how to do that.<br>First, we need to import getClient from the <a href="https://github.com/kodadot/uniquery">@kodadot/uniquery</a> package. Secondly, we need to call getClient with the parameter stmn. This tells Uniquery that we would like to use a client.fetch method that should obtain data from the Kodadot AssetHub indexer (street name stick). Since we want to list NFTs from a particular collection, API offers a straightforward function: client.itemListByCollectionId . Now the last thing to do is call the query via the client.fetch, and we have the result! itemListByCollectionId is not the only function that is available in Uniquery. Currently, <strong>we support more than 20 calls</strong>, and along with chain support, we are adding new calls that could better fit the use-case of other projects in the Polkadot ecosystem. <strong>Uniquery powers the NFT section in </strong><a href="https://sub.id/"><strong>Sub.id</strong></a><strong>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*4W5pu0KLKcORb6bFIFtIhg.png" /></figure><h4>Can we have fast JPEGs, please?</h4><p>To maintain a longer durability for the NFTs metadata, <strong>it is necessary to save the content into decentralized storage like IPFS or Arweave instead of centralized servers</strong> (like many OpenSea drops did). <strong>Any decentralized storage, however, has two weak points: slow retrieval time and often huge content</strong>. Many times in the past, we experienced that for some NFT, we waited for the content for almost one minute! To mitigate this, we wrote a server-less service. When we make a request to get content from IPFS via our Image service, it has 4 steps to get content for the user, as we can see in the image below:</p><p>1. Check CDN cache — if someone from our location checked the NFT before us, we get the content instantly</p><p>2. File Storage- when the content is unavailable in our location but someone in this universe has seen it, we check inside file storage via IPFS hash. If the content is present, we return it and save it to the cache</p><p>3. IPFS Gateway — the worst case that can happen is that no one has checked the content so far, and therefore, we need to obtain it via IPFS gateways. For that task, there are many available providers. So we swap between them to get the fastest response possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*_2MjRO8YRF-4ZGXLyASlOg.png" /><figcaption>Stack of image worker, powering KodaDot</figcaption></figure><p>But there is also Image storage mentioned. What’s that? As we said before, the second problem of IPFS is serving huge content. <strong>We recently made an airdrop in collaboration with </strong><a href="https://medium.com/u/2003838c78e6"><strong>GraviDAO</strong></a>. The original size of each NFT is around 34 MB, so just the screenshot below would eat about 1GB of bandwidth. With current 5G and future 6G, it is not much, but for an image with a rendered resolution of less than 300x300 pixels is a huge waste of packets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CnTimWrtktC2Bqb76m6Ybg.png" /><figcaption>TokuNFT drop on KodaDot</figcaption></figure><p>Image storage optimizes the size but tries to maintain the compressed image quality<strong> thanks to next-generation formats like WebP or Netflix’s AVIF. The final image ranges from 50 to 70 kB, 99% smaller than the original.</strong></p><h4>Read, Own, but how to write?</h4><p>As we have learned how KodaDot effectively manages the NFTs across many chains, we somehow need a way to get content to the chain. Luckily our team of engineers crafted a super effective package to offload this business logic outside<a href="https://github.com/kodadot/nft-gallery"> the main nft-gallery repository</a>.</p><p>To make any transaction to the blockchain, we have to be connected to the RPC node. However, maintaining 9+ connections in the app would be overkill for any device. Therefore we came up with a smart wrapper around @polkadot/api that we call sub-api . We designed the wrapper to be lightweight and allow on-demand connections. In reality, it means that we connect to the node only when a client requires on-chain data — such as fallback to NFT Data or obtaining identity for the artists. After some time, when the connection is unused, we end the communication. Goodbye RPC. Additionally, sub-api is protected by the prefix node naming, so it cannot happen that the app suddenly transfers tokens to Polkadot AssetHub instead of Kusama AssetHub. <br>As mentioned in the previous section, we use path prefixes for anything in most stuff in KodaDot. What does the prefix look like? If we watch closely the URL in Kodadot, it would probably be similar to this: https://kodadot.xyz/<strong>stmn</strong>/gallery/32–1 . The first thing you see on the path is <strong>stmn</strong>, which tells us that the content you seek is on the Statemine chain (Kusama AssetHub). Therefore, we will retrieve content via Uniquery and pass this prefix as the parameter. Moreover, if we would fall back to the RPC node, we should connect the client to the Statemine and not to the Basilisk.</p><p><a href="https://kodadot.xyz/stmn/gallery/32-1">Shanghai Waifu | One Stop Shop for Polkadot NFTs</a></p><p>The same approach works for transactions; if we plan to list the NFT, we have a smart <a href="https://medium.com/u/9b930cf6db26">Vue.js</a> composable transaction that, on LIST action will check the chain, constructs the proper RPC request, and asks us for a signature.</p><h4>TL;DR</h4><p>As it may seem as just a few RPC calls — KodaDot consists of more than a quarter million lines of code. The product’s heart is the NFT Gallery, which heavily utilizes Nuxt, GraphQL, and PolkadotJS to bring fast and reliable performance to the end users. Moreover, we wrote an easy-to-use API — Uniquery, so developers do not need to touch GraphQL. Outside management of delivering off-chain content is on the shoulders of <a href="https://medium.com/u/a00e599743a7">Cloudflare</a> and their global network of workers (we use Rust ❤).</p><p>For managing RPC connections, content from IPFS, and a ton of NFT-related utilities, we wrote typescript packages ready to use for anyone.</p><p>For the freshness and correctness of data, we use @Subsquid, that bakes always has special features for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*okmlL1TW8mu0jEB5ZU-j6A.png" /><figcaption>Overall stack of KodaDot</figcaption></figure><p><strong>Do you want to join the effort and build the NFT gallery with us?</strong> <a href="https://github.com/kodadot/nft-gallery/issues">Head over to the Github issues where you can find the bounties</a>. We also have a lot of no-code issues, so make sure you don’t miss them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*GwfFwRMjTB00_IDI.png" /><figcaption>Bounties are tagged with a dollar sign</figcaption></figure><p>We’re excited to support your journey in creating all sorts of integrations with <a href="https://kodadot.xyz/"><strong>KodaDot</strong></a>, a leading <strong>Polkadot NFT marketplace</strong>. From building command line interfaces 🖥️, chatbots 🤖, or alternative UIs, let your imagination run wild!</p><p>To learn how to do so and which tools you can use,<strong> </strong><a href="https://developers.kodadot.xyz/"><strong>we’ve prepared comprehensive developer documentation</strong></a>, your go-to guide for crafting NFT functionality on Polkadot faster 🚀.</p><p>Support us by <a href="https://github.com/kodadot/nft-gallery/"><strong>giving us a star on our KodaDot repository</strong></a>! 🌟 Your support fuels us to keep providing top-notch experiences.</p><p>Thank you for reading this article!</p><p>For more information about <a href="https://kodadot.xyz/">KodaDot</a>, a leading<strong> Polkadot NFT marketplace</strong>, follow us on <a href="https://twitter.com/KodaDot">Twitter</a> 🐦, or join our exciting community on <a href="https://t.me/kodadot_eco">Telegram</a> 💬.</p><p>Don’t forget to visit our <a href="https://kodadot.xyz/">website</a>. We look forward to seeing you on our platform! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8c694756a0f" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/the-tech-stack-behind-kodadot-f8c694756a0f">The tech stack behind KodaDot</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explore multi-chain NFTs with KodaDot]]></title>
            <link>https://blog.kodadot.xyz/explore-multi-chain-nfts-with-kodadot-1fc0c9a50c26?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1fc0c9a50c26</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[kusama]]></category>
            <category><![CDATA[kodadot]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[graphql]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Mon, 29 May 2023 09:31:54 GMT</pubDate>
            <atom:updated>2023-06-23T11:56:01.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IiOCzLydE2agQtC1_ywTxw.png" /></figure><p>In the context of non-fungible tokens, the <a href="https://medium.com/u/3e5a7d431699">Polkadot</a> ecosystem is special. Each parachain has its own implementation and uses a different approach.<br>But the ecosystem grows only when other builders make awesome apps on top of it. We took it as a challenge in <a href="https://kodadot.xyz/"><strong>KodaDot to create a one-stop shop API for the multi-chain NFTs</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fmg9nnntBNLRGHt5P1tp-A.png" /><figcaption>Fetching data with Uniquery is super easy 💜</figcaption></figure><p><strong>The heart of KodaDot’s data storage is </strong><a href="https://medium.com/u/989be7cdf6b8"><strong>Subsquid</strong></a><strong>, the fastest blockchain indexer for Substrate and EVM</strong>, which offers <a href="https://graphql.org/">GraphQL API</a> for the data.</p><p>Since a lot of work is based on external contributors and bounty systems, we found using GraphQL very difficult for many developers.</p><h3>Let’s meet Uniquery 👋</h3><p><a href="https://github.com/kodadot/uniquery"><strong>Uniquery is a state-of-the-art API for Kusama-based NFTs.</strong></a></p><p>The core features of our API are:</p><p>1. Client first</p><p>3. Simple to use</p><p>2. Extensible and modular</p><p>4. Typesafe</p><p>What does that all mean? We will go through it step-by-step.</p><p>Usually, when some provider offers API, we need a special authorization key. Data are requested via a centralized server that tracks us.</p><p>We took a different approach, and <strong>Uniquery communicates directly to the SubSquid GraphQL endpoint</strong>. The magic under the hood contains a builder that translates a function into the GraphQL query.</p><p>If we, for example, want to fetch NFTs that belong to collection <em>2305670031</em> we would need to write the query below. It does not look hard, but it gives us extra cognitive load if we are unfamiliar with the technology.</p><pre>  query nftListByCollectionId {<br>    nft: nftEntities(where: {<br>      collection: {id_eq: &quot;2305670031&quot;}}<br>  ) {<br>      id<br>      metadata<br>      currentOwner<br>      issuer<br>    }<br>  }</pre><p>Generating the same query for via uniquery contains three lines of code!</p><pre>import { getClient } from &#39;@kodadot1/uniquery&#39;<br><br>const client = getClient()<br>const query = client.itemListByCollectionId(&#39;2305670031&#39;)</pre><p><strong>Uniquery ships as an </strong><a href="https://www.npmjs.com/package/@kodadot1/uniquery"><strong>npm package,</strong></a><strong> written in </strong><a href="https://www.typescriptlang.org/"><strong>Typescript</strong></a>, so a good IDE such as <a href="https://code.visualstudio.com/">VSCode</a> will always give you a good hint about arguments.<br>So first, we need to import getClient from the package.<br>Next, we need to create an instance of the client by calling the function we have imported.<br>Once our client instance is ready, we can explore many handy functions available. In this case, we will use the same procedure to get items from a particular collection.</p><p><strong>The general rule of thumb for what queries are available are:</strong><br><strong>1.</strong> I need to know which entity I want — collection, nft (item), or event (what has happened with an item)<br><strong>2. </strong>Should the query return more than one element? If yes, then its called [entity]List; otherwise, it’s just an entity <br><strong>3.</strong> Do I need to filter by any field? It is then denoted by By[FieldIWantToFilter].<br>Summing up the naming: we want items (more NFTs) that belong to a particular collection: itemListByCollectionId.</p><p>So we finally got the query we wanted. Now how to get the data?<br>Luckily the client contains the function fetch that takes the query as an argument.</p><pre>import { getClient } from &#39;@kodadot1/uniquery&#39;<br><br>const client = getClient(&#39;bsx&#39;)<br>const query = client.itemListByCollectionId(&#39;2305670031&#39;)<br><br>const result = await client.fetch(query)</pre><p>Apart from the previous query, we changed our getClient function to take an argument. The <strong>argument represents a chain that we would like to use to query the data</strong>. <br>When we call the fetch function, we will get the result 🤗.</p><pre>{<br>  data: {<br>    items: [<br>      {<br>        id: &quot;2305670031-1&quot;,<br>        createdAt: &quot;2022-10-09T11:56:36.338000Z&quot;,<br>        name: &quot;Bubble #0&quot;,<br>        metadata: &quot;ipfs://ipfs/bafkreids5pfs2xpgnoaccgd56rgd66jijgb5v5hdahiybmslwwmcpmbgza&quot;,<br>        currentOwner: &quot;bXhUWXbffHMJk2FoTriLixXjQY36RPDkX5Tugy5WYSmafJsGi&quot;,<br>        issuer: &quot;bXhUWXbffHMJk2FoTriLixXjQY36RPDkX5Tugy5WYSmafJsGi&quot;<br>      },<br>      {<br>        id: &quot;2305670031-8&quot;,<br>        createdAt: &quot;2022-10-09T12:14:12.271000Z&quot;,<br>        name: &quot;Bubble #7&quot;,<br>        metadata: &quot;ipfs://ipfs/bafkreiho6blouuiwjc26vjunq5tc3pn7dtmz73p4j7tt6tuzsiqnqrw6zi&quot;,<br>        currentOwner: &quot;bXhUWXbffHMJk2FoTriLixXjQY36RPDkX5Tugy5WYSmafJsGi&quot;,<br>        issuer: &quot;bXhUWXbffHMJk2FoTriLixXjQY36RPDkX5Tugy5WYSmafJsGi&quot;<br>      }<br>    ]<br>  }<br>}</pre><h3>Testing in prod.</h3><p>As we ship this awesome API, we wanted to ensure that API is friendly enough; we <strong>decided to build an NFT viewer from scratch with Uniquery</strong>.</p><p>We took the latest tech: <a href="https://medium.com/u/d62f51ba0a8f">Deno</a> and <a href="https://fresh.deno.dev/">Fresh</a>, to make this more challenging.</p><p>Why not <a href="https://medium.com/u/96cd9a1fb56">Node.js</a>? We always wanted to try the new cutting-edge tech (that’s why we built on top of the <a href="https://medium.com/u/65671da9af01">Kusama Network</a> 😉).</p><p>Fandom shop is available for any parachain supported by KodaDot. For this tutorial we will build a simple fandom shop for a collection minted on the <a href="https://bsx.fi/">Basilisk</a> parachain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7_v4gEJAVtdO_gH5d8GoGg.png" /><figcaption>Fandom shop for NFTs</figcaption></figure><p>For demonstration purposes, we used the collection minted by <a href="https://twitter.com/deepologic">Deepologic</a>. So let’s get started.<br>When we open the index.tsx file, we will see a very strange import of our Uniquery. One of the advantages of the Deno linter is that it forcibly recommends you use the specific version of the package. In this case, we are using the latest one. Which one is the latest? We can always check it on <a href="https://www.npmjs.com/package/@kodadot1/uniquery">npmjs</a>.</p><pre>import { getClient } from &#39;https://esm.sh/@kodadot1/uniquery@0.2.1-rc.0&#39;</pre><p>After we successfully imported our uniquery function, let’s fetch some data. We must <a href="https://fresh.deno.dev/docs/concepts/data-fetching">create and export a constant </a><a href="https://fresh.deno.dev/docs/concepts/data-fetching">handler with a </a><a href="https://fresh.deno.dev/docs/concepts/data-fetching">GET procedure to do this in Fresh</a>. The name of this function is not random; it tells Fresh that if we visit this page, this handler should be called.</p><p>As the snippet below shows, we spawn an instance of our Uniquery client inside the GET function by calling the getClient function.<br>Since we want to fetch all NFTs that belong to a particular collection, we need to call a method called itemListByCollectionId.<br>The first parameter it takes is the id of a collection, we want to use.<br>The second parameter, option, let us customize the query as we wish. We only wanted to fetch fields id, name, price, and meta.<br>The result should be ordered by name ascending (meaning from A to Z).<br>The last thing to obtain our data is to call the fetch method on the client with the query parameter. We are ready to render our data using the built-in Fresh render method.</p><pre>export const handler: Handlers&lt;Data&gt; = {<br>  async GET(_req, ctx) {<br>    const client = getClient(&#39;bsx&#39;)<br>    const query = client.itemListByCollectionId(&#39;2551182625&#39;, {<br>      fields: [&#39;id&#39;, &#39;name&#39;, &#39;price&#39;, &#39;meta&#39;],<br>      orderBy: &#39;name_ASC&#39;<br>    })<br>    const data = await client.fetch&lt;Data&gt;(query);<br>    return ctx.render(data);<br>  },<br>};</pre><p>Now how to render the data? In our Home component, we get data from the context argument. Then we will assign data.items to the products variable. How do we know there is an items attribute? Luckily there is a logical answer to that. Since <strong>we called the method on Uniquery, whose name starts with </strong><strong>itemList it means that the output will be a list of item elements, therefore, </strong><strong>items</strong>. <br>Similarly, it works for also for collections and events.</p><pre>export default function Home(ctx: PageProps&lt;Data&gt;) {<br>  const { data } = ctx;<br>  const products = data.items;<br><br>  return (<br>    &lt;div&gt;<br>      {products.map((item) =&gt; &lt;ProductCard product={item} /&gt;)}<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Once we have the products variable, we can render that by mapping each product into the &lt;ProductCard /&gt; component. product={item} means that we will assign the item variable to the prop product.</p><p>Now the biggest chunk. Render the ProductCard ! As we mentioned previously, the props we obtain in the ProductCard is a product that we will use to render our data. The standard approach in <strong>NFT data is that the image field is in the form of</strong><strong> ipfs://ipfs/&lt;CID&gt;</strong>. Unfortunately, the &lt;image /&gt; tag can’t show this URL. Therefore, we must transform it to a format-friendly image tag. Luckily <strong>KodaDot has a package called </strong><strong>minipfs that can help us with that</strong>. Now we need to wrap the $purify function inside the useComputed . It is a <a href="https://preactjs.com/guide/v10/signals/">cool special syntax</a> for <a href="https://medium.com/u/75a178b86996">Preact</a> similar to computed in <a href="https://medium.com/u/9b930cf6db26">Vue.js</a>. It basically means that the image variable assigns the computed value from this function.</p><blockquote><strong>Why we can’t call purify directly? Because this way, we are avoiding unnecessary re-renders</strong>.</blockquote><p>In the same style, we will format the price using the polkadot-js library that works perfectly in Deno. Because blockchains do not have floating numbers like 1.69, we need to represent a number that denotes balance as a huge number. <strong>In </strong><a href="https://medium.com/u/65671da9af01"><strong>Kusama Network</strong></a><strong>, we have 12 decimals, so 1 KSM is saved in the blockchain as </strong><strong>1000000000000 (1 and 12 zeros after)</strong>. That is why we need to use a formatBalance function, and the arguments you see make perfect sense now ❤.</p><pre>import { useComputed } from &quot;@preact/signals&quot;;<br>import { $purify } from &quot;https://esm.sh/@kodadot1/minipfs@0.2.0-rc.0&quot;;<br>import { formatBalance } from &quot;https://deno.land/x/polkadot@0.2.29/util/mod.ts&quot;;<br><br>function ProductCard(props: { product: Item }) {<br>  const { product } = props;<br>  const image = useComputed(() =&gt; $purify(product.meta?.image).at(0));<br>  const price = useComputed(() =&gt;<br>    formatBalance(product.price, { decimals: 12, withUnit: &quot;KSM&quot; })<br>  );<br><br>  return (<br>    &lt;a key={product.id} href={`/products/${product.id}`}&gt;<br>      &lt;div&gt;<br>        {image &amp;&amp; (<br>          &lt;img<br>            src={image.value}<br>            alt={product.name}<br>          /&gt;<br>        )}<br>      &lt;/div&gt;<br>      &lt;div&gt;<br>        &lt;h3&gt;<br>          {product.name}<br>        &lt;/h3&gt;<br>        &lt;strong&gt;<br>          {price.value}<br>        &lt;/strong&gt;<br>      &lt;/div&gt;<br>    &lt;/a&gt;<br>  );<br>}</pre><p>Now return some HTML from the ProductCard function, and voila! Our code works. It is worth noting that we removed all CSS classes we use for simplicity.</p><h3>Sum Up.</h3><p>It’s time to celebrate! We have successfully created a collection viewer for the NFTs. <strong>Uniquery makes it easy to query important data from the indexer without GraphQL knowledge</strong>. Fresh as a framework is super simple and fast to iterate on simple UI. <br><a href="https://fandom.deno.dev/">You can check the working demo</a>. The code for this project is open-source, and <a href="https://github.com/vikiival/shop">we would be very happy if you check it</a>.<br><strong>Do not forget to </strong><a href="https://twitter.com/kodadot"><strong>follow us on Twitte</strong></a><strong>r and </strong><a href="https://github.com/kodadot/nft-gallery/"><strong>star on our main KodaDot repository.</strong></a></p><h4>What’s next?</h4><p>We want to see a new wild implementation of KodaDot. You can build command line interfaces, chatbots, or alternative UIs. While you are building, <a href="https://kodadot.xyz/"><strong>visit our KodaDot UI</strong></a> to inspire yourself and flip some JPEGs.<br><a href="https://discord.com/invite/PxEyQhW4NK"><strong>Our Discord is the best way to communicate, so see you there!</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1fc0c9a50c26" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/explore-multi-chain-nfts-with-kodadot-1fc0c9a50c26">Explore multi-chain NFTs with KodaDot</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Index your Kusama NFTs]]></title>
            <link>https://blog.kodadot.xyz/index-your-kusama-nfts-b4fab5ae1628?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4fab5ae1628</guid>
            <category><![CDATA[substrate]]></category>
            <category><![CDATA[polkadot-network]]></category>
            <category><![CDATA[kodadot]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[subsquid]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Fri, 13 May 2022 10:53:40 GMT</pubDate>
            <atom:updated>2022-05-13T10:53:40.184Z</atom:updated>
            <content:encoded><![CDATA[<p>As the blockchain is an append-only ledger, we need to save somehow and manage the state to show all the historical interactions of the non-fungible tokens. <strong>Using indexers that can save and process (extrinsic, on-chain events) block by block in a decentralized manner is a huge win for developers and users who benefit from the sleek UX.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zYUq1GeVCQHhunsT" /><figcaption>Photo by <a href="https://unsplash.com/@qwitka?utm_source=medium&amp;utm_medium=referral">Maksym Kaharlytskyi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>This article aims to <strong>explain why we need our </strong><a href="https://medium.com/u/65671da9af01"><strong>Kusama Network</strong></a><strong> indexer for the NFTs</strong>, how it works under the hood, and how we can extend it with new features.</p><h4>Why do we need to index?</h4><p>We primarily have two options without the indexer: fetch data directly from the RPC node. We automatically lose the historical or use some automatized repetitive task where the bot uploads the state of the NFTs to the decentralized storage (IPNS, Textile).</p><p>Moreover, we would have to make <strong>classic use-cases like search on the client-side</strong>, which would be a massive pain for most devices worldwide. Querying a particular NFT would take a long time to load.</p><p>To index any existing relay- or para- chain in the Polkadot, we can choose between <a href="https://medium.com/u/363112002081">SubQuery Network</a> or <a href="https://medium.com/u/989be7cdf6b8">Subsquid</a>. In <a href="https://twitter.com/kodadot"><strong>Kodadot</strong></a>, we use both of the services, but in this article, we will look into the SubSquid.</p><h4>Setting up the SubSquid</h4><p><strong>SubSquid is easy</strong>! We need to create a new project from the <a href="https://github.com/eldargab/hydra-template">SubSquid template</a>. We click on the “Use this template” button and are ready to go 🚀.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hwo4OeXYWEc8rThsM-uR-Q.png" /></figure><p>Once we have our project cloned, we need to ensure <a href="https://medium.com/u/96cd9a1fb56">Node.js</a> and <a href="https://medium.com/u/607469dace9">Docker</a> are installed.</p><p>To install the dependencies for our project, we insert this command into the terminal. It will install and duplicate all the packages we need.</p><pre>npm ci</pre><p><strong>Which data are we going to index? </strong>That’s a clever question! Let’s look into <a href="https://github.com/kodadot/rubick/blob/main/src/processor.ts">src/processor.ts</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EOIp27EFQBl9Aaayxq66pA.png" /></figure><p>As shown in the Figure above, we will fetch data from the <a href="https://medium.com/u/65671da9af01">Kusama Network</a> from <a href="https://kusama.subscan.io/block/5756453">block 5756453</a>. We care about three calls: <em>remark</em>, <em>batch,</em> and <em>batchAll.</em></p><p>The good thing about SubSquid is that we can generate respective types for each call, so we do not need to implement the argument parsing by ourselves (trust me, it’s a pain). We put the typegen command into the terminal to generate these types.</p><pre>make typegen</pre><p>The second argument in the <em>addExtrinsicsHandler</em> is so-called <em>mapping</em>, which we will decompose later.</p><p><strong>What will the data look like?</strong> In <a href="https://github.com/kodadot/rubick/blob/main/schema.graphql">schema.graphql</a>, we define all the entities we will use later in the mappings.</p><p>In the image below, we have defined an <em>NFTEntity</em> that should represent the particular instance of the NFT we see on the <a href="https://kodadot.xyz/rmrk/gallery/11665380-900D19DC7D3C444E4C-KSMBOT-KUSAMA_BOT_051-0000000000000054">KodaDot website</a>. <em>NFTEntity</em> contains a couple of fields on the website: <em>id</em>, <em>name, collection, link to the IPFS metadata, the block where the NFT was created, artist(issuer), and the actual owner (currentOwner).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVg06A9Ko-zZwSkYWiMbEw.png" /></figure><p>Once we have defined which chain data we want to index and the schema of how the data will look, we need to generate a type that we will use later in the mapper. In the terminal, we will call:</p><pre>make codegen</pre><p>and we are ready to make a mapper.</p><p><strong>Mapper is an asynchronous function that takes the context (extrinsic, block, event)as the parameter and the goal is to process it into the defined schema.</strong></p><p>As we see, our handleRemark function is super easy. Firstly, we need to call a system remark type (autogenerated by <em>typegen</em>). Secondly, we extract some data from the context, and lastly, we call a <em>mainframe</em> that is responsible to call a function based on the interaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m8IvAUp03Y8eSw55sfOeNQ.png" /></figure><p>The <em>extractRemark</em> also seems easy to implement. We need to check if the remark string starts with rmrk or RMRK; we append the essential data such as the author of the transaction, block number when the transaction was included, and timestamp of the block.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gBqBGfHUU4kLhjwfmFtflA.png" /></figure><p>The last part is the <em>mainframe</em> function; based on the given interaction (e.g., RMRK::MINTNFT) indexer will know that it should call the <em>mintNFT</em> function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V86Eo0nswLtjRMAJlDl5Zg.png" /></figure><p><em>mintNFT</em> is the messiest but most crucial function here. From the RMRK string, we need to extract the data (specified in RMRK spec) and perform some checks, including if the collection exists or if the transaction author is the owner of the collection.</p><p>If we pass the checks, we can freely fill the NFTEntity with the blockchain data.<br>Once it’s done, we save the NFTEntity into the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j5CJRmV-qFhN8bm_hnPplg.png" /></figure><p>🎉 We have our indexer ready so we can process some on-chain data.</p><h4>Up and running</h4><p>We need to get our database up and ready to run. We will make this happen by using the magic command in the other terminal.</p><pre>docker-compose up db</pre><p>Now we need to migrate our schema into the database. Why? Our database does not know about our schema, and our database tables are not ready. To migrate the database, we need to run:</p><pre>make reset</pre><p>The last step is to build a project and run the processor.</p><pre>make process</pre><p>When we make everything correct, we should see that the processor runs and processes blocks one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbA5bLxquJJOOYFcjRLNoA.png" /></figure><h4>Could you give me the data 😋?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*_NQX5VpsMa6tWEAIMaiprg.jpeg" /></figure><p>Once we have indexed a couple of blocks, we can open a GraphQL playground by calling.</p><pre>make serve</pre><p>Command will open the playground on the <a href="http://localhost:4350/graphql">http://localhost:4350/graphql</a>. We can compose the exact query we need by playing with the tree hierarchy on the left.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--qVLlW01XUJZ8wrj7TXnQ.png" /></figure><p>So what have we queried? Every GraphQL query starts with the query keyword and the query’s name afterwards. Giving a name to a query is a good pattern because it’s beneficial during debugging (e.g., you exactly know which query is failing). Then we start with the body. SubSquid maps a list of NFTs into the plural form, so we have to call <em>nftEntities</em> instead of <em>nftEntity. </em>The following optional parameter that the query takes is a limit. We tell the database under the hood that we only want the first four pieces from the table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*tk1aC-LfyDpjmFTcd17Pnw.png" /></figure><h4>Welcome to the dark side</h4><p>The other cool thing about SubSquid is the possibility of writing custom resolvers. Resolvers are customs functions that look like a hypercasual entity, but we can have a complex SQL query behind the scenes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TmnuNbAm0rTT9iUHdunjLg.png" /></figure><p>As we can see, to create a resolver, we make a class with a Resolver annotation. Inside this class, we will define functions available to query using GraphQL. In our example, we have created the function nftImageByHash, which takes a hash as a parameter. Inside the function, we make a raw SQL query (which does some magic) and then call the query using a built-in ORM mapper.</p><p>What data do we get? Above the resolver, we have a Metadata class, which defines each attribute’s type, name, and optionality. Our Metadata class contains id and image attributes which we return from the query.</p><h4>Why are we so hyped about it?</h4><p>The picture below shows that the first query is tough to write and then complicated to parse on the front end; the second query, which uses the resolver, is super easy-to-use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I7X_NkMsXD1mnQGENujxBg.png" /></figure><p>Moreover, detailed data views such as series insight will be impossible to write.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NM66Xh6IKkdKAv8lhfVvng.png" /><figcaption><a href="https://nft.kodadot.xyz/series-insight">https://kodadot.xyz/series-insight</a></figcaption></figure><h4>Squid 🦑 in the shell</h4><p>To sum it up, when we want to index data from any <a href="https://medium.com/u/3e5a7d431699">Polkadot</a> / <a href="https://medium.com/u/65671da9af01">Kusama Network</a> para-chain, we need to define which extrinsics or events we will process. <strong>Then we set up a GraphQL schema — how the final data will look in the database.</strong> The last step is to define a mapper that transforms extrinsics / events into the schema.</p><p><strong>SubSquid offers the perfect tooling to fetch and process the data from the chain.</strong> The processor is fast; it processed our first implementation in under 12 hours (more than 6 million blocks).</p><h3>We are hiring — you and your friends</h3><p><strong>As a growing team</strong>, we need to hire social capital to render our vision true. <strong>You and your friends can be part of it.</strong> Let us <strong>know if you know someone who would like to contribute to open-source web3 projects and change the world.</strong></p><h3>We are in it for open Metaverse</h3><ul><li><a href="https://kodadot.xyz/jobs">Frontend Engineer — VueJS/Typescript</a></li><li><a href="https://kodadot.xyz/jobs">Technical Product Manager</a></li><li><a href="https://kodadot.xyz/jobs">Senior Business and Operations Manager</a></li><li><a href="https://kodadot.xyz/jobs">Rust developer</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4fab5ae1628" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/index-your-kusama-nfts-b4fab5ae1628">Index your Kusama NFTs</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wen Statemine by KodaDot]]></title>
            <link>https://blog.kodadot.xyz/wen-statemine-by-kodadot-b35ae13b70ff?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b35ae13b70ff</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[statemine]]></category>
            <category><![CDATA[kodadot]]></category>
            <category><![CDATA[kusama]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Wed, 02 Feb 2022 11:53:37 GMT</pubDate>
            <atom:updated>2022-02-02T12:01:35.278Z</atom:updated>
            <content:encoded><![CDATA[<p>One bull run ago <a href="https://kusama.polkassembly.io/motion/349">we have received a grant from Kusama Treasury</a> to implement Statemine-based NFTs into the KodaDot.</p><p>In this fairy tale, you can learn how it went.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9ifGKVlap79osN5fbPARA.jpeg" /><figcaption>Fractanary, first NFT on Statemine. Authors: Awer, Vidam and Andreas Preis</figcaption></figure><p><strong>The goal of our grant was to deliver a good user-friendly interface to create, view and make actions with NFTs and Collections. </strong>However, to deliver a few RPC calls (credits: <a href="https://medium.com/u/fa2a9b2b716e">Bruno Skvorc</a>) we met a lot of obstacles on this journey.</p><p><strong>This article is split into three sections:</strong></p><ul><li>NFT pallet — how does it work</li><li>What have we delivered?</li><li>The technical magic</li></ul><h4>Statemine &amp; the NFT pallet</h4><p>Statemine is a common-good parachain on <a href="https://medium.com/u/65671da9af01">Kusama Network</a>, which should hold all fungibles and non-fungibles for all connected parachains. One of the runtime pallets (chain logic) imported into <strong>Statemine is the NFT pallet, technically known as uniques.</strong></p><p><strong>Unique pallet consists of two main entities: Classes and Instances.</strong><br>You can imagine Class as a collection that holds a list of NFTs<br>On the other hand, Instance represents the exact single NFT. <br>Both Class and Instance have a metadata field to store hyperlinks to the IPFS or other decentralized storage (like <a href="https://twitter.com/PermaFrost_AR">PermaFrost</a>). On top of that, each entity can store attributes to add different traits for the tokens.</p><p>Isn’t that ineffective to hold many bytes on the chain? That is an excellent and valid question. The truth is that <strong>when you create Class or Instance or add metadata, you have to lock some amount of KSM</strong>. Is it possible to get the KSM back? Sure, <strong>when you burn the Class or Instance, your KSM will be returned.</strong></p><h4>KodaDot on Statemine: What have we delivered?</h4><p><strong>We’ve made a straightforward UI for users to create their collections (classes) and then mint their lovely non-fungible tokens (instances) on Statemine</strong>. For the sake of clarity, we will refer to<strong> Classes as collection</strong> and <strong>Instances will be referred to as NFTs.</strong></p><h4>Create Class — Collection</h4><p>Let’s mint our first collection (aka class). All we need is an <strong>image to represent our class</strong>, <strong>a cool name and a description</strong>. As we see in the figure below we decided to mint our first KodaDot logo as the image of our collection then name our collection as Kodadot and as you know we are a carbon-neutral NFT platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*8vwDQOfmdO_NzcY7UFTgEA.png" /><figcaption><a href="https://beta.kodadot.xyz/statemine/create">https://beta.kodadot.xyz/statemine/create</a></figcaption></figure><h4>Create NFT</h4><p>When our collection is ready, we can create some NFTs. The process of creating the NFT/Instance is exactly the same as in the collection. The image below shows that first, <strong>we need to select a collection (in our case KodaDot)</strong>, image, name and description. Moreover, if we click on the “Show on-chain attributes”, we can really add some attributes to the NFT 👀. These attributes are stored on the chain in the form of key-value a requires a bit of KSM. <strong>We have to be careful not to run out of KSM.</strong></p><h4>Gaming NFT on KodaDot</h4><p>We’ve been thinking about this quite long-term and can tell that we are preparing for GameFi to be run on Statemine with help of KodaDot. Right now we’ve opened gates for anyone to add traits and we are playing with further experimentation for <a href="https://metaprime.network/">MetaPrime.network</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZL_crgq6pmuLE_c6LRTYFg.png" /><figcaption>Creating our first NFT with traits on Westmint / Statemine</figcaption></figure><h4>Minted NFT on Statemine / Westmint</h4><p>Tada 🎉 we made it! We have our shiny new NFT ready. Let’s look at the NFT detail. The main portion of our screen is taken by the art itself. <strong>Under the image, we can see the information we added during the mint.</strong> The middle section under the image is dedicated to the important ownership data, such as the under which collection we minted the creator’s address, address of the current owner and delegator’s address. On the bottom right we have the panel with available actions for the currently logged user. Because <strong>we are the owners of the NFT we can now send it, burn it or delegate.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X6-i8F6yWY4h6MfY.png" /><figcaption><a href="https://kodadot.xyz/westmint/gallery/0-2">https://kodadot.xyz/westmint/gallery/0-2</a> — Detail of NFT with Traits</figcaption></figure><h4>Action panel</h4><p>Whenever you are owner of particular NFT, you can SEND, CONSUME (BURN), Delegate and erase metadata (Trash icon)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*5JZH5ySxzjP4_9dlPeNumg.png" /></figure><h4>Delegator</h4><p>Who is the delegator anyway? <strong>We can delegate our NFT to another address that is able to send our NFT</strong>. Imagine that as asking our friend to take be our trusted third party.</p><h4>Submit delegate</h4><p>We are going to delegate this token to the friend. All we just need to do is to insert her address and hit submit button.</p><h4>Fancy addons</h4><p>From the other fancy features on the action panel, <strong>we can show the QR code for the NFT, copy the current URL to the clipboard spawn a sharing modal.</strong> The last feature on the panel (very dangerous), will show us a modal with a possibility to remove all attributes and the metadata. <strong>Proceed with caution as adding metadata is an only one-way operation available only at minting operation.</strong></p><h4>Collection detail</h4><p>From the NFT detail and action panel, we can move to the Collection detail. We see all the important information as the creator, name, image and the list of NFTs in the collection. As the additional perk of this screen, <strong>KodaDot UI allows you to transfer ownership of the collection</strong> to someone else!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W2a77YrlTJj4OlWebcAbpg.png" /></figure><h4>Transfer collection</h4><p>Clicking on the paper plane icon on the right side of the screen we will spawn a dialogue where we just put the address of the future owner. <strong>After the submission, the blockchain magic happens and voila the collection is no longer us.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zdxbD1Y18L1SBxSx3uJyyQ.png" /></figure><h4>Teleport</h4><p>One of the features we have implemented is teleport. <strong>Teleport allows us to send our tokens between the parachain and the relay chain.</strong> The teleport interface is delightfully simple. All we need to know is who is the recipient of the tokens and the amount of the tokens we want to transfer. <a href="https://github.com/kodadot/nft-gallery/issues/2078">How do we know to which chain am I sending the funds?</a> In the figure below we see that the app shows where we are teleporting assets.<strong> To swap the source and destination chain we use the smart way of the route prefixes which we describe in the later section.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wq9mJo_1bxKnFydI8I68kg.png" /><figcaption>Teleporting WND from Westmint to the Westend</figcaption></figure><h4>Technical difficulties</h4><p><strong>As what Bruno called a few calls it is more difficult under the hood. </strong>The backbone of the app is the indexer hosted by SubQuery. <strong>We use the indexer as a discovery service. </strong>In other words for listing all available NFTs, getting a list of collections created by us and also a paginated list of NFTs owned by a particular address. <strong>As it is not necessary to run an indexer against the Statemine as we can read all the data from the chain, some queries will be computationally expensive for the client’s device. </strong>Moreover, we would completely lose the NFT’s history (wen create, send, burn). <strong>As a side effect, we would love to see other teams leverage Statemine’s indexer and build something.</strong></p><h4>Ordered data</h4><p>How do we know the data are correct? <a href="https://github.com/vikiival/unique/issues/1">Well, we learned that the hard way</a> 😅. <br>By definition of SubQuery, the events are processed by the order they have defined in the project.yml and not by the way they were included in the block so when we made a batch that makes freeze, thaw, freeze the result in the indexer was that NFT is frozen, but the reality was quite the opposite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rR-rKa4X5xkJcOWte6UK3A.png" /></figure><h4>Delayed delivery</h4><p>Moreover, in the meantime of finishing the statemine implementation, <a href="https://medium.com/kodadot/kodadot-2%E2%80%930-beta-d136f6ff139">we were upgrading our single page application to the Nux</a>t. <strong>The migration brought a lot of changes for the UI as well as the application itself is much faster. I highly recommend you to read the Koda 2.0 article.</strong></p><p>We wanted that the <strong>Statemine integration should be already written Nuxt,</strong> which has slowed the development process on the one hand, but o<strong>n the flip-side, the code is not in the state that will be unusable in a couple of weeks.</strong></p><h4>Two parallel connected RPC nodes</h4><p>The third major challenge was <strong>how to connect two parallelly connected RPC nodes to one client.</strong> As we internally still use <a href="https://github.com/kodadot/packages"><strong>kodadot1/packages</strong></a> this seems like a major decision: rewrite <strong>sub-API</strong>, to manage multiple connections.</p><p>We decided not to take this path and rather rethink how we can make the app seamless for the user and the <strong>app extendable for the other future OSS contributors.</strong><br>Therefore <strong>we’ve hacked internally called a prefixed based routing</strong>. Depending on which route we are app decides automatically on the background which node should <strong>we connect and which indexer should be used. </strong><br>As the model example:</p><ul><li>every page which has /statemine/ in the path, tells that we need a <strong>Statemine node and indexer in order to work.</strong></li><li>Alternatively, /rmrk/prefix uses the <strong>Kusama node</strong></li></ul><p>Whenever you visit /teleport from the <strong>RMRK prefix it is for the reason</strong> that you want to teleport your KSM to the Statemine. This saves a lot of future hassle with connecting other Kusama-based parachains</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OWTPmM-KiOtnCw-RjmiIFQ.png" /><figcaption>Change URL Prefix in Settings</figcaption></figure><p>What we left out from the grant is the embeddable component. In the past using single page application we were able to do it, <strong>but it showed up as a security issue. </strong>Therefore, we would like to propose a security bounty to the Kusama council for the team that is able to spot and tackle security issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XMpPdYQZcy-4RA3nfH23Sg.png" /><figcaption>KodaDot has currently the highest security grade for the secure headers</figcaption></figure><h4>Random bug</h4><p>While writing up this article we spotted a <a href="https://github.com/kodadot/nft-gallery/issues/2058">random bug</a>. When we were trying to access the NFT the app failed because the unique module was undefined despite the fact that the app claimed we were connected to the Statemine. Cracking our heads with this, <a href="https://github.com/polkadot-js/api/issues/4493"><strong>we’ve opened an issue for the @polkadot-js/api</strong></a><strong>. </strong>After hours of debugging, <strong>we’ve been happy to raise awareness as more people we’re using old-setup. Jaco realized it would be helpful for others (less_experienced) parachain developers who are debugging their stuff.</strong></p><ul><li>How we spotted a random bug? We’ve realized that we are missing types for unique module.</li></ul><h4>Recent changes since we’ve started implementing it</h4><h4>Chain Selector</h4><p>To make end-user easier life, we’ve added in top-right way to select chain you are connecting to. You can choose collecting RMRK-based NFT on Kusama or opt for Statemine. <strong>Bonus stage, as we love developers, we’ve kept option for testnets.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*okQN0EOt6ASBJnbGzuBFXQ.png" /><figcaption>RMRK on KSM or NFTs Statemine? Which is your taste?</figcaption></figure><h4>NFT Item detail</h4><p>We’ve gone through a cosmetic redesign of NFT item detail so this should look way better and we’ve introduced major improvements for mobile experience as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*apnStUJ0T-EdW7Z5ALC7eQ.png" /><figcaption><a href="https://kodadot.xyz/statemine/gallery/11-63">https://kodadot.xyz/statemine/gallery/11-63</a></figcaption></figure><h4>What have we learned?</h4><ul><li>First of all, <strong>KodaDot is no longer a small project with more than 950 merged pull requests from 60 contributors and 143 forks.</strong> We have distributed the grant and other KSM funds to the contributors as they also believe in the thesis of the public good.</li><li>Second, many people has joined our Discord to ask: <strong>“wen statemine”</strong>. At the first glance, we thought “hmm they are super hyped about the tech” which <strong>we later find out they just want to sell one of the rare NFTs such as Fractanary.</strong><br>As a consequence, we are thinking about how to make a marketplace on top of the Statemine, which could help drive more real NFTs adoption on Kusama and Polkadot ecosyste</li></ul><h4>Future work &amp;&amp; last remarks</h4><p>The future work of this proposal is to extend and implement Statemine-based fungible tokens such as RMRK or BillCoin to be shared between the users and integrate MoonRiver’s XC20.</p><blockquote>Last Remarks: All the presented features were presented on the Westmint — a testnet Statemine</blockquote><h3>Hard Facts about KodaDot development</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/383/0*NMK2GogT_8ws_D6x.png" /></figure><p>There are boring <strong>hard facts about our developers’ engagement</strong> and <a href="https://github.com/kodadot/nft-gallery/"><strong>we would like to invite you to participate</strong></a> and help shape the future of KodaDot as we are rewarding every great pull-requests based on issues we have backlogged in our repository.</p><h3>Rewards</h3><p>Currently, we have <strong>over 190 bounties</strong> with total <strong>rewards of $47k denominated in $KSM. </strong>This sounds impressive and anyone who would like to have on their Github Profile prolific participation in Open Source can join us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/0*HK1zq9zhwOW8Kxqw.png" /></figure><h3>We are hiring — you and your friends</h3><p><strong>As a growing team</strong>, we need to hire social capital to render our vision true. <strong>You and your friends can be part of it.</strong> Let us <strong>know if you know someone who would like to contribute to open-source web3 projects and change the world.</strong></p><h3>We are in it for open Metaverse</h3><ul><li><a href="https://kodadot.xyz/jobs">Frontend Engineer — VueJS/Typescript</a></li><li><a href="https://kodadot.xyz/jobs">Technical Product Manager</a></li><li><a href="https://kodadot.xyz/jobs">Senior Business and Operations Manager</a></li><li><a href="https://kodadot.xyz/jobs">Rust developer</a></li></ul><h3>Follow us</h3><h3>KodaDot</h3><ul><li><a href="https://discord.gg/35hzy2dXXh">Discord</a></li><li><a href="https://twitter.com/kodadot">Twitter</a></li><li><a href="https://twitter.com/yangwao">Yangwao</a></li><li><a href="https://twitter.com/vikiival">Vikiival</a></li></ul><h3>MetaPrime</h3><ul><li><a href="https://twitter.com/metaprime_net">Twitter</a></li><li><a href="https://medium.com/metaprime">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b35ae13b70ff" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/wen-statemine-by-kodadot-b35ae13b70ff">Wen Statemine by KodaDot</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello Kusummer: KodaDot edition]]></title>
            <link>https://blog.kodadot.xyz/hello-kusummer-kodadot-edition-faca87753418?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/faca87753418</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[kodadot]]></category>
            <category><![CDATA[kusama]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Thu, 29 Jul 2021 13:55:21 GMT</pubDate>
            <atom:updated>2021-07-29T13:55:21.170Z</atom:updated>
            <content:encoded><![CDATA[<p>A lot of time passed since we have written the technical article about the KodaDot. Let’s walk you through what’s are new recent updates in KodaDot.<br>So let’s fasten your seatbelt and we are ready to take off.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eKAc1nAYUvkc-1xg" /><figcaption>Photo by <a href="https://unsplash.com/@derickray?utm_source=medium&amp;utm_medium=referral">Derick McKinney</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Sovereign comments under NFTs</h4><p>First of all, we’ve <strong>integrated the biggest decentralized social network</strong> in the Polkadot ecosystem: <a href="https://subsocial.network/">SubSocial</a>. Through SubSocial you can <strong>enable comments under your NFT</strong> and people can show you some love.<br>Moreover, you can upvote or downvote the comments.</p><h3>🌱 KodaDot | Kusama NFT market explorer on Twitter: &quot;We are beta testing @SubsocialChain cross-chain integration under your NFTs on @KodaDot Now you can own your comments and engagement.https://t.co/dh6PmGcdvi pic.twitter.com/riKYlXBLRP / Twitter&quot;</h3><p>We are beta testing @SubsocialChain cross-chain integration under your NFTs on @KodaDot Now you can own your comments and engagement.https://t.co/dh6PmGcdvi pic.twitter.com/riKYlXBLRP</p><p><strong>How to obtain the SUB tokens?</strong> Well, you can visit the faucet using the link or <a href="https://app.subsocial.network/faucet">visit the faucet directly</a>.<br>At KodaDot we will provide you with a faucet in Sybil resistance way to obtain tokens and gain the right to comment.</p><h4>Updates in KodaDot</h4><p>When we have implemented the <strong>simpler UI for minting (Simple mint)</strong>, we got really nice feedback that it’s super simple to use and we disabled the original <strong>classic</strong> minting UI. We heard that artists love to spin off their project and then finish it later, therefore we redesigned the original interface with a couple of nice features. So here is a preview of classical minting UI, where you can mint collection and then you can mint NFT to a particular collection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wUHIFsXOvlVK35VSGL7ChQ.png" /><figcaption>Classical Mint with Collection</figcaption></figure><p>The <strong>drag and drop component has now a preview,</strong> so you can be sure what you are minting as NFT on-chain on Kusama.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N9Pc3abE9mv0-Mi8OYveIw.png" /><figcaption>Drag and drop component with preview 🏳️‍🌈</figcaption></figure><p>Back in April, <a href="https://twitter.com/kodadot/status/1378032242371493890">we’ve experimentally implemented Arweave</a> and now we returned it back to the minting interface. So right now whenever you are minting NFTs, your <strong>NFT’s image is permanently on the Arweave</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*hzvArVduQVXKxV5KTKybKw.png" /><figcaption><a href="https://arweave.net/W4_GUUSdJPlC2GHrKIvfNNP6578laXQm1Z8z_hbawIQ">https://.arweave.net/W4_GUUSdJPlC2GHrKIvfNNP6578laXQm1Z8z_hbawIQ</a></figcaption></figure><p>We are happy to announce the <strong>partnership with SubQuery</strong>. Right now thanks to Subquery, our interface is much faster and smoother, <a href="https://medium.com/kodadot/nfts-on-kusama-can-be-explored-with-kodadot-and-subquery-c730eba8628b">you can read more about it</a></p><h3>SubQuery on Twitter: &quot;Partnership Announcement - Explore your favourite NFTs with @KodaDot and SubQuery! Kodadot has a responsive web based NFT explorer that provides an intuitive user interface - powered by SubQueryhttps://t.co/SbFM4DcBhJ pic.twitter.com/qekjFpcTre / Twitter&quot;</h3><p>Partnership Announcement - Explore your favourite NFTs with @KodaDot and SubQuery! Kodadot has a responsive web based NFT explorer that provides an intuitive user interface - powered by SubQueryhttps://t.co/SbFM4DcBhJ pic.twitter.com/qekjFpcTre</p><p>Are you interested to build on top of KodaDot or in KodaDot directly? <a href="https://discord.gg/Fq2Dd2GQYX">Join our Discord</a>! We welcome and incentivize new builders, check out <a href="https://github.com/kodadot/nft-gallery/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22"><strong>Good First Issuus</strong></a></p><p>One of our first builders,<strong> </strong><a href="https://twitter.com/KodaDotBot"><strong>built KodaDotBot</strong></a>, which feeds new mints on <a href="https://twitter.com/KodaDotBot">Twitter</a>, <a href="https://discord.gg/aMHTBrhbVX">Discord</a> and preparing the Telegram channel as well. <strong>Shout out to </strong><a href="https://twitter.com/AleFerlan"><strong>Aleš Ferlan</strong></a><strong>.</strong></p><h4>Artist profiles have now four new tabs:</h4><ol><li><strong>Created</strong> — the NFTs you minted</li><li><strong>Collected</strong> — the ones you have bought or someone sent to you</li><li><strong>Sold </strong>— the NTFs you minted and successfully sold 🎉</li><li><strong>Collections</strong> — this list of collections you created</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wbabphceg3BwvlS7VF4sLQ.png" /><figcaption>Artist profile with four new tabs.</figcaption></figure><p>Last, but not least we added a switch button for the terms of services. To put it in simple words you <strong>should be responsible for the art you put on the chain</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-fhVEyvAWIURs6OfcQX9jw.png" /><figcaption>If you want to mint on KodaDot you need to accept the terms of services</figcaption></figure><h3>Artist Spotlight</h3><p>In the meantime, we have built an <strong>artists&#39; spotlight</strong> which gives more insights into the NFT curations and we want to go further. As an initial point, we have chosen five metrics:</p><ul><li>Number of sold NFTs</li><li>Number of unique tokens (you can create an NFT with 10 copies/editions)</li><li>Sum of all issued NFTs</li><li>Average NFT price of your issued NFTs that you currently own</li><li>Number of collections</li><li>and <strong>score =&gt; number of sold * (number of unique / number of total)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwcM87FL7lNWXCcmWYlzXA.png" /><figcaption>Artist spotlight</figcaption></figure><p>Additionally, thanks to the @<a href="http://github.com/pandasamanvaya">pandasamanvaya</a> you can see the <strong>historical transaction of the art.</strong> As you can see on the image below <a href="http://nft.kodadot.xyz/rmrk/detail/8384262-e8ceea4a5b48635f4d-ANON-ANON043-0000000000000043">this particular mask</a> was sold for 0.14 and then relisted for the double!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mQ9h8JdidnMI8J15rHpbDQ.png" /></figure><p><strong>Do you want to build the NFT gallery with us and earn some $KSM?</strong> <a href="https://github.com/kodadot/nft-gallery/issues">Head over to the Github issues where you can find the bounties</a>. You can find a lot of no-code issues too, so make sure you don’t miss them.</p><h4>Artists Support Program</h4><p>If you are an artist and you would like <strong>to mint on KodaDot we can give you some Kusama</strong> to mint through our <a href="https://tally.so/r/mVP06w">artist grant program</a>.</p><h4>Community Meme Competition</h4><p>Let the <a href="https://twitter.com/hashtag/KodaDotMEME">#KodaDotMEME</a> begin!<br>Yup, that’s correct we launched the <strong>KodaDot Meme competition</strong>! We dedicated a pool of $KSM and special NFTs to the winners that will be announced soon. If you missed this round do not worry, <strong>we plan to run another one so stay tuned.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cjXbrkyuEni-HABlBL0ZHQ.png" /></figure><h4>What’s next?</h4><p>Shortly, we plan to add <strong>custom attributes to the non-fungible tokens</strong> (i.e. we call it — <strong>bring your own metadata</strong>). You can imagine that as <a href="https://docs.opensea.io/docs/metadata-standards#section-attributes">custom attributes</a> to the particular collection. What are the attributes? As a perfect example, @<a href="https://twitter.com/lightsonemusic">LightsOne</a><strong> </strong>is working on the<strong> KodaTree 🌴 initiative that will plant trees </strong>and store them as non-fungible tokens with GPS coordinates. These coordinates will be stored as the custom attribute and therefore you can be sure that each KodaTree will have gps field.</p><p>We should not forget the minor things we delivered through the last few weeks:</p><ul><li>We have now <strong>support for PDFs </strong>so you can now upload your e-books as NFT!</li><li>As the participants of the #CleanNFT movement, KodaDot has a Spanish translation of the <a href="https://nft.kodadot.xyz/carbonless">Carbonless page</a></li><li>If you want to make PR to NFT gallery, we <a href="https://github.com/kodadot/nft-gallery#%EF%B8%8F-quick-setup">have crafted a development tutorial</a></li></ul><p>We have <strong>more and experimental stuff in the pipe</strong>, but it is said: It’s better to promise less and over-deliver than vice versa.</p><p>If you are <strong>interested in making KodaDot better and plan to help us in a longer period of time, feel free to reach</strong> us on Twitter <a href="https://twitter.com/kodadot">@KodaDot</a> or drop me a DM <a href="https://twitter.com/vikiival">@vikiival</a>.</p><h3>Find out more about KodaDot</h3><p><a href="https://twitter.com/kodadot">Twitter — KodaDot</a></p><p><a href="https://discord.gg/35hzy2dXXh">Come introduce yourself to the Discord</a></p><p><a href="https://kodadot.substack.com/">Newsletter — Substack</a></p><p><a href="https://t.me/kodadot_chat">Telegram KodaDot Official</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faca87753418" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/hello-kusummer-kodadot-edition-faca87753418">Hello Kusummer: KodaDot edition</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Client-first NFT gallery: Technical examination]]></title>
            <link>https://blog.kodadot.xyz/client-first-nft-gallery-technical-examination-33db09dfdc97?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/33db09dfdc97</guid>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[technical-writing]]></category>
            <category><![CDATA[kodadot]]></category>
            <category><![CDATA[kusama]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Wed, 12 May 2021 10:00:49 GMT</pubDate>
            <atom:updated>2021-05-12T10:00:49.224Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Client-first, Onchain-first, Serverless-first</strong>, these words can sound like magic to you, but they exactly represent the actual technical state of KodaDot the NFT gallery. <strong>The article is split into two main sections.</strong> The first section explains the technical implementation of the serverless gallery without the smart contracts or any additional chain logic. The second section answers the most asked technical questions related to Kusama-based galleries.</p><p>So let’s examine the magic behind it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rQaQb1d70z9nQ8rp" /><figcaption>Photo by <a href="https://unsplash.com/@merittthomas?utm_source=medium&amp;utm_medium=referral">Meritt Thomas</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Client-first</h4><p>Believe it or 90% of the magic happens directly in your browser. We do not store any metadata about your browsing. <strong>You are the one communicating with our services without the need for a centralized server.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*PCMRVh3bgDFMxbPLEMbYIQ.png" /><figcaption>Do not forget to update your app</figcaption></figure><p>We build our app using <a href="https://medium.com/u/9b930cf6db26">Vue.js</a> (huge fans !) served via CDN provided by <a href="https://medium.com/u/5250f9d9bd2f">Netlify</a>, so contend is served as fast as possible. We can make it even faster (yeah I’m talking about Vite). <strong>Additionally, 80% of the frontend stuff is cached on your device</strong> (saving both network traffic and your time) so please click on that X button located in the blue notification.</p><p>Furthermore, we also deploy a read-only version of the gallery on the IPFS using <a href="https://medium.com/u/ed97e88a04d9">Fleek</a>.</p><h4>Onchain-first</h4><p>The current implementation of KodaDot uses the Kusama blockchain. <strong>Kusama does not provide smart contracts nor has any built-in NFT logic.</strong> The point is that Kusama should serve as in relay chain, which means to coordinate <a href="https://wiki.polkadot.network/docs/en/learn-architecture#relay-chain">other connected parachains</a> hence we keep the minimal functionality on the relay chain.</p><p>That’s the reason we use the RMRK standard (so-called NFT graffiti) in version <a href="https://github.com/rmrk-team/rmrk-spec">1.0.0</a>.</p><pre>RMRK::MINT::1.0.0::%7B%22id%22%3A%2282AB24B11DAF038C35-SPACE%22%2C%22_id%22%3A%22%22%2C%22symbol%22%3A%22SPACE%22%2C%22issuer%22%3A%22FXeamQxyHjcf5LTF9UrJS139eDLyMWR5YtAZdAaGQRR1b21%22%2C%22version%22%3A%221.0.0%22%2C%22name%22%3A%22Deep%20Space%22%2C%22max%22%3A1%2C%22metadata%22%3A%22ipfs%3A%2F%2Fipfs%2FQmT4gGhW92Nfdzv8dKc6v3wDfufTYwGiAV2KDsjrPD4WD6%22%7D</pre><p>As you can see on the snippet above this is how RMRK Mint looks like. <strong>This string is baked into the Kusama using the system.remark function</strong>. You may ask how does it differ from the NFTs based on Ethereum? They use a smart contract with a standard called <a href="https://eips.ethereum.org/EIPS/eip-721">ERC-721</a> so NFTs are protected by a chain logic. As we mentioned before RMRK NFTs are just bytes of data written in the block and it is the task of the gallery to decompose the string into the readable format and consolidate other NFT interactions.</p><h4>Possible NFT interactions are</h4><ul><li>LIST -&gt; put NFT on sale for the defined price</li><li>BUY -&gt; change NFT ownership to the buyer and send money to the previous owner</li><li>CONSUME -&gt; burn the NFT</li><li>SEND -&gt; change NFT ownership to the receiver</li><li>EMOTE -&gt; add an emoji to the NFT to signal the appreciation</li></ul><p>So do not worry you can sell, buy, send NFTs safely as we are interoperable with other RMRK galleries.</p><p>In addition, we also bootstrapped the carbonless NFT initiative.</p><h3>Polkadot / Kusama NFT market 🖼️👀 on Twitter: &quot;🌱 We are excited to share that we&#39;ve made progress to adding creators the option to make their NFTs truly #cleanNFT and be carbon-negative. pic.twitter.com/2W5iuO2s9S / Twitter&quot;</h3><p>🌱 We are excited to share that we&#39;ve made progress to adding creators the option to make their NFTs truly #cleanNFT and be carbon-negative. pic.twitter.com/2W5iuO2s9S</p><p>As you can see it’s now possible to mint carbonless NFT (#cleanNFT) on the KodaDot. The money which we collect is used to buy carbon offsets from <a href="https://medium.com/u/27eb94c09e8c">Offsetra</a>.</p><h4>Serverless-first</h4><p>The genesis of the RMRK block is <strong>4892957</strong>. The current block is <a href="https://kusama.subscan.io/block/7344228">7344228</a>. Fetching and processing more than 2.45 million blocks by yourself would take you ages, therefore we used the decentralized database <a href="https://docs.textile.io/threads/">ThreadDB by Textile</a> built on top of the IPFS, IPLD, and Libp2p. Using this approach we can provide stable and fast access to the NFTs.</p><p>So how does the minting process work? After you submit the mint button the app pushes the NFT image into the slate storage and a lambda function pins the image to the IPFS with the help from Pinata API 🪅. Then the app compiles the NFT metadata into a JSON file we directly pin JSON to the IPFS. In the end, the remark string is created and the app submits the transaction to be signed by you. After the block is successfully finalized without any error, the remark string is sent to the ThreadDB along with the block number and caller.</p><h4>Technical FAQ</h4><ol><li><strong>Can someone double buy my art?</strong></li></ol><p>As we previously mentioned RMRK is currently just an NFT baked into the blockchain and we don’t have any chain logic. From the lesson of randomness, we know that there is the possibility that two or more people can make buy transactions in the same block and can lose money. Then it’s just about the honesty of the artist to return the money or mint the same NFT as the token of appreciation. <strong>We are aware of this and that’s why we are working on a more robust and trustless solution =&gt;</strong><a href="https://metaprime.network/"><strong>MetaPrime</strong></a><strong>.</strong> The goal of the MetaPrime is to be a parachain connected to the <a href="https://medium.com/u/65671da9af01">Kusama Network</a> (and later to the <a href="https://medium.com/u/3e5a7d431699">Polkadot</a>) and provide infrastructure and the tools to the NFT-based assets. So far we plan to run orml-nft, auction, vesting, identity, and a lot more pallets so stay updated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z8WIzyMxszJO7GjH" /><figcaption>Photo by <a href="https://unsplash.com/@seteph?utm_source=medium&amp;utm_medium=referral">Allef Vinicius</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>2.<strong> I found my art on a different Kusama gallery, what’s that?</strong></p><p>RMRK is so far an open standard, so even you can come up with your solution to the indexing problem. Do we need the indexing? Yes. RMRK NFTs are just bytes stored on the protocol level and using the orml-nft pallet will save a lot of hassle. Every gallery uses a different approach: some use MySQL, some use one big JSON, and then fetch the rest on the client-side. I am just glad that everyone is using their own heuristic which suits their needs. We chose our stack to fulfill the 3 key metrics, mentioned at the beginning.</p><p><a href="https://nft.kodadot.xyz/rmrk/detail/7152905-0E76E3AC15B4C1FA1E-TRI-SIERPINSKI_TETRAHEDRON-0000000000000001">Sierpinski tetrahedron</a></p><p>So there is a possibility that you can see your art on different platforms.</p><p>3. <strong>So how do you ensure the compatibility between the galleries?</strong></p><p>We use the project Waterloo which is basically the compatibility layer between the KodaDot and other galleries. <strong>We ensure that all the interactions on the KodaDot are directly processed by the lambda function between you, Kusama, and ThreadDB.</strong></p><p>We use the Waterloo to sync the remarks from other galleries and then we can be more than sure that we are showing you the valid state of the NFT.</p><p>4. <strong>Are there any NFTs that are minted not according to the standard?</strong></p><p>I am still human and I try to fix mistakes as soon as possible (expect chaos the main motto). In the early versions of implementations, there are some NFTs minted with version RMRK1.0.0.</p><pre>“version”: {<br>  “type”: “string”,<br>  “description”: “Version information on RMRK standard used, e.g.     RMRK1.0.0”<br>},</pre><p>The snippet is from the latest doc, however, rmrk-tools mark them as invalid (open to further discussion here).</p><p>During the fix couple of NFTs were minted with a undefined version therefore I would like to reimburse the costs for the new mint for those who were affected (it’s a super old error).</p><p>In the Figure below we can see the proof that we are fully compatible with the current 1.0.0 standard, For these tests, we use validate functions from <a href="https://github.com/rmrk-team/rmrk-tools">rmrk-tools.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*cWx6DZG_l0TZqgPK1gQYjA.png" /><figcaption>We are compatible with the current 1.0.0 standard</figcaption></figure><p>5.<strong> Do you have now any additional costs?</strong></p><p>As we releasing the app about 2 updates per day. We have to pay for additional build minutes on Netlify (~$20).</p><p>We run IPFS gateway with 2 replications one in Europe and one in the US. Each GB pinned cost us $0.18 (0.15 EUR). Recently Pinata guys decided to limit the number of requests from each visitor so we decided to add a <a href="https://medium.com/pinata/announcing-dedicated-ipfs-gateways-60f599949ce">dedicated IPFS gateway</a> with the price tag of around $20/month + the traffic costs.</p><p>Moreover, if we take a look at the table below we can see the daily cost for the ThreadDB.</p><pre>USAGE           FREE      QUOTA        DAILY COST<br>ThreadDB reads  1700006   0 (0%)       $1.6500<br>ThreadDB writes 5500      14500 (73%)  $0.0000<br>Network egress  1.4 GB    9.3 GB (87%) $0.0000</pre><p>Last but not least we have 125k free calls of lambda functions in our package.</p><p>Waterloo is running on my home server and one VPS instance which is not free, but at least I have the motivation to drink less coffee and pay for the server instead ☕️.</p><p>How can you support us? Well, there are two options built-in the KodaDot interface. First, when you are creating Collection / NFT you can help cover the IPFS pinning costs. The calculation can be found <a href="https://github.com/kodadot/nft-gallery/blob/1df2684a1d7952a7afde30ea0ba73aa3cf0563bd/dashboard/src/utils/support.ts#L43">here</a>.<br>The recipient of the funds is <a href="https://kusama.subscan.io/account/CykZSc3szpVd95PmmJ45wE4ez7Vj3xkhRFS9H4U1WdrkaFY">KodaDot multi-sig account</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*jaFNJsZaO941I5wmUSS9JA.png" /><figcaption>It’s a nice feeling to pay for the IPFS pining. It cost cents for you</figcaption></figure><p>The second option is to buy NFT on the KodaDot. <strong>Currently, we </strong><a href="https://github.com/kodadot/nft-gallery/blob/1df2684a1d7952a7afde30ea0ba73aa3cf0563bd/dashboard/src/utils/support.ts#L6"><strong>charge 2%</strong></a><strong> from each buy, which should partially cover the infrastructure costs.</strong> The current industry standard is between <a href="https://docs.opensea.io/docs/frequently-asked-questions">2.5</a>–<a href="https://discover.therookies.co/2021/04/06/selling-my-first-nft-cryptocurrency-in-the-digital-art-world/">15</a>%.</p><p>For clarification, we <a href="https://kusama.polkassembly.io/treasury/68">received a grant from the Kusama treasury</a> to build an <a href="https://medium.com/kodadot/kodadot-nft-explorer-f2c3a326a856">NFT gallery</a>. We used this money for research and development purposes and it does not cover the long-run efforts.</p><h4>Sum it up</h4><p>We fairly stress-tested every Web3 infrastructure so far. Ask <a href="https://twitter.com/MattOber1">Matt Ober</a> and <a href="https://twitter.com/andrewxhill">Andrew Hill</a> :). If you need to test your infrastructure let us know!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*esMflK7UItD8mWn4UbGedg.jpeg" /><figcaption>Too many requests as usual HTTP response status (Source: <a href="https://http.cat/429%29">https://http.cat/429)</a></figcaption></figure><p><strong>I wrote this piece to simply clarify the KodaDot implementation. I would like to avoid names like “centralized” or “unsafely build”.</strong></p><p><strong>Do you want to join the effort and build the NFT gallery with us?</strong> <a href="https://github.com/kodadot/nft-gallery/issues">Head over to the Github issues where you can find the bounties</a>. We have also a lot of no-code issues so make sure you don’t miss them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*kJBvCI-L3Oskx8qgYwLxlg.png" /><figcaption>Bounties are tagged with a dollar sign</figcaption></figure><p>If you are <strong>interested in making KodaDot better and plan to help us in a longer period of time, feel free to reach</strong> us on Twitter <a href="https://twitter.com/kodadot">@KodaDot</a> or drop me a dm <a href="https://twitter.com/vikiival">@vikiival</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33db09dfdc97" width="1" height="1" alt=""><hr><p><a href="https://blog.kodadot.xyz/client-first-nft-gallery-technical-examination-33db09dfdc97">Client-first NFT gallery: Technical examination</a> was originally published in <a href="https://blog.kodadot.xyz/">KodaDot Frontier</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Run Substrate on Apple M1 ]]></title>
            <link>https://vikiival.medium.com/run-substrate-on-apple-m1-a2699743fae8?source=rss-c0563bcb89d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2699743fae8</guid>
            <category><![CDATA[substrate]]></category>
            <category><![CDATA[polkadot]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[m1]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Viki Val]]></dc:creator>
            <pubDate>Tue, 23 Feb 2021 10:47:40 GMT</pubDate>
            <atom:updated>2021-02-25T20:16:43.545Z</atom:updated>
            <content:encoded><![CDATA[<h3>Run Substrate/Polkadot on Apple M1 🍏</h3><p>On my old Macbook Pro, I used to run a local node with a <a href="https://github.com/vikiival/substrate-docker-compose">docker container</a>. However, this approach is unusable on M1, so I need to find an alternative solution. I tried to build the node using Rosetta 2 but without any success.<br>So then along with <a href="https://twitter.com/JakPanik">@JakPannik</a>, we found a way how to run Substrate natively on M1.<br>Update: I also managed to run Polkadot natively. The setup can be found at <strong>the end of this article.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Qf29py3SfalLKeoT" /><figcaption>Photo by <a href="https://unsplash.com/@martinkatler?utm_source=medium&amp;utm_medium=referral">Martin Katler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I hope that you have Brew and Xcode Command Line Tools ready installed.</p><p>First, we need to install the following dependencies from brew:</p><pre>brew install python@3.9 protobuf llvm cmake openssl</pre><p>Now install rust</p><pre># Install<br>curl https://sh.rustup.rs -sSf | sh <br># Configure<br>source ~/.cargo/env</pre><p>Use rustup nightly</p><pre>rustup update<br>rustup update nightly <br>rustup target add wasm32-unknown-unknown --toolchain nightly</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*Tma2raMqnxfDAIQeCnBhbg.png" /><figcaption>Your rustup should use the nightly-aarch64 toolchain</figcaption></figure><p>So let’s clone the Substrate node now</p><pre>git clone <a href="/service/mailto:git@github.com">git@github.com</a>:substrate-developer-hub/substrate-node-template.git</pre><p>Now open Cargo.toml in your favorite code editor and on the top of the file add these lines:</p><pre>[patch.crates-io]<br>librocksdb-sys = { git = &quot;<a href="https://github.com/hdevalence/rust-rocksdb">https://github.com/hdevalence/rust-rocksdb</a>&quot;, branch = &quot;master&quot; }</pre><p>Open Cargo.lock find libc package and replace the package with:</p><pre>[[package]]<br>name = &quot;libc&quot;<br>version = &quot;0.2.81&quot;<br>source = &quot;registry+<a href="https://github.com/rust-lang/crates.io-index">https://github.com/rust-lang/crates.io-index</a>&quot;<br>checksum = &quot;1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb&quot;</pre><p>🧨 Compile-time</p><pre>make init<br>make build</pre><p>Ideally, you should not get any errors at this time.</p><p>👟 Time to run</p><pre>make run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TtprTEyfP_eF9-hXSeyQUQ.png" /><figcaption>Running Substrate node on M1 🍏</figcaption></figure><h4>Update: Running Polkadot node</h4><p>The setup is similar to the Substrate. <br>Download the latest release of Polkadot from the link below (use zip format).</p><pre><a href="https://github.com/paritytech/polkadot/releases">https://github.com/paritytech/polkadot/releases</a></pre><p>Unzip, go to the folder, and then execute:</p><pre>./scripts/init.sh</pre><p>Now edit the Cargo.toml</p><pre>[patch.crates-io]<br>librocksdb-sys = { git = &quot;<a href="https://github.com/hdevalence/rust-rocksdb">https://github.com/hdevalence/rust-rocksdb</a>&quot;, branch = &quot;master&quot; }</pre><p>Moreover, we need to update two libraries 📚</p><pre>cargo update -p ring fs-swap</pre><p>After the update, we can build the node 🏗</p><pre>cargo build --release</pre><p>👟 Let it run</p><pre>./target/release/polkadot --dev</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*720keYwuOH3VA7wAPFhSJA.png" /><figcaption>Running Polkadot node on Apple M1</figcaption></figure><h4>Conclusion</h4><p>I hope that everything is running. In case you have any feedback, please reach me on <a href="https://twitter.com/vikiival">my Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2699743fae8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>