<?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 Horus Labs on Medium]]></title>
        <description><![CDATA[Stories by Horus Labs on Medium]]></description>
        <link>https://medium.com/@horuslabsio?source=rss-8950c0415971------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*00EXTOWau0umDFbg</url>
            <title>Stories by Horus Labs on Medium</title>
            <link>https://medium.com/@horuslabsio?source=rss-8950c0415971------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 15:16:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@horuslabsio/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[IRYS is Now on Starknet: Unlocking Interactive, Programmable Data!]]></title>
            <link>https://medium.com/@horuslabsio/irys-is-now-on-starknet-unlocking-interactive-programmable-data-55f54816e8e8?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/55f54816e8e8</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[iry]]></category>
            <category><![CDATA[horus-labs]]></category>
            <category><![CDATA[on-chain-data]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 06:38:45 GMT</pubDate>
            <atom:updated>2025-02-24T06:38:45.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7JmWHYhtbJZm3XJxeaxig.png" /></figure><h3>Introduction</h3><p>In the world of web3, data is the lifeblood of innovation. From NFTs to decentralized applications (dApps), the ability to store, access, and interact with data efficiently is critical.</p><p>However, traditional blockchains like Ethereum and Solana are optimized for execution, not storage, making data storage expensive and limited. Even early datachains, designed for affordable storage, fall short by treating data as static and isolated.</p><p><a href="https://irys.xyz/"><strong>IRYS</strong></a> is the world’s first programmable datachain. It redefines data storage by making it permanent, affordable, and interactive. And now, thanks to the efforts of the team at <a href="https://www.horuslabs.co/"><strong>Horus Labs</strong></a>, Irys is integrated with Starknet, bringing its powerful capabilities to the Starknet ecosystem.</p><p>This article will explore what Irys is, how it works, and how Starknet developers can leverage it to build scalable, data-rich applications. Let’s dive in!</p><h3>What is Irys?</h3><p><a href="https://irys.xyz/">Irys</a> is a programmable datachain designed to solve the limitations of traditional blockchains and early datachains. Unlike execution-focused blockchains that struggle with expensive and limited storage, or early datachains that only store data passively, Irys combines affordable, permanent storage with programmability to create a new primitive for decentralized applications.</p><p><strong>Key Features of Irys:</strong></p><ul><li>Permanent Storage: Data uploaded to Irys is stored permanently, ensuring it remains accessible and tamper-proof.</li><li>Programmable Data: Data on Irys can carry embedded properties (e.g., ownership, royalties) and interact with smart contracts, making it dynamic and versatile.</li><li>Verifiability: Cryptographic proofs ensure data is accurate, available, and reliable.</li><li>Predictable Pricing: Irys uses a self-correcting pricing mechanism to stabilize storage costs, making it easier for developers to budget.</li><li>By integrating Irys with Starknet, developers can now leverage these features to build scalable, data-driven applications.</li></ul><h3>Why is Irys on Starknet?</h3><p>Starknet’s ZK-Rollup Layer 2 solution is designed to scale Ethereum by offloading computation and storage. However, even Starknet faces challenges when it comes to storing large amounts of data affordably. This is where Irys comes in.</p><p><strong>Benefits for Starknet Developers:</strong></p><ul><li>Affordable Storage: Offload data storage to Irys, reducing costs and improving scalability.</li><li>Programmable Data: Enable dynamic interactions between data and Starknet smart contracts.</li><li>Enhanced Use Cases: Build applications like permanent NFT metadata storage, decentralized content publishing, and verifiable data marketplaces.</li><li>Decentralization: Leverage Irys’s decentralized infrastructure to enhance trust and security.</li></ul><p>Recognizing the need for a robust data storage solution on Starknet, <a href="https://www.horuslabs.co/"><strong>Horus Labs</strong></a> — a blockchain research and development lab focused on building user-friendly web3 products — took the initiative to collaborate with the <strong>Irys</strong> team. Their efforts have made Irys accessible to the <strong>Starknet</strong> community, unlocking new possibilities for developers and users alike.</p><h3>How Irys Works</h3><p>Irys’s architecture is designed to make data storage efficient, reliable, and interactive. Here’s how it works:</p><p><strong>Multi-Ledger Architecture:</strong></p><ul><li>Submit Ledger: A temporary storage layer where data is uploaded and validated.</li><li>Publish Ledger: A permanent storage layer where verified data is stored with cryptographic proofs.</li></ul><p><strong>Programmable Data:</strong></p><p>Data on Irys can carry embedded properties, such as ownership rights, access controls, or royalty structures. These properties enable data to interact with smart contracts, making it more than just static information.</p><p><strong>Verifiability:</strong></p><p>Irys ensures data integrity through:</p><ul><li>Proof of Upload: Cryptographic proofs that data has been accurately uploaded.</li><li>Data Availability Challenges: Miners must periodically prove they are maintaining unique copies of data.</li><li>Matrix Packaging: A mechanism to verify that miners store unique data copies, preventing duplication or neglect.</li></ul><p><strong>IrysVM:</strong></p><p>IrysVM is a virtual machine that enables seamless integration of storage and execution. It allows smart contracts to interact directly with data stored on Irys, unlocking new possibilities for decentralized applications.</p><h3>Getting Started with Irys on Starknet</h3><p>You can start uploading data to Irys using the <a href="https://docs.irys.xyz/build/d/quickstart">Irys SDK</a>.</p><p><strong>Prerequisites:</strong></p><ul><li>Node.js (v18+)</li><li>Yarn or npm</li><li>A Starknet wallet(Argent or Braavos) with testnet funds (for Sepolia testnet).</li><li>Basic understanding of TypeScript.</li></ul><h4>Step 1: Set Up the Project</h4><ol><li>Initialize a Node.js Project:</li></ol><pre>mkdir irys-starknet-demo &amp;&amp; cd irys-starknet-demo<br>yarn init -y</pre><p>2. Install Dependencies:</p><pre>{<br>  &quot;name&quot;: &quot;irys&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;type&quot;: &quot;module&quot;,<br>  &quot;main&quot;: &quot;index.ts&quot;,<br>  &quot;license&quot;: &quot;MIT&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;start&quot;: &quot;npx tsx src/index.ts&quot;<br>  },<br>  &quot;dependencies&quot;: {<br>    &quot;@irys/query&quot;: &quot;^0.0.8&quot;,<br>    &quot;@irys/sdk&quot;: &quot;^0.2.9&quot;,<br>    &quot;@irys/upload-core&quot;: &quot;^0.0.10&quot;,<br>    &quot;@irys/upload-starknet-node&quot;: &quot;^0.0.1&quot;,<br>    &quot;bignumber.js&quot;: &quot;^9.1.2&quot;,<br>    &quot;dotenv&quot;: &quot;^16.4.7&quot;,<br>    &quot;starknet&quot;: &quot;^6.21.1&quot;,<br>    &quot;starknet-merkle-tree&quot;: &quot;^1.0.1&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;@types/node&quot;: &quot;^20.11.5&quot;,<br>    &quot;tsx&quot;: &quot;^4.7.0&quot;,<br>    &quot;typescript&quot;: &quot;^5.3.3&quot;<br>  }<br>}</pre><p>Copy the above into your package.json file in your project root and run:</p><pre>yarn install</pre><h4><strong>Step 2: Configure Environment Variables</strong></h4><p>Create a<em> .env</em> file in your project root:</p><pre>PRIVATE_KEY=your_starknet_private_key_here</pre><p><strong>Note</strong>: Never expose your private key publicly. Use a testnet wallet for this demo.</p><h4>Step 3: Upload Data to Irys</h4><p>Create a file<em> </em><em>src/index.ts</em> and add the following code:</p><pre>import { Uploader } from &quot;@irys/upload&quot;;<br>import { Starknet } from &quot;@irys/upload-starknet-node&quot;;<br>import &#39;dotenv/config&#39;<br><br>const userAddress = &quot;0x049709844D79e49757c4fd5A7092D00DE680703E9c77eD3BB43Bf94eB7f2e9b4&quot;;<br>const privateKey = process.env.PRIVATE_KEY;<br>const rpcUrl = &quot;https://starknet-sepolia.public.blastapi.io&quot;;<br><br>const getIrysUploader = async() =&gt; {<br>  const irysUploader = await Uploader(Starknet(userAddress)).withWallet(privateKey).devnet().withRpc(rpcUrl);<br>  return irysUploader;<br>}<br><br>const uploadData = async() =&gt; {<br>  const irysUploader = await getIrysUploader();<br>  const dataToUpload = &quot;Hello world&quot;;<br><br>  try {<br>    // upload text<br>    const receipt = await irysUploader.upload(dataToUpload);<br>    console.log(`Data uploaded ===&gt; https://gateway.irys.xyz/${receipt.id}`);<br><br>    // upload image<br>    const image = &quot;./images/pfp.jpg&quot;;<br>    const tags = [{ name: &quot;coloniz&quot;, value: &quot;PFP&quot; }];<br>    const receipt2 = await irysUploader.uploadFile(image, { tags: tags });<br>    console.log(`Data uploaded ===&gt; https://gateway.irys.xyz/${receipt2.id}`);<br>  }<br>  catch(error) {<br>    console.log(error);<br>  }<br>}<br><br>const queryData = async() =&gt; {<br>  const irysUploader = await getIrysUploader();<br><br>  const output = irysUploader<br>    .query({url:&quot;https://devnet.irys.xyz/graphql&quot;})<br>    .search(&quot;irys:transactions&quot;)<br>    .ids([&quot;3Lt6qPMteJmmh7z184kziSwCjUDpB83tQjRuaezZu97j&quot;, &quot;6HfJjfwHTEmnraxoeCWuRC1jC1DGc1x9i2ZdjVPMdJFw&quot;]);<br><br>  console.log(&quot;output:&quot;, output)<br>}<br><br>uploadData();<br>// queryData();</pre><h4>Step 4: Run the Code</h4><ol><li>Create an <em>images</em> folder in your project and add a test image (e.g., <em>pfp.jpg</em>).</li></ol><p>2. Execute the script:</p><pre>yarn start</pre><p>3. Example Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X3hSeXdKeJnlM7af" /></figure><h4>Step 5: Integrate with Starknet Smart Contracts:</h4><p>Use the transaction ID to reference Irys data in your Cairo smart contract.</p><p>Here’s the <a href="https://github.com/horuslabsio/Irys">full sample code</a> example of uploading data to Irys from Starknet.</p><h3>Conclusion</h3><p>Irys’s integration with Starknet marks a new era for decentralized data storage and programmability. By combining Irys’s powerful features with Starknet’s scalability, developers can build innovative, data-driven applications like never before.</p><p>Thank you to the Starknet community, the Irys team, and Horus Labs for making this integration possible. Let’s build the future of web3 together!</p><p>Start using Irys on Starknet today! Share your feedback and ideas with the Horus Labs and Irys teams. For more resources, check out:</p><ul><li><a href="https://docs.irys.xyz/">Irys Documentation</a></li><li><a href="https://docs.irys.xyz/build/d/quickstart">Get started with using Irys</a></li><li><a href="https://github.com/horuslabsio/Irys">GitHub code sample</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55f54816e8e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Coloniz: Building Smart Autonomous Communities]]></title>
            <link>https://medium.com/@horuslabsio/introducing-coloniz-building-smart-autonomous-communities-21619b066bb3?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/21619b066bb3</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[coloniz]]></category>
            <category><![CDATA[community]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Wed, 19 Feb 2025 09:07:46 GMT</pubDate>
            <atom:updated>2025-02-19T09:08:52.026Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DJilBQVbqH3KwrkItQNJgg.png" /></figure><p>Would you prefer your community to feel like yet another group chat or to have unique experiences that communicate what you believe in and stand for?</p><p>Communities exist at the center of everything we do as humans. From work to school, to family, we are built to be social animals with a need for each other.</p><p>The rise in popularity of online communities could arguably be one of the best things brought about by technology. The ability to connect and commune over shared interests regardless of geographical barriers is a privilege the world cannot take for granted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><p>But even though we’ve made considerable progress with online communities thanks to amazing solutions like Discord, Telegram, and Facebook Groups amongst others, we still face some major challenges with building online communities such as:</p><ol><li><strong>Lack of personalization</strong>: Communities comprise individuals with shared goals and interests. This should constitute a huge part of the community experience, from onboarding to looks and feel, every community should have a uniqueness that communicates its beliefs and what it stands for.</li><li><strong>Poor scalability and moderation tools</strong>: It’s 2025 and most communities are still moderated/managed manually. We did a little survey involving reputable community managers and they complained about how difficult it was to offer 24/7 assistance to community members, whilst fighting spams, scams and still actively trying to engage and keep the community running.</li><li><strong>Limited monetization options</strong>: Have you tried creating/managing a community that offers monetizable values on Discord/Telegram? Yeah it’s really inconvenient as these platforms are built to offer mainly chat related services, thus difficult to monetize out of the box by building communities gated behind paywalls, integrating in-house shops and many more.</li><li><strong>Absence of In-built reward and gamification systems</strong>: Modern-day community building requires more creative ways to engage users. This can range from simple gamification systems like exclusive roles on Discord to advanced systems like leaderboards, quests, dynamic badges and reward systems like native tipping, airdrops etc.</li><li><strong>Limited Organic traffic</strong>: Communities are supposed to aid building your brand, but are you really building your brand when you use social platforms like Discord and Telegram or are you building theirs? One of the pitfalls of using one of the many social platforms out there for community building is people don’t get to find your communities without invites, unlike coloniz where home feeds are/can be indexed by google search thereby helping you gain organic traffic.</li></ol><p>These and more are some of the many challenges that plagues existing community-building platforms. Could there exist better solutions to explore?</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><h3>Enter Coloniz: The next-generation community framework</h3><p>Coloniz is a simple community framework that empowers you to build personalized, smart autonomous communities effortlessly.</p><ul><li><strong>Personalized</strong> — Communities are fully-customizable to embody your brand ethos and values.</li><li><strong>Smart</strong> — Communities are powered by Colony assistants which automates the boring, repetitive tasks, assists with customer support and automates moderation.</li><li><strong>Autonomous</strong> — Communities are independent ecosystems, where members have control over their interactions, data etc.</li></ul><h3>Why choose Coloniz?</h3><h4>Personalization/adaptability</h4><p>We’ve mentioned repeatedly why communities should be designed to reflect their unique identities. Communities are overall an extension of brands and organizations and thus should offer an experience that communicates its beliefs, ethos and values.</p><p>Coloniz enables you to create communities that embody these experiences — from a custom onboarding flow, to the look and feel of your community, to using your own domain and many more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*b31hiO4ynbDLRrXWEFF4aQ.png" /></figure><h4>Automated moderation systems — colony assistants</h4><p>As online communities scale, content moderation and round the clock support become necessities rather than nice-to-haves. Unfortunately, there are only so many moderators you can hire, and only so much they could do at a time.</p><p>With Coloniz, your moderators can focus on community building activities whilst <strong>Grida</strong> (the Coloniz interactive AI assistant) handles the mundane repetitive tasks, round-the-clock support and content moderation.</p><p><strong>Grida</strong> can be fed and pre-trained on product documentation to assist with answering technical questions, can learn about random things on the internet to offer opinions to questions, can learn from ongoing chats within the community to ensure you don’t have to repeat the same question twice, and can tailor her language to match that of your moderators.</p><p>Leave the mundane tasks to Grida, and focus on what actually matters — managing your community.</p><h4>Straight-forward monetization</h4><p>Community monetization should not be the hassle it currently is. Coloniz provides both community owners and users alike access to a variety of monetization options, offering flexibility in revenue generation.</p><p>From gating communities behind paywalls, to non-intrusive advertising, in-house storefronts, royalties, tips and many more, you’re rest assured that there’s something for everyone!</p><h4>Incentivization and gamification systems</h4><p>Communities exist to commune. If members of your community aren’t actively engaging and participating in community activities, then you’re severely underutilizing the magical powers of online communities.</p><p>With Coloniz, we provide you with in-house, self propagating systems to incentivize and encourage active participation, from community leaderboards and quests to dynamic/exclusive badges, tipping, social competitions and many more.</p><p>It has never been easier to keep your community engaged, energized and active.</p><h4>In-depth Data Analysis</h4><p>One gross underutilization of communities is that they aren’t treated as a growth function. This is why their success metrics are usually just community growth and maybe event participation. There is a lot more value and insights to extract from your community, as this directly correlates to business outcomes.</p><p>With Coloniz, you get access to advanced analytics and insights to measure things like user retention rates, discussion breakdowns, user behaviors, etc.</p><h4>Organic traffic</h4><p>The reason many brands turn to running their own blogs rather than using publishing platforms like Medium and co is the resulting effect on SEO and long-term traffic. This same thought process applies to community building. Communities are meant to aid in building your brand, and you’re arguably not doing this by building communities on 3rd-party platformed solutions like Discord and Telegram.</p><p>Coloniz enables you to achieve this by building custom communities, tied to your domain with easily rankable discussions.</p><h4>Decentralization and sovereignty</h4><p>In today’s world, data is everything. With most products, it is unclear how your data is used. Coloniz is built on the blockchain, with prioritization for transparency.</p><p>With v2 we’d be introducing the option to launch/create fully decentralized communities, with no reliance on our centralized servers.</p><h3>Conclusion</h3><p>With Coloniz, the future of communities is not just about connection — it’s about personalization, ownership, and endless possibilities. Let’s build it together.</p><p>Finally, we wrap up with our opening question — <em>“would you prefer your community to feel like yet another group chat or to have unique experiences that communicate what you believe in and stand for?”</em></p><p>If the latter, then join the <a href="https://www.coloniz.xyz/">waitlist</a> today, so you’re informed when Coloniz goes live!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21619b066bb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with the Starknet Tokenbound SDK]]></title>
            <link>https://medium.com/@horuslabsio/getting-started-with-the-starknet-tokenbound-sdk-c4acea36b5a1?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4acea36b5a1</guid>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[token-bound-account]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Wed, 19 Feb 2025 09:03:50 GMT</pubDate>
            <atom:updated>2025-02-19T09:03:50.033Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-JZltaIeNBkouahH4f3Ug.png" /></figure><p><strong>Tokenbound Accounts (TBAs)</strong> are changing how NFTs function by linking each NFT to its own smart contract wallet. This opens up exciting possibilities like programmable NFTs, interactive on-chain games, and more personalised dApp experiences.</p><p>The <strong>Tokenbound SDK</strong> simplifies working with tokenbound accounts on Starknet, offering developers an easy way to integrate these accounts into their applications. With this SDK, you can seamlessly:</p><ul><li><strong>Query ERC-6551 account addresses:</strong> Retrieve the TBA address linked to any NFT.</li><li><strong>Execute transactions:</strong> Manage and perform operations on tokenbound accounts effortlessly.</li></ul><p>This guide walks you through setting up your frontend project and integrating the Tokenbound SDK to unlock the full potential of tokenbound accounts in your dApp.</p><h3>Getting Started</h3><p>Before diving into the Tokenbound SDK, ensure you have a front-end project ready. Once your project is prepared, you can install the SDK package, which provides all the tools needed to interact with tokenbound account contracts.</p><h4>Setting up your Frontend project</h4><p>To get started with integrating Tokenbound accounts, you’ll first need to set up a front-end project. In this example, we’ll use <strong>Vite</strong> with <strong>React</strong> and <strong>TypeScript</strong> for a fast and modern development experience.</p><p><strong>Step 1: Create your project:</strong></p><p>Run one of the following commands in your terminal to create your project:</p><p>Using <strong>Yarn</strong>:</p><pre>yarn create vite</pre><p>Using <strong>npm</strong>:</p><pre>npm create vite@latest</pre><p>Follow the prompts to select your project name and framework (choose React with TypeScript). Once the setup is complete, navigate into your project directory:</p><pre>cd your-project-name</pre><p><strong>Step 2: Install the Tokenbound SDK</strong></p><p>Now, within the <strong>frontend project you just created using Vite</strong>, install the <strong>Tokenbound SDK</strong> to enable interactions with Tokenbound accounts:</p><p>Using <strong>Yarn</strong>:</p><pre>yarn add starknet-tokenbound-sdk</pre><p>Using <strong>npm</strong>:</p><pre>npm install starknet-tokenbound-sdk</pre><p>With the SDK installed, your project is now ready for integrating and managing Tokenbound accounts on Starknet!</p><p>A lot of what we’re going to be talking about today is in the Tokenbound documentation → <a href="https://docs.tbaexplorer.com/sdk"><em>https://docs.tbaexplorer.com/</em></a><em> .</em></p><h4>What we’re building</h4><p>The interface includes functionalities for deploying Tokenbound accounts, transferring tokens, and interacting with deployed accounts.</p><p><strong>Full code Implementation: </strong>Here’s the <a href="https://github.com/horuslabsio/tokenbound-sdk/tree/develop/examples">complete implementation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PHDzcuMXqcGNQpnnGbrR-A.png" /></figure><p>Now that we’re done with the installation. <br>ext thing to do is set up the Tokenbound Client which would provide an interface for interacting with tokenbound accounts, enabling operations like account creation, transaction execution, token transfers (including ERC-721, ERC-1155, and ERC-20 tokens), and message signing.</p><p>This is my folder structure, and I’m going to be working inside Home.tsx.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*4fH3WzDDy_SDOn4SOurjtQ.png" /></figure><h4>Required Imports</h4><pre>import React, { useEffect, useState } from &quot;react&quot;;<br>import { TokenboundClient, Call, TBAVersion, TBAChainID } from &quot;starknet-tokenbound-sdk&quot;;<br>import { useAccount, useConnect } from &quot;@starknet-react/core&quot;;<br>import { disconnect } from &quot;starknetkit&quot;;</pre><h4>1. Setting Up Your Tokenbound Client</h4><p>The first step is to initialize the TokenboundClient.<br>The Tokenbound Client is the primary interface to interact with the Tokenbound SDK. Setting it up involves creating an instance of the client, which allows you to perform various operations like deploying accounts, executing transactions, transferring tokens, and more.</p><pre>  const { address, account } = useAccount();<br>  const [tokenbound, setTokenbound] = useState&lt;TokenboundClient | null&gt;(null);<br><br>  const registryAddress: string =<br>    &quot;0x23a6d289a1e5067d905e195056c322381a78a3bc9ab3b0480f542fad87cc580&quot;;<br>  const implementationAddress: string =<br>    &quot;0x7396dc2e3ac3b50eac9b12447d7dcc2cfddef27405c680d46d6b13dae90d804&quot;;<br><br>  useEffect(() =&gt; {<br>    if (account) {<br>      const options = {<br>        account: account,<br>        registryAddress: registryAddress,<br>        implementationAddress: implementationAddress,<br>        version: TBAVersion.V3,<br>        chain_id: TBAChainID.main,<br>        jsonRPC: &quot;https://free-rpc.nethermind.io/sepolia-juno/v0_7&quot;,<br>      };<br>      const client = new TokenboundClient(options);<br>      setTokenbound(client);<br>    }<br>  }, [account])</pre><p><strong>Key Steps and Variables:</strong></p><ul><li><strong>client</strong>: This is an instance of the TokenboundClient class. It serves as the gateway to perform all Tokenbound-related operations in your dApp.</li><li><strong>signer</strong>: A signer is required to authenticate and authorize operations. It represents the account (e.g., a wallet like Bravoos or Argent) that will be interacting with the TBA.</li><li><strong>chainId</strong>: The ID of the blockchain network where the Tokenbound Account operations will occur (eg., main or sepolia).</li><li>registryAddress and implementationAddress are the contract addresses for the Tokenbound registry and implementation.</li><li>The TBAVersion and TBAChainID specify the version and chain you’re targeting.</li><li>Replace jsonRPC with your preferred endpoint.</li></ul><p><strong>Explanation:</strong></p><ol><li>Import the TokenboundClient from the SDK.</li><li>Pass the signer and chainId to the TokenboundClient constructor to configure the client.</li><li>Use this client instance (client) to perform all subsequent Tokenbound operations.</li></ol><p>This setup is foundational, as every interaction with Tokenbound SDK requires the client to be initialized properly.</p><h4>2. Deploying a Tokenbound Account</h4><p>This function deploys a new Tokenbound Account, associating a specific NFT with its own smart contract wallet.</p><p>Once the client is set up, you can deploy a Tokenbound Account linked to an NFT by calling createAccount. Here’s the function:</p><pre>const [tokenbound, setTokenbound] = useState&lt;TokenboundClient | null&gt;(null);<br>const [tbaAccount, setTbaAccount] = useState&lt;string | undefined&gt;(&quot;&quot;);<br>const tokenContract =<br>    &quot;0xNFTContract&quot;;<br>const tokenId = &quot;00&quot;;<br>  const url = `https://sepolia.starkscan.co/contract/${account}`;<br><br>const deployAccount = async () =&gt; {<br>  if (tokenbound) {<br>    try {<br>      const result = await tokenbound.createAccount({<br>        tokenContract: tokenContract,<br>        tokenId: tokenId,<br>        salt: V2_SALT,<br>      });<br><br>      setTbaAccount(result.account);<br>      alert(&quot;Account deployed successfully&quot;);<br>      console.log(result);<br>    } catch (error) {<br>      console.log(error);<br>    }<br>  }<br>};</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jBDmpFvmKbjrXFRiEea_Tg.png" /></figure><p>Click on the Deploy button to deploy the NFT as a Tokenbound Account.</p><p>Doing that will call the function for creating tokenbound accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8clOpNvDx0Cmm6jxbmILoA.png" /></figure><p><strong>Explanation:</strong></p><ol><li>Identify the NFT for which you want to deploy a Tokenbound Account using its NFT_CONTRACT address and TOKEN_ID.</li><li>Call the createAccount method on the TokenboundClient instance, passing the NFT_CONTRACT and TOKEN_ID.</li><li>This function returns the address of the newly created Tokenbound Account (tbaAddress).</li></ol><h4>3. Transferring ERC20 Tokens</h4><p>Transfers ERC20 tokens from the Tokenbound Account to a specified recipient.</p><pre>const [tbaAccount, setTbaAccount] = useState&lt;string | undefined&gt;(&quot;&quot;);<br><br>const transferERC20 = async () =&gt; {<br>  const ERC20_CONTRACT =<br>    &quot;OxERC20ContractAddress&quot;;<br>  const recipient = &quot;0xRecipientAddressHere&quot;;<br><br>  try {<br>    await tokenbound?.transferERC20({<br>      tbaAddress: tbaAccount ?? &quot;&quot;,<br>      contractAddress: ERC20_CONTRACT,<br>      recipient,<br>      amount: &quot;10000000000000&quot;,<br>    });<br><br>    alert(&quot;Transfer was successful&quot;);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>};</pre><p><strong>Note:</strong> Update recipient and amount with actual values.</p><p><strong>Variable Explanations:</strong></p><ul><li>ETH_CONTRACT: The contract address of the ERC20 token you are transferring (e.g., USDC, STRK).</li><li>recipient: The address to which the tokens will be sent.</li><li>amount: The amount of tokens to transfer.</li><li>tokenbound.transferERC20: A method for sending ERC20 tokens from the Tokenbound Account.</li></ul><h4>4. Transferring NFTs</h4><p>Transfers an NFT from the Tokenbound Account to a specified recipient:</p><pre>const transferNFT = async () =&gt; {<br>  const NFT_CONTRACT =<br>    &quot;OxNFTContractAddress&quot;;<br>  const TOKEN_ID = &quot;00&quot;;<br>  const recipient = &quot;0xRecipientAddressHere&quot;;<br><br>  try {<br>    await tokenbound?.transferNFT({<br>      tbaAddress: tbaAccount ?? &quot;&quot;,<br>      contractAddress: NFT_CONTRACT,<br>      tokenId: TOKEN_ID,<br>      sender: tbaAccount as string,<br>      recipient,<br>    });<br><br>    alert(&quot;Transfer was successful&quot;);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>};</pre><p><strong>Variable Explanations:</strong></p><ul><li>NFT_CONTRACT: The contract address of the NFT you are transferring.</li><li>TOKEN_ID: The unique identifier of the specific NFT being transferred.</li><li>recipient: The address to which the NFT will be sent.</li><li>sender: The address of the Tokenbound Account that owns the NFT.</li><li>tokenbound.transferNFT: A method for transferring NFTs from the Tokenbound Account.</li></ul><h4>5. Locking a Tokenbound Account</h4><p>Locks the Tokenbound Account, preventing certain operations until a specified timestamp.</p><pre>const [tbaAccount, setTbaAccount] = useState&lt;string | undefined&gt;(&quot;&quot;);<br><br>const lockAccount = async () =&gt; {<br>  try {<br>    await tokenbound?.lock({<br>      tbaAddress: tbaAccount ?? &quot;&quot;,<br>      lockUntill: 1728057939, // Replace with your timestamp<br>    });<br>    alert(&quot;Account was locked successfully&quot;);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>};</pre><p><strong>Variable Explanations:</strong></p><ul><li>tbaAddress: The address of the Tokenbound Account to lock.</li><li>lockUntil: The UNIX timestamp until which the account will remain locked. Replace 1728057939 with a valid future timestamp.</li><li>tokenbound.lock: A method to lock the Tokenbound Account.</li></ul><h4>6. Upgrading the Account</h4><p>Upgrades the Tokenbound Account to use a new implementation, allowing for updates or feature additions.</p><pre>const [tbaAccount, setTbaAccount] = useState&lt;string | undefined&gt;(&quot;&quot;);<br><br>const upgradeAccount = async () =&gt; {<br>  try {<br>    await tokenbound?.upgrade({<br>      newClassHash: &quot;0xYourNewClassHash&quot;,<br>      tbaAddress: tbaAccount ?? &quot;&quot;,<br>    });<br>    alert(&quot;Account was upgraded successfully&quot;);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>};</pre><p><strong>Variable Explanations:</strong></p><ul><li>newClassHash: The hash of the new implementation that the account will upgrade to. This hash is associated with the smart contract version containing new functionalities or fixes.</li><li>tbaAddress: The address of the Tokenbound Account being upgraded.</li><li>tokenbound.upgrade: A method for upgrading the Tokenbound Account.</li></ul><h4>7. Setting Permissions</h4><p>Grants or revokes permissions for specific addresses to interact with the Tokenbound Account.</p><pre>const [tbaAccount, setTbaAccount] = useState&lt;string | undefined&gt;(&quot;&quot;);<br><br>const setPermissions = async () =&gt; {<br>  try {<br>    await tokenbound?.setPermission({<br>      tbaAddress: tbaAccount ?? &quot;&quot;,<br>      permissionedAddresses: [0x000.0, 0x000..0],<br>      permissions: [true, false],<br>    });<br>    alert(&quot;Permissions added successfully&quot;);<br>  } catch (error) {<br>    console.log(error);<br>  }<br>};</pre><p><strong>Variable Explanations:</strong></p><ul><li>tbaAddress: The address of the Tokenbound Account where permissions are being managed.</li><li>permissionedAddresses: An array of addresses for which permissions are being set.</li><li>permissions: An array of boolean values (true for granting, false for revoking) corresponding to the permissionedAddresses.</li><li>tokenbound.setPermission: A method to assign or revoke permissions for specified addresses.</li></ul><h3>Conclusion</h3><p>In this guide, we explored how to set up a frontend project, initialize the Tokenbound Client, and interact with Tokenbound accounts using the Tokenbound SDK. We also demonstrated functionalities like deploying accounts, transferring tokens, and locking accounts.</p><p><strong>Helpful Resources:<br></strong> — <a href="https://docs.tbaexplorer.com/">Tokenbound Documentation</a><br> —<a href="https://github.com/horuslabsio/tokenbound-sdk"> Tokenbound GitHub Repository</a><br> —<a href="https://medium.com/@horuslabsio/announcing-tokenbound-v3-on-starknet-61f654a1625e"> Tokenbound V3</a></p><p><strong>Full Implementation: </strong>Here’s the <a href="https://github.com/horuslabsio/tokenbound-sdk/tree/develop/examples">complete implementation</a> of the frontend.</p><p>- <strong>Community Link</strong>:<br> Join our <a href="https://t.me/starknet_tokenbound/">Telegram Community</a> to ask questions and connect with other developers.</p><p>As you experiment with the SDK, we encourage you to explore its advanced features and think creatively about how Tokenbound Accounts can enhance your projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4acea36b5a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Tokenbound V3 on Starknet]]></title>
            <link>https://medium.com/@horuslabsio/announcing-tokenbound-v3-on-starknet-61f654a1625e?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/61f654a1625e</guid>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[token-bound-account]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Mon, 25 Nov 2024 11:40:59 GMT</pubDate>
            <atom:updated>2024-11-25T11:40:59.032Z</atom:updated>
            <content:encoded><![CDATA[<h4>A New Era for Tokenbound Accounts</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9Cmvsq-WfGeT62HX5YhaQ.png" /></figure><p>We’re excited to announce the launch of <strong>Tokenbound V3</strong>, a significant upgrade packed with powerful new features. <br>Building upon the robust capabilities of Tokenbound V2, this latest version brings enhanced functionality and performance, designed to redefine how users interact with <strong>Tokenbound Accounts</strong>.</p><p>In this article, we’ll explore the exciting upgrades in Tokenbound V3, the motivations behind its development, and the impact it brings to users and developers on Starknet.</p><h3>Why Tokenbound V3?</h3><p>Tokenbound V3 was developed to address key gaps in Tokenbound Account management and to enhance compatibility, security, and scalability across networks. Here are the core motivations for this upgrade:</p><ol><li><strong>Enhanced Compatibility with</strong><a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md"><strong> ERC-6551</strong></a></li></ol><ul><li>Tokenbound V3 aligns closely with the implementation of ERC-6551 on Ethereum, paving the way for cross-chain possibilities which we intend to introduce in upcoming upgrades.</li></ul><p><strong>2. State and Chain ID Integration</strong></p><ul><li>Tokenbound V3 introduces state tracking and chain ID functionality, crucial for maintaining account consistency across multiple networks.</li></ul><p>3. <strong>Tokenbound IFrame</strong></p><ul><li>The <a href="https://docs.tbaexplorer.com/toolings/tokenbound-iframe"><strong>Tokenbound IFrame</strong></a> provides a seamless, user-friendly way to display and interact with an NFT’s Tokenbound Account directly within applications.</li><li>This IFrame integration represents a significant step toward providing <strong>marketplace support</strong> for Tokenbound Accounts, opening new possibilities for NFTs and TBAs.</li><li>Users can visualise and manage their assets (ERC-721, ERC-1155, and ERC-20) within a Tokenbound Account and check the lock status of accounts and related assets, thus reducing the likelihood of marketplace fraud.</li></ul><p><strong>4. Tokenbound Connectkit</strong></p><ul><li>Using the<a href="https://docs.tbaexplorer.com/toolings/tokenbound-connectkit"> Connectkit</a> you can connect and interact with dApps using a Tokenbound Account, enabling NFTs to sign, execute and manage transactions, just like any other account on Starknet.</li></ul><p><strong>5. Permission Management</strong></p><ul><li>Tokenbound V3 introduces advanced permission settings, enabling users to delegate specific roles or permissions to other accounts securely.</li></ul><p><strong>6. Plug’n’Play components</strong></p><ul><li>Our opinionated contracts now provide you with plug’n’play components for better flexibility. Build your own account implementation using the available components, define custom signature validation schemes, and define permission scopes.</li></ul><h3>Demo — Core Upgrades and Features</h3><h4>1. <a href="https://tbaexplorer.com/">Tokenbound Explorer</a></h4><p>The Tokenbound Explorer has been reimagined, providing you with a user-friendly interface that enhances the experience of deploying and managing Tokenbound Accounts (TBAs).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*c1KaVhUeJiQhEZzW" /></figure><p>You can head out to the <a href="https://tbaexplorer.com/">explorer</a> to get started upgrading your tokenbound account to v3.</p><h4>2. <a href="https://docs.tbaexplorer.com/contracts">Contract Integration</a>:</h4><p>The key changes with V3 include:</p><p><strong>1. Modular plug’n’play components:</strong></p><ul><li>V3 introduces a more modular and efficient approach providing components such as `Lockable`, `Permissionable`, `Signatory` and `Upgradable` which can help you build custom tokenbound account implementations tailored to your application needs.</li></ul><p><strong>2. Addition of chain_id Parameter</strong>:</p><ul><li>In V3, the create_account function includes a new parameter: chain_id.</li><li>Helps future-proof the TBA by preparing it for a multi-chain or cross-chain ecosystem.</li><li>This change reflects the growing demand for interoperability.</li></ul><p><strong>2. Introduction of `state`</strong>:</p><ul><li>A `state` variable has been introduced for tracking the state of an account.</li></ul><p><strong>3. Non-compatibility with SNIP-6</strong>:</p><ul><li>Tokenbound accounts are no longer compatible with SNIP-6, the standard interface for smart accounts on Starknet and thus not backwards compatible with v2.</li></ul><p><strong>4. Tracking Deployed Accounts</strong>:</p><ul><li>The self.total_deployed counter has been removed, delegating the action to indexers.</li></ul><h4>3. <a href="https://docs.tbaexplorer.com/toolings/tokenbound-connectkit">Tokenbound ConnectKit</a>:</h4><p>With the <strong>ConnectKit</strong>, you can connect your Tokenbound Account (TBA) to any decentralized application (dApp). This tool supports popular wallets like Argent, Braavos, Web Wallet and, recently added in V3, the Cartridge Controller.</p><p><strong>PS</strong>: The <strong>Cartridge Controller</strong> is optimized for gamers offering a seamless experience tailored to game interactions.</p><p>We created an <a href="https://test-d-app.vercel.app/"><strong>example dApp</strong></a> you can try out to understand how the ConnectKit works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gVBoQWeNRKwBbncr" /></figure><h4>4.<a href="https://docs.tbaexplorer.com/sdk"> Tokenbound SDK</a>:</h4><p>The Tokenbound SDK is a front-end library designed to interact with tokenbound accounts on Starknet.</p><p>Head over to our <a href="https://docs.tbaexplorer.com/sdk/installation">documentation</a>, to get started with the SDK,</p><h4>5. <a href="https://docs.tbaexplorer.com/toolings/tokenbound-iframe">Tokenbound IFrame</a>:</h4><p>The<strong> </strong>tokenbound iFrame provides developers with an easy way to embed tokenbound accounts into their dApps, letting users explore their NFT’s tokenbound accounts and view information such as:</p><ul><li>Contents of the NFT’s tokenbound account: ERC-721, ERC-1155, ERC-20 tokens etc.</li><li>Whether the status of the TBA is locked or unlocked. A locked state allows users to confidently purchase an NFT, knowing that none of the contents of the TBA will be transferred for the specified period.</li></ul><p>This marks a positive step towards enabling marketplace support for tokenbound accounts on Starknet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*GT_MNcttgKA1D65J" /></figure><h3>Conclusion</h3><p>Tokenbound V3 introduces amazing new features and enhancements, offering you greater flexibility and efficiency in creating and managing tokenbound accounts.</p><h4>Guide and Resources</h4><ul><li><strong>Documentation</strong>: Explore the official <a href="https://docs.tbaexplorer.com/"><strong>Tokenbound V3 Documentation</strong></a> for detailed insights into its capabilities.</li><li><strong>Support Channels</strong>: Engage with the <a href="https://t.me/starknet_tokenbound"><strong>Tokenbound community</strong></a> on Telegram and join the conversation on<a href="https://x.com/horuslabsio"> <strong>X</strong></a>.</li></ul><p>The future looks brighter! 💡 <br>Tokenbound V3, with an emphasis on adaptability and innovation, empowers developers to build unique and secure experiences for users.</p><p>We encourage you to explore the new features, experiment with the tools, and share your feedback with the community. Together, we can shape the future!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61f654a1625e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build on Kakarot ZkEVM with Starknet Scaffold]]></title>
            <link>https://medium.com/@horuslabsio/build-on-kakarot-zkevm-with-starknet-scaffold-3e4a8f70a1f1?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e4a8f70a1f1</guid>
            <category><![CDATA[cairo]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[kakarot]]></category>
            <category><![CDATA[kakarotzkevm]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 11:21:10 GMT</pubDate>
            <atom:updated>2024-10-14T11:21:10.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XZ_yRly3HPnAvi1UFSmFWQ.png" /></figure><h4>Bridging the gap between CairoVM and the EVM</h4><h3>Starknet and the EVM</h3><p>The world of smart contracts as we know it has revolved around the Ethereum Virtual Machine (EVM), with Solidity as its primary language.</p><p>Although <strong>Starknet</strong> has opened up new possibilities for Ethereum with STARKs, its drawback is it has a different Virtual Machine<strong> (CairoVM)</strong> which requires developers to learn the Cairo programming language to be able to build on Starknet.</p><p>Thus limiting the reach of Starknet DApps and prevents them from gaining exposure to the EVM ecosystem. As an L2, Starknet’s goal is to scale Ethereum, but it’s unable to do so effectively due to the gap between the CairoVM and Ethereum Virtual Machine (EVM).</p><h3>The Kakarot zkEVM</h3><p>Kakarot zkEVM aims to bridge the gap between the CairoVM and the EVM. Developed by <a href="https://github.com/kkrt-labs">Kakarot Labs</a>, it is an EVM built using <a href="https://www.cairo-lang.org/">Cairo</a>.</p><p>With Kakarot, Starknet becomes a MultiVM environment, meaning developers can now leverage both CairoVM and EVM when building applications. <br>This capability makes Starknet EVM-compatible, removing the need for Solidity developers to learn an entirely new language to build on Starknet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nzeNJG2ngpR3eKZqGQ-Pvw.jpeg" /></figure><h4>Key Features of Kakarot zkEVM</h4><ul><li><strong>Agile and Lightweight</strong>: Built using Cairo, Kakarot separates cryptography from engineering, making it easier to audit, extend, and improve.</li><li><strong>Interoperable and Modular</strong>: Kakarot supports a MultiVM environment, allowing Solidity contracts to interact with Cairo programs and vice-versa.</li><li><strong>High Performance</strong>: Kakarot benefits from future Cairo stack upgrades, such as the upcoming release of <a href="https://github.com/starkware-libs/stwo">Stwo</a>, which will enhance ZK proof generation performance by 100–1,000x.</li></ul><p>With Kakarot, developers gain access to a world of new possibilities on Starknet without losing their existing skill set, making it a key player in the future of decentralized applications.</p><h3>Let’s write a Solidity Smart Contract using Starknet Scaffold</h3><p>The above title feels like a dream 😄 — pinch me!</p><h4>What is Starknet Scaffold?</h4><p><a href="https://www.starknetscaffold.xyz/">Starknet Scaffold</a> built by <a href="https://github.com/horuslabsio">Horus Labs</a> is a toolkit designed for developing decentralized applications (dApps) on Starknet. It includes the most popular and functional tools, ensuring you always have an up-to-date development environment,</p><p>Starknet Scaffold now supports Kakarot, making it simpler to create DApps that work with both Solidity and Cairo. You can start building your DApp using the included starter template on the Kakarot zkEVM.</p><h4>Let’s get started</h4><p>We are going to be interacting with Starknet MultiVM thanks to Kakarot in the same way you would interact with Ethereum mainnet or any other Ethereum-based chain (use Metamask, Rainbow, build with Foundry or Hardhat, etc.).</p><p><strong>Requirements<br></strong>Before we begin, ensure you have installed the following:</p><ul><li><a href="https://git-scm.com/downloads">Git</a></li><li><a href="https://nodejs.org/en/download/package-manager">Node</a></li><li><a href="https://docs.docker.com/get-started/get-docker/">Docker</a></li><li><a href="https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable">Yarn</a></li></ul><h4><strong>Setting up</strong></h4><p>Open your terminal and run the following:</p><pre>npx create-starknet-app</pre><ul><li><strong>Enter your package name:</strong> For example, kakarot-DApp</li><li><strong>Select the package type:</strong> Choose 5 for kakarot.</li><li><strong>Run the scaffold:</strong></li><li>cd kakarot-DApp</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dx0Mv5S5LTLmS9BnMtiZPg.png" /></figure><pre>npm run start-kakarot</pre><p>For this to work, you need to have your Docker running, else you would get an error.</p><p>Go ahead and run the command you would get the below in your terminal, which means kakarot is currently running on your machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlUdb8RyipJvEsZsl5woIw.png" /></figure><h4>Write and Deploy Smart Contract</h4><p>Open up the folder we scaffolded in your vscode, you will have a folder structure like the below. We have two folders that contains the smart contracts:</p><ul><li>contracts : This folder contains the Cairo smart contract.</li><li>kakarot : Contains the Solidity Smart contract.</li></ul><p>The kakarot zkEVM enhances and extends Starknet by making it a MultiVM environment, which means we can deploy the Solidity and Cairo contract to Starknet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZD18YnPtqQ5OI6lAeFdeHA.png" /></figure><p>In the package.json you would find all the available scripts you can run to make this an easy development process for you</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I2BNQEV-hHXt-s4GIgV3cw.png" /></figure><h4><strong>Step 1: Build &amp; Compile Smart Contract</strong></h4><p>This command builds and compiles the Cairo smart contracts.</p><pre>npm run build-contracts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ra0jRq6rCC592n1JLQSuXw.png" /></figure><h4><strong>Step 2: Deploy Kakarot L1 Messaging Contract</strong></h4><pre>npm run deploy-kakarot-l1-messaging-contracts-local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovZmU6MR7AbMKsQbzUUtow.png" /></figure><p>This command deploys the L1KakarotMessaging.sol and StarknetMessaging.sol contracts locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*FuAe0Gg8IgQ5S30W_mpIiQ.png" /></figure><p><strong>Contract Explanation</strong></p><ol><li>L1KakarotMessaging.sol : This contract enables communication between Layer 1 (L1) and Layer 2 (L2) by sending and receiving messages to and from contracts on Starknet (L2).</li><li>StarknetMessaging.sol : This contract manages the mechanics of message passing between Layer 1 and Layer 2 and is also responsible for maintaining message integrity, processing, and ensuring reliable communication between these two layers.</li></ol><h4>Step 3: Deploy EVM smart contract</h4><p>Let’s deploy the counter.sol contract in the example folder. Ensure your Docker is running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*6iDbxtrJ8tUPFsLiWSqRBA.png" /></figure><h4>Deploy EVM contract Locally</h4><p>Here you can find the rpc and private keys you can make use of when deploying locally.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ShwGKvBObnVmzgL_F68Qrw.png" /></figure><p>Run the below command to deploy locally:</p><pre>npm run deploy-kakarot-evm-contract --contract-path=solidity_contracts/src/examples/Counter.sol:Counter --rpc-url=http://127.0.0.1:3030 --private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tRPeKye8b3LnuQffBJV3A.png" /></figure><h4>Deploy EVM contract on Kakarot Sepolia Testnet</h4><p>Before we continue, make sure to add <a href="https://docs.kakarot.org/starknet/overview/">Kakarot Sepolia</a> to your Metamask:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTV1o67SVXJ7UoQh8Nhhjg.png" /><figcaption><a href="https://docs.kakarot.org/starknet/overview/">https://docs.kakarot.org/starknet/overview/</a></figcaption></figure><p>I would be using the <em>private key</em> in the env.example file, if you would like to use your address to deploy, you can use the private key connected to any of your Metamask addresses.</p><p>Run the below command to deploy on Kakarot Sepolia Testnet:</p><pre>npm run deploy-kakarot-evm-contract --contract-path=solidity_contracts/src/examples/Counter.sol:Counter --rpc-url=https://sepolia-rpc.kakarot.org --private-key=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yqCApQ205JyVWKesvYSVmg.png" /></figure><p>Let’s verify that the contract has been deployed using the contract address<br>0x3Aa5ebB10DC797CAC828524e59A333d0A371443c</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USA2V93futbPFaViMK6LlA.png" /></figure><h4>Interact with EVM contract function on Kakarot Sepolia Testnet</h4><p>Let’s increment the counter of the Counter.sol contract.</p><pre>cast send 0x3Aa5ebB10DC797CAC828524e59A333d0A371443c &quot;increment()&quot; --rpc-url=https://sepolia-rpc.kakarot.org --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M79Zpgz90bkGflERxhWBjQ.png" /></figure><p>Now we have successfully interacted with the increment function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NPd4Iz7ekFQwPOSSa5_vmA.png" /></figure><h4>README.md file</h4><p>Open the README.md file in the kakarot folder, it contains all the commands we have ran and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcsDJxAQqzWS_rmjP80yLA.png" /></figure><h3>In conclusion</h3><p>We have successfully deployed and interacted with our Solidity contract on the Kakarot Sepolia testnet.</p><p>In the next part of this article, we will demonstrate how to interact with a Cairo contract from within the Solidity contract. Isn’t that exciting?</p><p>The integration of Kakarot zkEVM into Starknet marks a significant step toward bridging the gap between CairoVM and the Ethereum Virtual Machine (EVM).</p><p>With the <a href="https://www.starknetscaffold.xyz/">Starknet Scaffold</a> toolkit, powered by <a href="https://github.com/horuslabsio">Horus Labs</a>, developers are provided with an efficient and streamlined process to write, deploy, and interact with smart contracts in both Solidity and Cairo.</p><p><strong>Useful Links:</strong></p><ul><li><a href="https://github.com/horuslabsio">Horus Labs</a></li><li><a href="https://github.com/kkrt-labs">Kakarot Labs</a></li><li><a href="https://www.starknetscaffold.xyz/">Starknet Scaffold</a></li><li><a href="https://docs.kakarot.org/">Kakarot zkEVM</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e4a8f70a1f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2: Build and Deploy a dApp using Starknet-Scaffold]]></title>
            <link>https://medium.com/@horuslabsio/part-2-build-and-deploy-a-dapp-using-starknet-scaffold-90f6c9094a07?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/90f6c9094a07</guid>
            <category><![CDATA[erc20-token]]></category>
            <category><![CDATA[reusable-component]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Thu, 29 Aug 2024 12:00:08 GMT</pubDate>
            <atom:updated>2024-08-30T18:13:16.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pqah9tOMRPrvezrB3ddYFg@2x.png" /></figure><h4>Build a UI that interacts with your Cairo smart contract</h4><p>In the first part of this series, we guided you through bootstrapping your dApp with <a href="https://www.starknetscaffold.xyz/">Starknet-Scaffold</a>. We covered setting up the development environment, writing a basic ERC20 token smart contract in Cairo, and deploying it to the Starknet testnet using the Scaffold Deployer.</p><p><strong>We highly recommend reading Part 1 before continuing: </strong><a href="https://medium.com/@horuslabsio/getting-started-build-and-deploy-a-dapp-using-starknet-scaffold-00c149213085">link</a>.</p><p>Now, let’s build the user interface (UI) to allow users to interact with your deployed smart contract.</p><p><strong>Building the User Interface</strong></p><p>With a functional smart contract deployed, we now need a user interface to interact with it. This UI will allow users to interact with the functions in your token contract.</p><p>Run npx create-starknet-app, follow the prompts to type in your package name and select fullstack as the type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8PxmUB79ky45lP9-Ez6VQ.png" /></figure><p>Once the setup is complete, your codebase will bear a semblance to the following structure. For this article, we’ll focus on the frontend folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*FydPmCTt_pyGh1jUVzw6dg.png" /></figure><p>Run npm install, then npm run start</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5r_WJo_GV8TYtONG1GAY7Q.png" /></figure><p>I added a folder called constant that contains the token contract ABI and another file that contains the contract address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WOrriXp_9zE940CIsPcL9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*5PS2g1Lx427M45zTYKinWQ.png" /></figure><p>Replace the code in page.tsx with the one below. <br>We have modified the code to display details about the token, such as the name, symbol, total supply, and the connected user’s balance.</p><pre>&quot;use client&quot;;<br>import NetworkSwitcher from &quot;./components/lib/NetworkSwitcher&quot;;<br>import Header from &quot;./components/internal/Header&quot;;<br>import AddTokenButton from &quot;./components/lib/AddToken&quot;;<br>import {<br>  useAccount,<br>  useContractRead<br>} from &quot;@starknet-react/core&quot;;<br>import tokenAbi from &quot;../../public/abi/token.abi.json&quot;;<br>import { address as contractAddress } from &quot;../constants/contract&quot;;<br>import { formatCurrency } from &quot;../app/components/internal/helpers&quot;;<br><br>type Props = {<br>  address: string;<br>  heading?: boolean;<br>};<br><br>export default function Home() {<br>  const { address } = useAccount();<br><br>  const { data: sstk, isLoading: sstkLoading } = useContractRead({<br>    address: contractAddress,<br>    abi: tokenAbi,<br>    functionName: &quot;balanceOf&quot;,<br>    args: [address!],<br>    watch: true,<br>  });<br><br>  const { data: totalSup, isLoading: totalSupplyLoading } = useContractRead({<br>    address: contractAddress,<br>    abi: tokenAbi,<br>    functionName: &quot;totalSupply&quot;,<br>    args: [],<br>    watch: true,<br>  });<br><br>  // @ts-ignore<br>  const bal = formatCurrency(sstk?.balance.low.toString());<br>  // @ts-ignore<br>  const supply = formatCurrency(totalSup?.totalSupply.low.toString());<br><br>  return (<br>    &lt;main className=&quot;flex min-h-svh flex-col justify-between gap-16&quot;&gt;<br>      &lt;Header /&gt;<br>      {/* HERO --&gt; */}<br>      &lt;section className=&quot;pt-[8rem] md:pt-[clamp(200px,25vh,650px)]&quot;&gt;<br>        &lt;div className=&quot;mx-auto flex max-w-[600px] flex-col gap-8 p-4 text-center md:max-w-[850px] md:p-8&quot;&gt;<br>          &lt;div className=&quot;flex items-center justify-center gap-4&quot;&gt;<br>            &lt;NetworkSwitcher /&gt;<br>            &lt;AddTokenButton /&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br>      &lt;/section&gt;<br>      {/* &lt;-- END */}<br><br>      &lt;section className=&quot;pt-[4rem]&quot;&gt;<br>        &lt;div className=&quot;mx-auto max-w-[600px] rounded-lg bg-[--link-card] p-6 shadow-lg md:max-w-[850px]&quot;&gt;<br>        &lt;h3 className=&quot;mb-6 text-xl font-semibold text-[--headings]&quot;&gt;Token Information&lt;/h3&gt;<br>        &lt;div className=&quot;grid grid-cols-2 gap-6&quot;&gt;<br>            &lt;div&gt;<br>              &lt;p className=&quot;text-lg font-semibold text-[--headings]&quot;&gt;Name:&lt;/p&gt;<br>              &lt;p className=&quot;text-lg&quot;&gt;ScaffoldToken&lt;/p&gt;<br>            &lt;/div&gt;<br>            &lt;div&gt;<br>              &lt;p className=&quot;text-lg font-semibold text-[--headings]&quot;&gt;Symbol:&lt;/p&gt;<br>              &lt;p className=&quot;text-lg&quot;&gt;SSTK&lt;/p&gt;<br>            &lt;/div&gt;<br>            &lt;div&gt;<br>              &lt;p className=&quot;text-lg font-semibold text-[--headings]&quot;&gt;Balance:&lt;/p&gt;<br>              &lt;p className=&quot;text-lg&quot;&gt;{sstkLoading ? &quot;Loading...&quot; : Number(bal).toFixed(3)} SSTK&lt;/p&gt;<br>            &lt;/div&gt;<br>            &lt;div&gt;<br>              &lt;p className=&quot;text-lg font-semibold text-[--headings]&quot;&gt;Total Supply:&lt;/p&gt;<br>              &lt;p className=&quot;text-lg&quot;&gt;{totalSupplyLoading ? &quot;Loading...&quot; : Number(supply).toFixed(3)} SSTK&lt;/p&gt;<br>            &lt;/div&gt;<br>          &lt;/div&gt;<br>        &lt;/div&gt;<br>      &lt;/section&gt;<br><br>      {/* Community --&gt; */}<br>      &lt;div className=&quot;flex w-full flex-col items-center justify-center gap-4 bg-footer-image bg-cover bg-center bg-no-repeat px-4 py-16 md:px-8&quot;&gt;<br>        &lt;div className=&quot;flex flex-col items-center gap-4&quot;&gt;<br>          &lt;img<br>            src={&quot;assets/footerLogo.svg&quot;}<br>            alt=&quot;burner banner&quot;<br>            className=&quot;mx-auto&quot;<br>          /&gt;<br>          &lt;p className=&quot;text-center text-text-tertiary&quot;&gt;<br>            Join our community to learn and build together! And please raise an<br>            issue on our Github if there&amp;apos;s a new feature you&amp;apos;ll like<br>            to see<br>          &lt;/p&gt;<br>          &lt;a href=&quot;https://t.me/+sH0ug1mZ_WtjNmM0&quot;&gt;<br>            &lt;button className=&quot;w-fit rounded-[12px] bg-background-primary-light px-12 py-3 text-accent-secondary transition-all duration-300 hover:rounded-[20px]&quot;&gt;<br>              Learn more<br>            &lt;/button&gt;<br>          &lt;/a&gt;<br>        &lt;/div&gt;<br>      &lt;/div&gt;<br>    &lt;/main&gt;<br>  );<br>}</pre><p>After updating the code, navigate to localhost:3000 in your browser to view the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a0NwVMe2SdYdgvrp77RSXg.png" /></figure><h3>Reusable Components</h3><p>There are a few reusable components that are generated for you. <br>The component folder contains several useful and customizable UI elements that can be used throughout your application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*Uds1DjBkeTj9WB54LUlgTQ.png" /></figure><p>Here’s a summary of some key components:</p><ol><li><strong>AccountBalance</strong>: This component displays the user’s account balance for ETH and STRK tokens. It uses the useContractRead hook to fetch balance information from the respective token contracts.</li><li><strong>AddressBar</strong>: This component displays the user’s Starknet address and provides functionality to copy the address and disconnect the wallet. It uses the react-blockies library to generate a unique avatar for each address.</li><li><strong>AddToken</strong>: This component allows users to add custom tokens to their wallets. It provides a form to input token details such as contract address, name, symbol, and decimals.</li><li><strong>NetworkSwitcher: </strong>This component allows users to switch between different Starknet networks (Mainnet and Sepolia). It provides a dropdown menu for network selection and handles the network switching logic.</li><li><strong>Connect</strong>: This component handles wallet connection functionality. It provides a modal with different wallet options for users to connect their Starknet wallets.</li><li><strong>NetworkSwitcher</strong>: This component allows users to switch between different Starknet networks (Mainnet and Sepolia). It provides a dropdown menu for network selection and handles the network switching logic.</li><li><strong>Transactions</strong>: This component provides a modal to display transaction history. It includes a list of transactions with details such as status, amount, and timestamp.</li><li><strong>CopyButton</strong>: A reusable button component that copies text to the clipboard and provides visual feedback.</li><li><strong>GenericModal</strong>: A reusable modal component that can be used to create various pop-up modals throughout the application.</li></ol><p>These are designed to be modular and reusable, allowing for easy integration into different parts of the application. <br>They handle common functionalities in Starknet dApps, such as wallet connection, network switching, and displaying account information.</p><p>The components make use of hooks from @starknet-react/core<strong> </strong>for interacting with the Starknet blockchain and managing wallet connections. They also utilize Tailwind CSS for styling, making it easy to customize the appearance to fit your project’s design system.</p><h3>Interact with contract using Burner Wallet</h3><p>In the first <a href="https://medium.com/@horuslabsio/getting-started-build-and-deploy-a-dapp-using-starknet-scaffold-00c149213085">part</a> of this series we created a <a href="https://app.starknetscaffold.xyz/burner">burner wallet</a>, let’s go ahead and use it to test and interact with our contract.</p><p><strong>Haven’t read </strong><a href="https://medium.com/@horuslabsio/getting-started-build-and-deploy-a-dapp-using-starknet-scaffold-00c149213085"><strong>Part 1</strong></a><strong>?</strong> Make sure you go read it to learn how to create and fund a burner wallet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Rs3niRdJjchoBnNG0HLTQ.png" /></figure><p><strong>To execute a function in your contract:</strong></p><ol><li><strong>Click the “Execute” button:</strong> This will open a modal for function execution.</li><li><strong>Provide the following information:</strong></li></ol><ul><li><strong>Contract Address</strong></li><li><strong>Function Name</strong></li><li><strong>Arguments </strong>(in array format)</li></ul><p><strong>That’s it!</strong> By following these simple steps, you can effectively use your burner wallet to test and experiment with your contract’s functionality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yI5p3kX0Cm-PiDkSxX6B0A.png" /></figure><h4>Interact with the transfer functionality</h4><p>The UI for our dApp showed that I currently have 90 SSTK in my wallet address. Let’s transfer 10 SSTK to another address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCghyRctXF9nfT9qYc4UIA.png" /></figure><p>After the transaction is successfully executed, refresh the dApp UI to see the updated balance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hhr8D7XQGMh2bn7UPqu3Wg.png" /></figure><h3>Conclusion</h3><p>Congratulations on completing the second part of our tutorial series on building and deploying a dApp using <a href="https://www.starknetscaffold.xyz/">Starknet-Scaffold</a>! <br>You’ve now created a user interface that interacts with your deployed Cairo smart contract, allowing users to view their SSTK token balance and execute contract functions directly from the UI.</p><p><a href="https://www.starknetscaffold.xyz/">Starknet Scaffold</a> is an open-source project that thrives on contributions from developers like you. Whether you’re building, testing, or suggesting new features, your involvement is crucial to the growth and improvement of the ecosystem. <br>We encourage you to join the <a href="https://t.me/+sH0ug1mZ_WtjNmM0">community</a>, contribute to the <a href="https://github.com/horuslabsio/Starknet-Scaffold">project</a>, and collaborate with other developers to push the boundaries of what’s possible in Web3.</p><p>Happy coding, and see you in the next article!</p><h4>Useful links:</h4><ul><li><a href="https://www.starknetscaffold.xyz/">Starknet Scaffold</a></li><li><a href="https://github.com/horuslabsio/Starknet-Scaffold">Starknet Scaffold Github</a></li><li><a href="https://app.starknetscaffold.xyz/scaffold-deployer">Deployer</a></li><li><a href="https://starknet-faucet.vercel.app/">Faucet</a></li><li><a href="https://app.starknetscaffold.xyz/burner">Burner</a></li><li><a href="https://app.starknetscaffold.xyz/wikipedia">Scaffold Wikipedia</a></li><li><a href="https://www.stark-utils.xyz/converter">Stark Converter</a></li><li><a href="https://app.starknetscaffold.xyz/address-book">Address Book</a></li><li><a href="https://t.me/+sH0ug1mZ_WtjNmM0">Working TG group</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90f6c9094a07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started: Build and Deploy a dApp using Starknet-Scaffold]]></title>
            <link>https://medium.com/@horuslabsio/getting-started-build-and-deploy-a-dapp-using-starknet-scaffold-00c149213085?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/00c149213085</guid>
            <category><![CDATA[cairo]]></category>
            <category><![CDATA[dojo]]></category>
            <category><![CDATA[erc20-token]]></category>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Wed, 28 Aug 2024 12:00:57 GMT</pubDate>
            <atom:updated>2024-10-09T23:47:19.203Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uz9mAIRMwXw4NNNp5Zk23Q@2x.png" /></figure><h4>Part 1: Write an ERC20 Smart Contract in Cairo</h4><p>Building dApps on Starknet can quickly become a hassle when confronted with a lot of tools with no idea of which to pick for accelerated developmen‍t.</p><p>Building and bootstrapping smart contracts and dApps on Starknet has been made easy by <a href="https://www.starknetscaffold.xyz/">Starknet-Scaffold</a>, an open-source toolkit designed to develop decentralized applications (dApps) on Starknet. This toolkit includes the most popular and functional tools, ensuring an up-to-date development environment.</p><h3>Objective</h3><p>In this two-part series, our goal is to create, and deploy an <strong>ERC20</strong> <strong>Token Smart Contract</strong> on Starknet. We’ll also be building a user interface (UI) that allows us to interact with the contract. To make the process clear, we’ll break it down into two parts:</p><ul><li><a href="https://medium.com/@horuslabsio/getting-started-build-and-deploy-a-dapp-using-starknet-scaffold-00c149213085"><strong>Part 1</strong></a>: Build the token smart contract.</li><li><a href="http://Build a UI that interacts with your Cairo smart contract"><strong>Part 2</strong></a>: Develop a user interface that interacts with the smart contract.</li></ul><p>Beyond building the dApp, we’ll explore the amazing features of Starknet-Scaffold and also provide practical demonstrations to guide you through using the:</p><ul><li><a href="https://app.starknetscaffold.xyz/scaffold-deployer"><strong>Deployer</strong></a><strong>:</strong> A tool for deploying smart contracts on testnet and mainnet.</li><li><a href="https://starknet-faucet.vercel.app/"><strong>Faucet</strong></a><strong>:</strong> Claim your Sepolia testnet tokens.</li><li><a href="https://app.starknetscaffold.xyz/burner"><strong>Burner</strong></a><strong>:</strong> For creating temporary wallets for testing during development.</li><li><a href="https://app.starknetscaffold.xyz/wikipedia"><strong>Scaffold Wikipedia</strong></a><strong>:</strong> A collection of Starknet/Cairo learning resources.</li><li><a href="https://www.stark-utils.xyz/converter"><strong>Stark Converter</strong></a><strong>:</strong> A collection of utility functions for Starknet-related conversions.</li><li><a href="https://app.starknetscaffold.xyz/address-book"><strong>Address Book</strong></a><strong>: </strong>A collection of all relevant contract addresses on Starknet.</li></ul><p>By the end of this series, you’ll have a fully functional token smart contract, a user-friendly interface to interact with it, and a solid grasp of <a href="https://www.starknetscaffold.xyz/"><strong>Starknet-Scaffold</strong> </a>— a tool that significantly accelerates your Starknet development journey.</p><h3>Let’s get started</h3><p>Before we begin, ensure you have installed the following:</p><ul><li><a href="https://nodejs.org/en/download/package-manager">Node</a></li><li><a href="https://www.rust-lang.org/tools/install">Rust</a></li><li><a href="https://git-scm.com/downloads">Git</a></li></ul><p>To get started, there are two installation methods:</p><ol><li>Using the create-starknet-app(recommended).</li><li>Cloning the repository from GitHub.</li></ol><p><strong>Method One: </strong>Using create-starknet-app (recommended)</p><p>The recommended way to get started with Starknet-Scaffold is by using create-starknet-app. This allows you to choose between different boilerplate types based on what you need for your project.</p><p>Open your terminal and run the following command:</p><pre>npx create-starknet-app </pre><p>You’ll be prompted for a project name, and a package type, enter both to proceed.</p><p>Available package types include:</p><ul><li>contract-only: For a project that requires just contract-related tools (no frontend).</li><li>fullstack: For full stack projects. Provides customizable <a href="https://docs.starknetscaffold.xyz/chapter_3.html">out-of-the-box UI</a> components.</li><li>dojo: For gaming projects which need access to the dojo stack.</li><li>debugger: For projects with need to utilize the full debugging suite.</li></ul><p>Follow the prompts:</p><ol><li><strong>Enter your package name:</strong> e.g., my-project</li><li><strong>Select the package type:</strong></li></ol><ul><li>1 for contract_only</li><li>2 for fullstack</li><li>3 for dojo</li><li>4 for debugger</li></ul><p>Once the setup is complete, navigate to the project directory</p><pre>cd my-project</pre><p><strong>Method Two: </strong>Clone repository</p><p>To get started with Starknet-Scaffold via GitHub, follow these steps:</p><ol><li>Clone the repository:</li></ol><p>Clone the Starknet-Scaffold repository from GitHub to your local machine. Open your terminal or command prompt and run the following command:</p><pre>git clone git@github.com:argentlabs/Starknet-Scaffold.git</pre><p>2. Navigate to the Project Directory</p><p>After cloning, navigate into the project directory by running:</p><pre>cd Starknet-Scaffold</pre><h4>Write ERC20 smart contract</h4><p>If you haven’t already scaffolded your project, run the create-starknet-app command, and when prompted, select the contract_only option. This setup is specifically tailored for writing and deploying smart contracts without additional front-end components.</p><p>After running the command, you’ll see a folder structure similar to the one below, which will be generated for you:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*6KkEB931ELacQDD9W2H22A.png" /></figure><p>Copy the smart contract below and paste it intolib.cairo</p><pre>mod ScaffoldToken {<br>    use openzeppelin::token::erc20::ERC20Component;<br>    use openzeppelin::token::erc20::ERC20HooksEmptyImpl;<br>    use starknet::ContractAddress;<br><br>    component!(path: ERC20Component, storage: erc20, event: ERC20Event);<br><br>    #[abi(embed_v0)]<br>    impl ERC20MixinImpl = ERC20Component::ERC20MixinImpl&lt;ContractState&gt;;<br><br>    impl ERC20InternalImpl = ERC20Component::InternalImpl&lt;ContractState&gt;;<br><br>    #[storage]<br>    struct Storage {<br>        #[substorage(v0)]<br>        erc20: ERC20Component::Storage,<br>    }<br><br>    #[event]<br>    #[derive(Drop, starknet::Event)]<br>    enum Event {<br>        #[flat]<br>        ERC20Event: ERC20Component::Event,<br>    }<br><br>    #[constructor]<br>    fn constructor(ref self: ContractState, recipient: ContractAddress) {<br>        self.erc20.initializer(&quot;ScaffoldToken&quot;, &quot;SSTK&quot;);<br><br>        self.erc20.mint(recipient, 100000000000000000000);<br>    }<br>}</pre><p>The code above, creates an ERC20 token using <a href="https://www.openzeppelin.com/">Openzeppelin’s</a> library.</p><h4>Wallet Setup</h4><p>To deploy and interact with a Cairo smart contract, you need to have the Bravoos or Argent wallet.</p><p><strong>To download:</strong></p><ul><li><a href="https://www.argent.xyz/argent-x/">Argent</a></li><li><a href="https://braavos.app/download-braavos-wallet/">Bravoos</a></li></ul><h4>Build Contract</h4><p>Run the below command in your terminal to get it ready for deployment.</p><pre>npm run build-contracts</pre><p>You would get this in the terminal, which means the build was successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4psxutKsmHl34KYmWMzo-Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZR0BqTCHzO627BkVqKSBw.png" /></figure><h3><strong>Deploying your contract</strong></h3><p>You can either choose to deploy locally using the available scripts or with the Scaffold Deployer tool. We’ll do both.</p><h4>Deploy contract using Scaffold Scripts</h4><p>To get started, we need to first create and deploy an account, then we can easily deploy contracts. Scripts have been provided to make the process a bit easier.</p><p><strong>Prepare account</strong></p><p>To prepare your account run:</p><pre>npm run prepare-account --url=https://starknet-mainnet.public.blastapi.io/rpc/v0_7 --name=scaffold scaffold</pre><p>Once completed, you should get an output like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k3daf2MPZ67O9aeS" /></figure><p><strong>Fund account</strong></p><p>You should go ahead to fund the generated profile address with enough funds necessary to deploy it. Funds can be provided in either ETH or STRK.</p><p><strong>Deploy account</strong></p><p>To deploy your account run:</p><pre>npm run deploy-account — profile=scaffold — name=scaffold — feetoken=eth — maxfee=25799552558</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rd-F-ofs61rMyPK8" /></figure><p>Once deployed you can now go ahead to declaring and deploying your smart contracts.</p><p><strong>Declare smart contract</strong></p><p>To declare your smart contract, simply run:</p><pre>npm run declare-contract — profile=scaffold — contract=ScaffoldToken — feetoken=eth</pre><p><strong>Deploy smart contract</strong></p><p>Finally, you can deploy your smart contract using the deploy-contract script:</p><pre>npm run deploy-contract — profile=scaffold — feetoken=eth — class=0x3a0db5280a152eb200ba54c530c01907910098b739737b2ecad6e75a7676f86</pre><h4>Deploy contract using Scaffold Deployer</h4><p>The scaffold deployer is a simple tool for seamlessly declaring and deploying smart contracts to Starknet testnet and mainnet.</p><p>This tools interface consists of two sections; the declare and deploy section.</p><p><strong>Declare contract section:</strong></p><ol><li><strong>Prepare Contract:</strong> Ensure you’ve ran npm run build-contracts to generate the necessary files for deployment.</li><li><strong>Access Scaffold Deployer:</strong> Go to <a href="https://app.starknetscaffold.xyz/scaffold-deployer">Scaffold Deployer</a>.</li><li><strong>Upload Contract Files:</strong> Upload the required files that were generated when we ran npm run build-contracts. You can find these files in target &gt; dev</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*To673X72YJsOXTEw0xNDRw.png" /></figure><p><strong>4. Initiate Deployment:</strong> Click the “Declare” button to start the deployment process, which would pop up the connected wallet to confirm the transaction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzHeYsJ4ws2m50bi6s_O_A.png" /></figure><p><strong>Deploy contract section:</strong></p><p>During deployment, our contract requires a specific piece of information: the recipient address for the initial token minting. This information is passed through the constructor, a special function that runs only once when the contract is created.</p><p>In our case, the constructor takes one argument: recipient. This address determines who will receive the initial supply of tokens (100000000000000000000, which is likely 1000 tokens with 18 decimals).</p><pre>#[constructor]<br>    fn constructor(ref self: ContractState, recipient: ContractAddress) {<br>        self.erc20.initializer(&quot;ScaffoldToken&quot;, &quot;SSTK&quot;);<br><br>        self.erc20.mint(recipient, 100000000000000000000);<br>    }</pre><p>Since we are still in the testing phase, it’s common practice to set the recipient address to your own wallet address during deployment. This grants you control over the initial token distribution.</p><p>However, remember to <strong>switch to the Testnet network </strong>and<strong> </strong>make sure to use your testnet wallet address, not your mainnet address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bcx2jz4qLBMYu1Cvkiu4yQ.png" /></figure><p>When you click on the deploy button, it would pop up your wallet with something like the below 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*2Sv4J74-A-YAIygPlrLTKA.png" /></figure><p>Here’s the address to the deployed token contract — <a href="https://sepolia.starkscan.co/contract/0x053ceb3448a3ad4deb1f4cb06c62df203ac0813a70a60532f9f05f2d8afb2ad7">link</a>.</p><p>You can also see here that the initial minted amount was sent to the address I passed as the recipient address during deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K5ALfc7fZYflqnzaSiNfRg.png" /></figure><h4>Set up a burner wallet</h4><p>To simplify our development, we’ll generate a burner wallet using <a href="https://app.starknetscaffold.xyz/burner"><strong>Scaffold Burner</strong></a>. This wallet is temporary and is ideal for quick testing and development purposes.</p><blockquote><strong><em>NB:</em></strong><em> Burner wallets are only available on the testnet.</em></blockquote><p><strong>Generate the Wallet</strong>: Click the <strong>“Generate new wallet”</strong> button. This will prompt your wallet to pop up, where you’ll need to sign the transaction to complete the wallet creation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbNvaCFEzWNqi5yCRZDITw.png" /></figure><p><strong>Connect Wallet</strong>: Once the burner wallet is generated, click the <strong>“Connect”</strong> button, to activate the generated burner wallet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NIHfItaZtEOysI-TG6GKwg.png" /></figure><h4>Fund burner wallet with test tokens</h4><p>Now that we have created our burner wallet, we’ll need to fund it with test tokens to cover gas fees. You can obtain these tokens via the <a href="https://starknet-faucet.vercel.app/"><strong>Starknet Faucet</strong></a>.</p><ol><li><strong>Visit the Starknet Faucet:</strong> Head over to <a href="https://starknet-faucet.vercel.app/">Starknet Faucet</a>.</li><li><strong>Enter your burner wallet address:</strong> Copy and paste your burner wallet address into the designated field. <br><strong>Important:</strong> Before submitting, ensure you add an extra 0 after the 0x prefix in your burner wallet address. For example, if your address starts with 0x, change it to 0x0. <br>This adjustment is necessary because the faucet only accepts addresses starting with 0x0; otherwise, you&#39;ll receive an &quot;invalid address&quot; error.</li><li><strong>Claim Tokens:</strong> Follow the faucet’s instructions to claim your test tokens.</li></ol><p>Once your burner wallet is funded, you’re all set. Now you can proceed to testing your smart contract!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZo16PfkKbKkr8u-Ldek8w.png" /></figure><h3>Conclusion</h3><p>We’ve successfully built and deployed an ERC20 token smart contract using <strong>Starknet-Scaffold</strong>. We walked through setting up your development environment, writing the contract in Cairo, and deploying it with the Scaffold Deployer. You’ve also learned how to create and fund a burner wallet for testing.</p><p>In the <a href="https://medium.com/@horuslabsio/part-2-build-and-deploy-a-dapp-using-starknet-scaffold-90f6c9094a07">second part</a>, we’ll focus on developing the user interface to interact with your deployed contract, making the dApp fully functional and user-friendly. Stay tuned!</p><h4>Useful links:</h4><ul><li><a href="https://medium.com/@horuslabsio/part-2-build-and-deploy-a-dapp-using-starknet-scaffold-90f6c9094a07">Part Two: Build a UI</a></li><li><a href="https://www.starknetscaffold.xyz/">Starknet Scaffold Website</a></li><li><a href="https://github.com/horuslabsio/Starknet-Scaffold">Starknet Scaffold Github</a></li><li><a href="https://app.starknetscaffold.xyz/scaffold-deployer">Deployer</a></li><li><a href="https://starknet-faucet.vercel.app/">Faucet</a></li><li><a href="https://app.starknetscaffold.xyz/burner">Burner</a></li><li><a href="https://app.starknetscaffold.xyz/wikipedia">Scaffold Wikipedia</a></li><li><a href="https://www.stark-utils.xyz/converter">Stark Converter</a></li><li><a href="https://app.starknetscaffold.xyz/address-book">Address Book</a></li><li><a href="https://t.me/+sH0ug1mZ_WtjNmM0">Working TG group</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=00c149213085" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing Tokenbound Hackathon Winners]]></title>
            <link>https://medium.com/@horuslabsio/announcing-tokenbound-hackathon-winners-af62a0909199?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/af62a0909199</guid>
            <category><![CDATA[starknet]]></category>
            <category><![CDATA[onchain-gaming]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[token-bound-account]]></category>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Mon, 05 Aug 2024 09:41:45 GMT</pubDate>
            <atom:updated>2024-08-05T09:41:45.958Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cP8fJdatMco-a7tNDNuxIw.png" /></figure><blockquote>TLDR: HorusLabs invited builders within the Starknet ecosystem to build and explore interesting use cases around Tokenbound Accounts — ERC6551 [SNIP-14]. With a prize pool of $15,000, the hackathon attracted a wave of creative and promising projects. Now, it’s time to reveal and spotlight the amazing projects that rose to the challenge.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*o0NJxgQ4u24fvH1H.gif" /><figcaption><a href="https://i.giphy.com/media/v1.Y2lkPTc5MGI3NjExOG02aDFmZnkxamJvaXR3dzAxeXA4ZXp5b2p5N2dsbXpqcTJnMHV4NiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/artj92V8o75VPL7AeQ/giphy.gif">source link</a></figcaption></figure><p>The Tokenbound Hackathon, which was held from <strong>July</strong> <strong>1st</strong> to <strong>July</strong> <strong>21st,</strong> 2024, has come to a thrilling conclusion. <br>The hackathon aimed to empower builders within the Starknet ecosystem to build and explore interesting use cases around <strong>Tokenbound Accounts</strong>.</p><p>The hackathon kicked off with a series of workshops designed to equip participants with the knowledge and tools needed to succeed. Below are details of the workshops:</p><ul><li><em>On the first day, </em><strong><em>Jayden Windle </em></strong><em>introduced Tokenbound accounts, SNIP-14, and potential use cases.</em></li><li><em>The second day featured </em><strong><em>Ademola Kelvin</em></strong><em>, who demonstrated how to build using the Typescript SDK and integrate the connectkit.</em></li><li><em>On the third day, </em><strong><em>Darlington Nnam</em></strong><em> showed how to extend the Tokenbound account for use in smart contracts.</em></li></ul><p>Following the workshops, team formation activities took place on the fourth and fifth day, allowing participants to form teams and start collaborating on their projects.</p><p>Weeks two and three were dedicated to intense building sessions, where participants focused on developing their projects</p><p>To support the participants, mentors were available throughout the hackathon to provide guidance and assistance. The mentors included Darlington Nnam, Ademola Kelvin, Elias Hezron, Okhai Omotuebe, and David Nnamdi, each offering their expertise and support.</p><p>The hackathon featured the following tracks:</p><ul><li>On-chain gaming</li><li>SocialFi</li><li>DeFi</li><li>Cross-chain interaction.</li></ul><p>With a prize pool of $15,000, the competition was fierce, and the results were impressive. The Tokenbound Hackathon not only highlighted the potential of Tokenbound Accounts but also reinforced the strength and creativity within the Starknet community.</p><p>After a thorough evaluation by our esteemed judges. The winners were selected based on the following criteria:</p><ul><li>Originality: The idea should offer a new perspective or innovatively solve a problem.</li><li>Creativity: The solution’s creativity in terms of design, functionality, and overall approach.</li><li>User Experience: The project’s design should have a good UX and a clean and intuitive user interface.</li><li>Pitch and Presentation: The project should have a quality presentation, ensuring it is clear, engaging, and well-structured.</li><li>Feasibility and Practicality: The practicality and scalability of the idea.</li></ul><p>We’re excited to <strong>announce the winners</strong> for each track based on these criteria.</p><p><a href="https://tokenbound-hackathon-bling.vercel.app/"><strong>Bling Bling</strong></a><strong> </strong>takes <strong>1st </strong>place<strong> </strong>in General and Gaming track<strong> — </strong>🏆<strong> wins $4000</strong></p><p>BLING BLING lets players mint unique Tokenbound accounts. These accounts can be traded on the marketplace or leveraged to earn BLING through gameplay, allowing players to climb the ranks and progress within the game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FmY3QKuVbkYBOqQm9DJyCg.png" /></figure><p><a href="https://unix-tba.vercel.app/"><strong>Unix</strong></a> takes <strong>1st </strong>place<strong> </strong>in DeFi and <strong>2nd </strong>in General track<strong> — </strong>🏆<strong> wins $2000</strong></p><p>Unix is designed to streamline the management and tracking of token-bound accounts across multiple blockchain networks, offering a comprehensive multi-chain solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*daK834EqmhHIzv-gaoA6fQ.png" /></figure><p><a href="https://runaways-azure.vercel.app/"><strong>Runaway</strong></a> takes <strong>2nd </strong>in Gaming and <strong>3rd</strong> in General track<strong> — </strong>🏆<strong> wins $1500</strong></p><p>Runaways combines the thrill of evading capture with the excitement of collecting and growing unique digital assets. A tokenbound account is created for each player to store and manage their gaming assets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*my4YWi8MG3pvfpOrFTeP9w.png" /></figure><p><a href="https://token-giver-7u11.vercel.app/"><strong>Tokengiver</strong></a> takes <strong>1st </strong>place<strong> </strong>in <strong>SocialFi</strong> track<strong> — </strong>🏆<strong> wins $1000</strong></p><p>Token Giver is designed to revolutionize charity and fundraising. Users can create and manage campaigns by minting unique campaign NFTs, which have Token Bound Accounts (TBA) deployed on them automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*04baYxJCddVPdVxWKs5oKg.png" /></figure><p><a href="https://crowdpass.vercel.app/"><strong>CrowdPass</strong></a> takes <strong>2nd </strong>place<strong> </strong>in <strong>SocialFi</strong> track<strong> — </strong>🏆<strong> wins $750</strong></p><p>CrowdPass empowers organizers to effortlessly create and manage event tickets while providing attendees with a seamless experience for purchasing, selling, and reclaiming their tickets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8rK3dnvUWayhpsuPAqasQg.png" /></figure><p><a href="https://tba-marketplace2.vercel.app/"><strong>TBA marketplace</strong></a> takes <strong>2nd </strong>place<strong> </strong>in DeFi track<strong> — </strong>🏆<strong> wins $750</strong></p><p>TBA marketplace ensures a secure, efficient, and user-friendly experience for both sellers and buyers, enabling seamless transactions and asset transfers. between sellers and buyers of Token Bound Account (TBA).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g8f4oQpTG_ZGTTVlQPjEfw.png" /></figure><p><a href="https://ccnfts.vercel.app/"><strong>CCNFTs</strong></a> takes <strong>3rd</strong> place<strong> </strong>in Gaming track<strong> — </strong>🏆<strong> wins $750</strong></p><p>CCNFTs transforms AI blockchain gaming with NFT-embedded chess. Each move is recorded on the blockchain, creating a verifiable and immutable gameplay record. Rewards are linked to your moves, introducing a new play-to-earn model and every move mints a unique NFT chessboard, giving you ownership of your gameplay.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ldQnPSBTI9cxAXD8Z6wqTw.png" /></figure><h4>Conclusion</h4><p>Huge thanks to OnlyDust, Starknet Foundation, Starknet Africa, Blockheader, Web3Bridge, Aya, and Guild Audits for their support.</p><p>Thanks also to our amazing judges, mentors, and participants for all your enthusiasm and hard work.</p><p>Tokenbound V3 is set to be released in the coming months, bringing better compatibility with existing Ethereum specs. It will feature an advanced connector and development kit, along with an improved UI for the <a href="https://tbaexplorer.com/">explorer</a>. Join our Telegram group <a href="https://t.me/starknet_tokenbound">here</a> to stay updated on new features and releases!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af62a0909199" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Tokenbound Accounts on Starknet]]></title>
            <link>https://medium.com/@horuslabsio/introducing-tokenbound-accounts-on-starknet-6a16aa614181?source=rss-8950c0415971------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a16aa614181</guid>
            <dc:creator><![CDATA[Horus Labs]]></dc:creator>
            <pubDate>Mon, 17 Jun 2024 17:47:25 GMT</pubDate>
            <atom:updated>2024-06-18T11:59:29.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vgukVdPnKKk_Z34BnfoD8g.png" /></figure><p>Non-fungible tokens (NFTs) are evolving beyond static images and collectibles. They are becoming dynamic assets with the potential to act as powerful tools within the blockchain ecosystem.<br>Token Bound Accounts (<strong>TBAs</strong>) unlock this potential, transforming our Non-fungible tokens(NFTs) into Smart Accounts.</p><h3>From JPEGs ==&gt; NFTs ==&gt; Accounts</h3><p>NFTs are now much more than something you buy and sell.<br>They can be an on-chain medium which transactions go through, and we can do much more with them:-</p><ul><li>NFTs can be more than just assets that sit in our wallets.</li><li>They can own assets.</li><li>They can be used to change state and take action.</li><li>They can be used to claim assets like airdrops.</li><li>They can serve as an on-chain identity.</li></ul><h3>What are Token Bound Accounts (TBAs)?</h3><p>A Tokenbound Account is your NFT bound to an account.<br><strong>Imagine</strong> your <strong>NFT as </strong>a regular account (EOA), that can execute transactions, hold assets (ERC20, ERC1155, ERC721s etc) and interact with decentralized applications (dApps).</p><p>Thanks to the backward compatibility of ERC6551, Tokenbound accounts can be created from not just new NFTs, but existing NFTs too.</p><h3>Where it all started</h3><p>We can’t discuss TBAs without mentioning <a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md"><strong>ERC-6551</strong></a>, the proposed Standard for creating Token Bound Accounts.</p><p>While <a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md"><strong>ERC-6551</strong></a><strong> </strong>laid the groundwork, Starknet, a Layer-2 scaling solution for Ethereum, presented a unique challenge due to its different architecture. To address this, our team at <a href="https://github.com/horuslabsio"><strong>Horus Labs</strong></a><strong> </strong>proposed <a href="https://github.com/horuslabsio/SNIPs/blob/main/SNIPS/snip-14.md"><strong>SNIP-14</strong></a>, a standard inspired by <a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md"><strong>ERC-6551</strong></a> but specifically designed for Starknet. This allows developers to leverage TBAs on Ethereum (L1) and Starknet.</p><p>Note that this proposer requires no changes or modifications to the original ERC-721 Token Standard. It’s simply your NFT, but with superpowers! Cool, right?</p><h3>How it Works</h3><p><a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md"><strong>ERC-6551</strong></a><strong> </strong>defines a canonical registry responsible for deploying smart accounts for an NFT.<br>The account that owns the NFT a.k.a (<em>“parent account”</em>), would automatically have control over the assets in the deployed TBA and is solely responsible for executing transactions through the TBA.</p><h3>How do I Transfrom my NFT to a TBA?</h3><p>Our team at <a href="https://github.com/horuslabsio"><strong>Horus Labs</strong></a><strong> created an explorer that can be used to deploy Tokenbound Accounts for your existing NFTs and track, manage,</strong> <strong>and interact with them.</strong></p><p><strong>Walkthrough Demo:</strong></p><p>This guide will walk you through deploying and activating a Token Bound Account (TBA) on Starknet.</p><p>Here’s a <a href="https://www.tbaexplorer.com/">link</a> to the explorer.</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/StarkNetAfrica/status/1782379983488311776%3Fref_src%3Dtwsrc%255Etfw%257Ctwcamp%255Etweetembed%257Ctwterm%255E1782379983488311776%257Ctwgr%255E65c00078fbf0e98f47430387d76c45e7500b7a61%257Ctwcon%255Es1_%26ref_url%3Dhttps%253A%252F%252Fcdn.embedly.com%252Fwidgets%252Fmedia.html%253Ftype%253Dtext2Fhtmlkey%253Da19fcc184b9711e1b4764040d3dc5c07schema%253Dtwitterurl%253Dhttps3A%252F%252Fx.com%252FStarkNetAfrica%252Fstatus%252F1782379983488311776image%253D&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/f30b0e052a4469d24baedc6761edad58/href">https://medium.com/media/f30b0e052a4469d24baedc6761edad58/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GS20owT1JTc6lYE8.png" /></figure><h3>Step 1 ==&gt; Connect your wallet to view your existing NFTs:</h3><p>Connect your Argent/Braavos wallet, then click on the “My NFTs” button. This will take you to a page displaying all the NFTs associated with your account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E7fOc_fa_sjqbUR4.png" /></figure><h3>Step 2 ==&gt; Bringing your NFT to Life:</h3><p>The process of activating a TBA for your NFT is quite straightforward.</p><ol><li>Select the <strong>NFT</strong> you wish to transform into a <strong>TBA</strong>:<br>A tokenbound account address has been precalculated for your NFT, but you’ll need to deploy the account to use it.</li><li>Click on the <strong>“Deploy Account”</strong> button: This deploys the tokenbound account for your NFT.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YDpd2HiUvezC5yOH.png" /></figure><h3>Step 3 ==&gt; What happens during and after deployment:</h3><p>When we click on the “<strong>Deploy Account</strong>” button, we interact with a function called create_account. This function requires specific inputs and generates an output indicating the operation’s success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*FBcg67JbgSf3Fit1.png" /></figure><ol><li><strong>Inputs:</strong></li></ol><ul><li><strong>implementation_hash:</strong> This represents the class hash of the account to be deployed.</li><li><strong>token_contract:</strong> The contract address of our NFT.</li><li><strong>token_id:</strong> The token ID of our NFT.</li><li><strong>salt:</strong> This random value enforces the uniqueness of our TBA’s address. It ensures that multiple TBAs can be deployed for the same NFT.</li></ul><p><strong>2. Output:</strong></p><p>call create_account(`implementation_hash,` token_contract, token_id, salt) -&gt; 0x161d…3fa6</p><ul><li>The function returns a unique address for our newly created TBA, typically represented by a long string of hexadecimal characters (e.g., 0x161d…3fa6). This address acts as the public identifier for our NFT wallet and is crucial for interacting with other accounts and dApps.</li></ul><h3>Funding your Token Bound Accounts (TBAs):</h3><blockquote>Your Token Bound Account can hold any asset of your choice. Thanks to addresses being precalculated, your accounts can be funded even when not deployed.</blockquote><p>To fund your Token Bound Account:</p><ol><li><strong>Locate Your TBA Address:</strong> Like any other wallet, your TBA has a unique address. You’ll typically find this address displayed within the platform you used to create the TBA.</li><li><strong>Transferring Assets:</strong> With the TBA address in hand, you can initiate a transfer of any compatible asset from your existing wallet (like Braavos or Argent). This could include fungible tokens (ERC-20 tokens, stablecoins) or other NFTs.</li></ol><p><strong>Important Note:</strong> Avoid sending the NFT that controls the Token Bound Account (TBA) back to the TBA itself. This will avoid creating an ownership loop where the TBA owns itself.</p><h3>Real-World and Practical Use Cases of Token Bound Accounts (TBAs)</h3><p>Token Bound Accounts (TBAs) represent a significant innovation in the blockchain space.<br>Let’s delve into some real-life and practical use cases that showcase the potential of TBAs:</p><p><strong>1. Enhanced Gaming Experiences:</strong></p><ul><li><strong>In-game Inventories and Characters:</strong> TBAs can function as backpacks or inventories for in-game characters. Players can hold various NFT items like weapons, armor, or cosmetic accessories within their TBA. This enables a more immersive experience where characters can collect and manage their digital belongings.</li><li><strong>Evolving Characters:</strong> TBAs can facilitate the development of characters that grow and evolve. By acquiring specific NFTs and storing them within the TBA, characters can unlock new abilities or appearances. This creates a deeper connection between players and their in-game assets.</li><li><strong>Playable NFTs:</strong> TBAs pave the way for the creation of “network playable characters” (NPCs) in the metaverse and gaming platforms. These NFTs can be assigned TBAs, allowing them to interact with the environment, hold assets, and perform on-chain actions, further enriching the virtual world.</li></ul><p><strong>2. Streamlined NFT Management:</strong></p><ul><li><strong>Consolidated Ownership:</strong> TBAs can act as central hubs for managing NFT collections. Users can hold multiple NFTs within a single TBA, simplifying organization and tracking of their digital assets. This eliminates the need to juggle numerous wallet addresses.</li><li><strong>Conditional Access and Permissions:</strong> TBAs can be programmed to grant specific permissions or access based on the NFTs they hold. For example, the owner of a TBA containing a specific “warrior NFT” would be granted access to a special PvP (player-versus-player) arena within the game.</li></ul><p><strong>3. Decentralized Applications (dApps) and DAOs:</strong></p><ul><li><strong>Membership Management:</strong> TBAs can be used for membership management within DAOs (Decentralized Autonomous Organizations). Owning a specific DAO governance token within your TBA could automatically grant voting rights and access to exclusive DAO features.</li><li><strong>Conditional dApp Access:</strong> dApps can leverage TBAs to control user access based on specific NFT ownership. This allows for tiered access systems within applications, rewarding users who hold specific NFTs with additional features or functionalities.</li><li><strong>Streamlined On-chain Interactions:</strong> TBAs can simplify interactions with dApps. Users can streamline complex on-chain actions without managing multiple wallet addresses or tokens by holding the necessary NFTs or fungible tokens within the TBA.</li></ul><p><strong>5. Real-World Asset Tokenization:</strong></p><ul><li><strong>Securely Storing Fractional Ownership:</strong> TBAs can be used to manage the ownership of tokenized real-world assets. NFTs can represent fractional ownership of real estate or artwork, and the corresponding TBAs can securely hold these NFTs, ensuring transparency and security in ownership management.</li><li><strong>Dynamic Access Control:</strong> TBAs can be programmed to grant access rights based on the NFTs they hold. For instance, owning a fractional ownership NFT within a TBA could grant access to a property or exclusive events related to the underlying asset.</li></ul><h3>This is just the beginning!</h3><p>As the TBA ecosystem evolves, we can expect even more groundbreaking applications to emerge. However, this progress hinges on a collaborative effort from the blockchain community. We invite developers, entrepreneurs, and enthusiasts to join the movement:</p><ul><li><strong>Developers:</strong> Explore the potential of TBAs by building innovative applications that leverage their unique capabilities.</li><li><strong>Entrepreneurs:</strong> Identify real-world problems TBAs can solve and develop solutions that empower users and reshape industries.</li><li><strong>Enthusiasts:</strong> Spread awareness about TBAs and contribute to the ongoing conversation by sharing your ideas and feedback.</li></ul><p>To foster and explore innovative ideas, we are organizing the Token Bound Hackathon, with a total prize pool of <strong>15k$</strong> to be won! Join the <a href="https://t.me/starknet_tokenbound">working group</a> for more information on the hackathon.</p><p>By working together, we can unlock TBAs&#39; full potential and usher in a new era of secure, seamless, and user-friendly blockchain interactions. Let’s join forces and build a future where TBAs become a cornerstone of a thriving and interconnected blockchain ecosystem.</p><h3>Additional Resources</h3><ul><li><a href="https://sneaky-angelfish-80f.notion.site/Tokenbound-Hackathon-40d500accefd4dd490be2eca57a1be2b">Tokenbound Hackathon</a> — <strong>$15000</strong> pool price.</li><li><a href="https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md">ERC6551</a> — Official EIP Proposal.</li><li><a href="https://github.com/horuslabsio/SNIPs/blob/main/SNIPS/snip-14.md">SNIP14</a> — Official SNIP Proposal.</li><li><a href="https://www.tbaexplorer.com/">Tokenbound Explorer UI</a>.</li><li><a href="https://tokenbound.gitbook.io/starknet-tokenbound">Documentation</a> — Official Starknet Tokenbound.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a16aa614181" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>