<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ankit Sharma</title>
    <description>The latest articles on Forem by Ankit Sharma (@ankit_sharma333).</description>
    <link>https://forem.com/ankit_sharma333</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1790666%2F00e0dbaf-2022-4adc-b03c-af00a0b5bd3e.jpg</url>
      <title>Forem: Ankit Sharma</title>
      <link>https://forem.com/ankit_sharma333</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ankit_sharma333"/>
    <language>en</language>
    <item>
      <title>Product Authenticator Using :Stellar Blockchain Technology</title>
      <dc:creator>Ankit Sharma</dc:creator>
      <pubDate>Sun, 11 Aug 2024 12:44:26 +0000</pubDate>
      <link>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-7mb</link>
      <guid>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-7mb</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/stellar"&gt;Build Better on Stellar: Smart Contract Challenge &lt;/a&gt;: Build a dApp&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Protecting Medicine Supply Chains with Blockchain:&lt;/strong&gt;&lt;br&gt;
Our dApp is designed to keep the supply chain safe and transparent, especially in the medical field. Here's how it works:&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Verified Supply Chain Steps&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Track Every Stage:&lt;/strong&gt; Every step of a product's journey—from manufacturing to delivery—is recorded on the blockchain.&lt;br&gt;
&lt;strong&gt;Immutable Records:&lt;/strong&gt; Once data is added, it can't be changed, ensuring that the information is reliable and trustworthy.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Preventing Counterfeit Medicines&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Stop Fake Products:&lt;/strong&gt;&lt;/em&gt; By verifying each step, we help ensure that only genuine medicines reach the market.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Safeguard Patient Health:&lt;/strong&gt;&lt;/em&gt; This reduces the risk of patients receiving counterfeit or unsafe products.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Empowering Supply Chain Authorities&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Real-Time Monitoring:&lt;/strong&gt;&lt;/em&gt; Authorities can monitor the supply chain in real-time, making it easier to spot and address issues.&lt;br&gt;
&lt;strong&gt;Enhanced Control:&lt;/strong&gt; With complete transparency, the entire supply chain can be managed more effectively, ensuring the integrity of the process.&lt;/p&gt;

&lt;p&gt;This approach not only protects patients but also strengthens trust in the medical supply chain by using blockchain technology to ensure authenticity and safety.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The Demo for my project is ==&amp;gt; &lt;a href="https://dev.to/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-5g3e"&gt;here&lt;/a&gt; :&lt;br&gt;
Click on the above link , their i have given a brief summary of my style of code and all approaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;The link for my dapp repo is ==&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://github.com/Ankitsharma2023/volatile&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65n0je39a3qybki7o5n5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F65n0je39a3qybki7o5n5.png" alt="Image description" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07368k8r9rpluu78sg6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07368k8r9rpluu78sg6w.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04aim2249cv7nxutyxfd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F04aim2249cv7nxutyxfd.png" alt="Image description" width="632" height="877"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;h3&gt;Research and Development Process:&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Studied Blockchain Solutions:&lt;/strong&gt; Delved into blockchain technology, focusing on how it can enhance supply chain transparency and security, particularly in the medical field.&lt;br&gt;
&lt;strong&gt;Explored Stellar's Capabilities:&lt;/strong&gt; Focused on the Stellar network, understanding its strengths and how it can be leveraged for secure, immutable tracking of product journeys.&lt;br&gt;
&lt;strong&gt;Experimented with Smart Contracts:&lt;/strong&gt; Built and tested smart contracts on the Stellar testnet to ensure accurate and secure recording of each stage in the production process.&lt;br&gt;
&lt;strong&gt;Analyzed Supply Chain Needs:&lt;/strong&gt; Researched the common pain points in medical supply chains to design a solution that addresses real-world challenges.&lt;br&gt;
&lt;strong&gt;Developed a Step-by-Step Approach:&lt;/strong&gt; Created a methodical plan for developing the dApp, starting from basic tracking features to more complex functionalities, like real-time monitoring.&lt;br&gt;
&lt;strong&gt;Crafted and Refined the dApp:&lt;/strong&gt; Focused on making the application user-friendly while ensuring it meets the stringent security and transparency needs of the medical sector.&lt;/p&gt;

&lt;h3&gt;Motivation&lt;/h3&gt;

&lt;p&gt;My primary motivation came from recognizing the critical need to secure the medical supply chain in my region. This inspired me to build a solution that not only tracks the production stages of medicines but also prevents the distribution of counterfeit products, protecting patient health.&lt;/p&gt;

&lt;h3&gt;Learnings&lt;/h3&gt;

&lt;p&gt;Through this project, I gained deeper insights into:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stellar's Blockchain Capabilities:&lt;/strong&gt; Understanding how Stellar can be utilized for transparent and secure tracking.&lt;br&gt;
&lt;strong&gt;Supply Chain Management:&lt;/strong&gt; Best practices for integrating blockchain into supply chain operations.&lt;br&gt;
&lt;strong&gt;Implementing Security in dApps:&lt;/strong&gt; The importance of safeguarding data and ensuring authenticity in every transaction.&lt;br&gt;
&lt;strong&gt;User-Centered Design:&lt;/strong&gt; The value of creating a solution that is both effective and easy to use for all stakeholders in the supply chain.&lt;/p&gt;

&lt;h3&gt;Experience with the Ecosystem&lt;/h3&gt;

&lt;p&gt;Working with Stellar’s ecosystem was a rewarding experience. The platform’s emphasis on security and transparency, combined with its efficiency, made it an ideal choice for developing this dApp. The ability to use smart contracts through Stellar enabled us to create a robust and trustworthy system for tracking medicine production.&lt;/p&gt;

&lt;h3&gt;Particularly Proud Of&lt;/h3&gt;

&lt;p&gt;I'm particularly proud of how this dApp simplifies a complex process, making it accessible and beneficial to all involved in the medical supply chain. It not only tackles the issue of counterfeit medicines but also provides a reliable tool for maintaining the integrity of the supply process.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Expand the dApp’s Capabilities:&lt;/strong&gt; Adding more advanced features like predictive analytics and cross-chain integrations.&lt;br&gt;
&lt;strong&gt;Create Educational Content:&lt;/strong&gt; Developing guides and tutorials to help others understand and build on similar solutions.&lt;br&gt;
&lt;strong&gt;Contribute to the Stellar Community:&lt;/strong&gt; By sharing knowledge and helping other developers, I hope to foster a stronger community around blockchain solutions in the medical sector.&lt;br&gt;
&lt;strong&gt;QR Code Scanning:&lt;/strong&gt; Users can scan the QR code on a product to access its complete history.&lt;br&gt;
&lt;strong&gt;A more modern and user friendly UI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This dApp represents a significant step forward in securing the medical supply chain, and I’m excited to continue building on this foundation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Video for my application is :-&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Prize Categories: Glorious Game and/or Super Sustainable&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>stellarchallenge</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Product Authenticator Using :Stellar Blockchain Technology</title>
      <dc:creator>Ankit Sharma</dc:creator>
      <pubDate>Sun, 11 Aug 2024 12:44:25 +0000</pubDate>
      <link>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-4n4j</link>
      <guid>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-4n4j</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/stellar"&gt;Build Better on Stellar: Smart Contract Challenge &lt;/a&gt;: Build a dApp&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Protecting Medicine Supply Chains with Blockchain:&lt;/strong&gt;&lt;br&gt;
Our dApp is designed to keep the supply chain safe and transparent, especially in the medical field. Here's how it works:&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Verified Supply Chain Steps&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Track Every Stage:&lt;/strong&gt; Every step of a product's journey—from manufacturing to delivery—is recorded on the blockchain.&lt;br&gt;
&lt;strong&gt;Immutable Records:&lt;/strong&gt; Once data is added, it can't be changed, ensuring that the information is reliable and trustworthy.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Preventing Counterfeit Medicines&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Stop Fake Products:&lt;/strong&gt;&lt;/em&gt; By verifying each step, we help ensure that only genuine medicines reach the market.&lt;br&gt;
&lt;em&gt;&lt;strong&gt;Safeguard Patient Health:&lt;/strong&gt;&lt;/em&gt; This reduces the risk of patients receiving counterfeit or unsafe products.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Empowering Supply Chain Authorities&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;Real-Time Monitoring:&lt;/strong&gt;&lt;/em&gt; Authorities can monitor the supply chain in real-time, making it easier to spot and address issues.&lt;br&gt;
&lt;strong&gt;Enhanced Control:&lt;/strong&gt; With complete transparency, the entire supply chain can be managed more effectively, ensuring the integrity of the process.&lt;/p&gt;

&lt;p&gt;This approach not only protects patients but also strengthens trust in the medical supply chain by using blockchain technology to ensure authenticity and safety.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a41mu7niborjwdelwkw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6a41mu7niborjwdelwkw.png" alt="Image description" width="800" height="781"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;The Demo for my project is &lt;a href="https://dev.to/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-5g3e"&gt;here&lt;/a&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuub70wu5ew8my3cd297z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuub70wu5ew8my3cd297z.png" alt="Image description" width="632" height="877"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;The link for my dapp repo is ==&amp;gt; &lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://github.com/Ankitsharma2023&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07368k8r9rpluu78sg6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F07368k8r9rpluu78sg6w.png" alt="Image description" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;h3&gt;Research and Development Process:&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Studied Blockchain Solutions:&lt;/strong&gt; Delved into blockchain technology, focusing on how it can enhance supply chain transparency and security, particularly in the medical field.&lt;br&gt;
&lt;strong&gt;Explored Stellar's Capabilities:&lt;/strong&gt; Focused on the Stellar network, understanding its strengths and how it can be leveraged for secure, immutable tracking of product journeys.&lt;br&gt;
&lt;strong&gt;Experimented with Smart Contracts:&lt;/strong&gt; Built and tested smart contracts on the Stellar testnet to ensure accurate and secure recording of each stage in the production process.&lt;br&gt;
&lt;strong&gt;Analyzed Supply Chain Needs:&lt;/strong&gt; Researched the common pain points in medical supply chains to design a solution that addresses real-world challenges.&lt;br&gt;
&lt;strong&gt;Developed a Step-by-Step Approach:&lt;/strong&gt; Created a methodical plan for developing the dApp, starting from basic tracking features to more complex functionalities, like real-time monitoring.&lt;br&gt;
&lt;strong&gt;Crafted and Refined the dApp:&lt;/strong&gt; Focused on making the application user-friendly while ensuring it meets the stringent security and transparency needs of the medical sector.&lt;/p&gt;

&lt;h3&gt;Motivation&lt;/h3&gt;

&lt;p&gt;My primary motivation came from recognizing the critical need to secure the medical supply chain in my region. This inspired me to build a solution that not only tracks the production stages of medicines but also prevents the distribution of counterfeit products, protecting patient health.&lt;/p&gt;

&lt;h3&gt;Learnings&lt;/h3&gt;

&lt;p&gt;Through this project, I gained deeper insights into:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stellar's Blockchain Capabilities:&lt;/strong&gt; Understanding how Stellar can be utilized for transparent and secure tracking.&lt;br&gt;
&lt;strong&gt;Supply Chain Management:&lt;/strong&gt; Best practices for integrating blockchain into supply chain operations.&lt;br&gt;
&lt;strong&gt;Implementing Security in dApps:&lt;/strong&gt; The importance of safeguarding data and ensuring authenticity in every transaction.&lt;br&gt;
&lt;strong&gt;User-Centered Design:&lt;/strong&gt; The value of creating a solution that is both effective and easy to use for all stakeholders in the supply chain.&lt;/p&gt;

&lt;h3&gt;Experience with the Ecosystem&lt;/h3&gt;

&lt;p&gt;Working with Stellar’s ecosystem was a rewarding experience. The platform’s emphasis on security and transparency, combined with its efficiency, made it an ideal choice for developing this dApp. The ability to use smart contracts through Stellar enabled us to create a robust and trustworthy system for tracking medicine production.&lt;/p&gt;

&lt;h3&gt;Particularly Proud Of&lt;/h3&gt;

&lt;p&gt;I'm particularly proud of how this dApp simplifies a complex process, making it accessible and beneficial to all involved in the medical supply chain. It not only tackles the issue of counterfeit medicines but also provides a reliable tool for maintaining the integrity of the supply process.&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Expand the dApp’s Capabilities:&lt;/strong&gt; Adding more advanced features like predictive analytics and cross-chain integrations.&lt;br&gt;
&lt;strong&gt;Create Educational Content:&lt;/strong&gt; Developing guides and tutorials to help others understand and build on similar solutions.&lt;br&gt;
&lt;strong&gt;Contribute to the Stellar Community:&lt;/strong&gt; By sharing knowledge and helping other developers, I hope to foster a stronger community around blockchain solutions in the medical sector.&lt;br&gt;
&lt;strong&gt;QR Code Scanning:&lt;/strong&gt; Users can scan the QR code on a product to access its complete history.&lt;br&gt;
&lt;strong&gt;A more modern and user friendly UI.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This dApp represents a significant step forward in securing the medical supply chain, and I’m excited to continue building on this foundation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Additional Prize Categories: Glorious Game and/or Super Sustainable&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>stellarchallenge</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
    <item>
      <title>Product authenticator using :Stellar Blockchain Technology</title>
      <dc:creator>Ankit Sharma</dc:creator>
      <pubDate>Sun, 11 Aug 2024 12:23:19 +0000</pubDate>
      <link>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-5g3e</link>
      <guid>https://forem.com/ankit_sharma333/product-authenticator-using-stellar-blockchain-technology-5g3e</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ik57dl65d6gzrqpyu84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ik57dl65d6gzrqpyu84.png" alt="Image description" width="800" height="372"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;A) Environment Setup:&lt;/strong&gt;&lt;br&gt;
Install Rust, using command:&lt;br&gt;
 &lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install the Soroban CLI using below mentioned command. &lt;br&gt;
&lt;code&gt;cargo install --locked soroban-cli&lt;/code&gt;&lt;br&gt;
For more info visit =&amp;gt; &lt;a href="https://developers.stellar.org/docs/build/smart-contracts/overview" rel="noopener noreferrer"&gt;Soroban docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install&lt;a href="https://nodejs.org/en" rel="noopener noreferrer"&gt; Node.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get the &lt;a href="https://www.freighter.app/" rel="noopener noreferrer"&gt;Freighter Wallet&lt;/a&gt; extension for you browser. Once enabled, then got to the network section and connect your wallet to the testnet.&lt;/p&gt;

&lt;p&gt;Install wasm32-unknown-unknown package using command: &lt;br&gt;
&lt;code&gt;rustup target add wasm32-unknown-unknown&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To configure your CLI to interact with Testnet, run the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban network add \&lt;br&gt;
  --global testnet \&lt;br&gt;
  --rpc-url https://soroban-testnet.stellar.org:443 \&lt;br&gt;
  --network-passphrase "Test SDF Network ; September 2015"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In order to deploy the smartcontract you will need an account. You can either use the an account from the&lt;code&gt;Freighter Wallet&lt;/code&gt;or can configure an account named &lt;code&gt;alice&lt;/code&gt; in the testnet using the command: &lt;br&gt;
&lt;code&gt;soroban keys generate --global alice --network testnet&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can see the public key of account &lt;code&gt;alice&lt;/code&gt;:&lt;code&gt;soroban keys address alice&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68t8d3uznnua63w5q6ef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F68t8d3uznnua63w5q6ef.png" alt="Image description" width="800" height="781"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;B) Backend (Smart-contract) Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code for your freighter wallet is as follow :&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {
  requestAccess,
  signTransaction,
  setAllowed,
} from "@stellar/freighter-api";

async function checkConnection() {
  const isAllowed = await setAllowed();
  if (isAllowed) {
    return isAllowed;
  }
}

const retrievePublicKey = async () =&amp;gt; {
  let publicKey = "";
  let error = "";
  try {
    publicKey = await requestAccess();
  } catch (e) {
    error = e;
  }
  if (error) {
    return error;
  }
  return publicKey;
};

const userSignTransaction = async (xdr, network, signWith) =&amp;gt; {
  let signedTransaction = "";
  let error = "";

  try {
    signedTransaction = await signTransaction(xdr, {
      network,
      accountToSign: signWith,
    });
  } catch (e) {
    error = e;
  }

  if (error) {
    return error;
  }

  return signedTransaction;
};

export { checkConnection, retrievePublicKey, userSignTransaction };

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;Smart-contract folder Structure:&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;smart-contract&lt;br&gt;
        ├── Cargo.lock&lt;br&gt;
        ├── Cargo.toml&lt;br&gt;
        ├── README.md&lt;br&gt;
        └── contracts&lt;br&gt;
            └── Gate-Pass-Dapp&lt;br&gt;
                ├── Cargo.toml&lt;br&gt;
                └── src&lt;br&gt;
                    └── lib.rs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt; Go inside the &lt;code&gt;/smart-contract&lt;/code&gt; directory and do the below mentioned steps:&lt;/p&gt;

&lt;p&gt;Build the contract:&lt;br&gt;
soroban contract build&lt;/p&gt;

&lt;p&gt;Alternte command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cargo build --target wasm32-unknown-unknown --release&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Install Optimizer:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cargo install --locked soroban-cli --features opt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Build an Opmize the contract:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban contract optimize --wasm target/wasm32-unknown-unknown/release/Gate_Pass_Dapp.wasm&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to the Deploy smart-contract on testnet:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Get the hash of the Wasm bytes, like &lt;/p&gt;

&lt;p&gt;&lt;code&gt;4bb69f6355400b2954f9537ec55cd24c4a0a3021eae95758a088b383587657cb&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;using this command:&lt;br&gt;
&lt;code&gt;soroban contract install --source-account bhupendra --wasm target/wasm32-unknown-unknown/release/Gate_Pass_Dapp.wasm --rpc-url https://soroban-testnet.stellar.org:443 --network-passphrase "Test SDF Network ; September 2015"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;By using that Wasm hash, deploy the smartcontract on the testnet and get deployed address of the smartcontract using the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban contract deploy \&lt;br&gt;
  --wasm-hash 4bb69f6355400b2954f9537ec55cd24c4a0a3021eae95758a088b383587657cb \&lt;br&gt;
  --source alice \&lt;br&gt;
  --network testnet&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Deployed address of this smartcontract:&lt;br&gt;
 &lt;code&gt;CBPSRM3TVRYA6PT7ESIXC64QZDTKIQNSKBYJ4CED64CN2OITETB67X2P&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*NOTE: If you get the XDR Error error: xdr processing error: xdr value invalid, then follow this article.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The code for Header.js file is as follow:-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useEffect, useState } from "react";
import { checkConnection, retrievePublicKey } from "./Freighter";
import StellarLogo from "../assets/stellarlogo.png"

const Header = ({setPubKey}) =&amp;gt; {
  const [connect, getConnected] = useState("Connect");
  const [publickey, getPublicKey] = useState("");
  const [open, setOpen] = useState(false);

  const handleOpenMenu = () =&amp;gt; setOpen(!open);

  useEffect(() =&amp;gt; {
    if (publickey !== "") {
      getConnected("Connected!");
      setPubKey(publickey);
    }
  }, [publickey]);

  const connectWallet = async () =&amp;gt; {
    if (await checkConnection()) {
      getPublicKey(await retrievePublicKey());
    }
  };

  return (
    &amp;lt;div className="bg-black flex md:flex-row shadow-md justify-between items-center px-10 py-4"&amp;gt;
      &amp;lt;div
        className="text-2xl sm:text-3xl lg:text-3xl font-semibold text-white flex items-center gap-5"
      &amp;gt;
        {/* &amp;lt;img src={StellarLogo} alt="CratePass X Stellar" className="w-11" /&amp;gt; */}
        &amp;lt;span className="text-white"&amp;gt;Product Authenticator&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;

      &amp;lt;div
        onClick={() =&amp;gt; handleOpenMenu()}
        className="text-4xl absolute top-4 right-3 md:hidden cursor-pointer text-white"
      &amp;gt;
        &amp;lt;ion-icon name={open ? "close" : "menu"}&amp;gt;&amp;lt;/ion-icon&amp;gt;
      &amp;lt;/div&amp;gt;

      &amp;lt;div&amp;gt;
        &amp;lt;ul
          className={`${
            open ? "top-20 left-0" : "top-[-496px]"
          } flex flex-col md:flex-row md:justify-around items-center text-nowrap md:pb-0 py-3 absolute md:static bg-black md:bg-transparent gap-5 w-full md:w-auto pl-3 md:border-none border-2 border-white rounded-b-2xl transition-all duration-500 ease-in-out z-10`}
        &amp;gt;
          &amp;lt;li&amp;gt;
            &amp;lt;div className="p-1 bg-white border-2 max-w-max rounded-md"&amp;gt;
              &amp;lt;span className="p-1 px-2 bg-black text-white h-full rounded-md"&amp;gt;
                Address
              &amp;lt;/span&amp;gt;
              &amp;lt;span className="px-2 text-black"&amp;gt;
                {`${publickey.substring(0, 4)} ${
                  publickey &amp;amp;&amp;amp; "..."
                } ${publickey.substring(publickey.length - 4)}`}
              &amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;
            &amp;lt;button
              className="text-xl w-52 hover:bg-gray-800 bg-white rounded-md p-4 font-bold text-black border-4 border-white"
              onClick={connectWallet}
            &amp;gt;
              {connect}
            &amp;lt;/button&amp;gt;
          &amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Header;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Soroban file code as follow(without function):-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(1)
import {
  Contract,
  SorobanRpc,
  TransactionBuilder,
  Networks,
  BASE_FEE,
  nativeToScVal,
  Address,
} from "@stellar/stellar-sdk";
import { userSignTransaction } from "../Freighter";

let rpcUrl = "https://soroban-testnet.stellar.org";

let contractAddress =
  "CDHHT6IKGRCFPSYJNKR2JEC3GUHRXGPIDUE2JN4LQLZMTCHYKLB4KZ7D";


const accountToScVal = (account) =&amp;gt; new Address(account).toScVal();


const stringToScValString = (value) =&amp;gt; {
  return nativeToScVal(value);
};

const numberToU64 = (value) =&amp;gt; {
  return nativeToScVal(value, { type: "u64" });
};

let params = {
  fee: BASE_FEE,
  networkPassphrase: Networks.TESTNET,
};

async function contractInt(caller, functName, values) {
  const provider = new SorobanRpc.Server(rpcUrl, { allowHttp: true });
  const sourceAccount = await provider.getAccount(caller);
  const contract = new Contract(contractAddress);
  let buildTx;

  if (values == null) {
    buildTx = new TransactionBuilder(sourceAccount, params)
      .addOperation(contract.call(functName))
      .setTimeout(30)
      .build();
  } else if (Array.isArray(values)) {
    buildTx = new TransactionBuilder(sourceAccount, params)
      .addOperation(contract.call(functName, ...values))
      .setTimeout(30)
      .build();
  } else {
    buildTx = new TransactionBuilder(sourceAccount, params)
      .addOperation(contract.call(functName, values))
      .setTimeout(30)
      .build();
  }

  let _buildTx = await provider.prepareTransaction(buildTx);

  let prepareTx = _buildTx.toXDR(); 

  let signedTx = await userSignTransaction(prepareTx, "TESTNET", caller);

  let tx = TransactionBuilder.fromXDR(signedTx, Networks.TESTNET);

  try {
    let sendTx = await provider.sendTransaction(tx).catch(function (err) {
      console.error("Catch-1", err);
      return err;
    });
    if (sendTx.errorResult) {
      throw new Error("Unable to submit transaction");
    }
    if (sendTx.status === "PENDING") {
      let txResponse = await provider.getTransaction(sendTx.hash);

      while (txResponse.status === "NOT_FOUND") {
        txResponse = await provider.getTransaction(sendTx.hash);
        await new Promise((resolve) =&amp;gt; setTimeout(resolve, 100));
      }
      if (txResponse.status === "SUCCESS") {
        let result = txResponse.returnValue;
        return result;
      }
    }
  } catch (err) {
    console.log("Catch-2", err);
    return;
  }
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;.....Integrate it with upcoming code .&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Invoke functions from the smart-contract:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To invoke any of the function from the smartcontract you can use this command fromat.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban contract invoke \&lt;br&gt;
  --id &amp;lt;DEPLOYED_CONTRACT_ADDRESS&amp;gt; \&lt;br&gt;
  --source &amp;lt;YOUR_ACCOUNT_NAME&amp;gt; \&lt;br&gt;
  --network testnet \&lt;br&gt;
  -- \&lt;br&gt;
  &amp;lt;FUNCTION_NAME&amp;gt; --&amp;lt;FUNCTION_PARAMETER&amp;gt; &amp;lt;ARGUMENT&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
To status of all registered passes, invoke view_all_pass_status function.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban contract invoke \&lt;br&gt;
  --id CBPSRM3TVRYA6PT7ESIXC64QZDTKIQNSKBYJ4CED64CN2OITETB67X2P \&lt;br&gt;
  --source alice \&lt;br&gt;
  --network testnet \&lt;br&gt;
  -- \&lt;br&gt;
  view_all_pass_status&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To create a new pass, invoke create_pass function:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;soroban contract invoke \&lt;br&gt;
  --id CBPSRM3TVRYA6PT7ESIXC64QZDTKIQNSKBYJ4CED64CN2OITETB67X2P \&lt;br&gt;
  --source alice \&lt;br&gt;
  --network testnet \&lt;br&gt;
  -- \&lt;br&gt;
  create_pass --record_id &amp;lt;YOUR_PUBLIC_ADDRESS&amp;gt; --title "Going Home" --descrip "I am going to my home today."&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Soroban file code with function:-&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(95)
async function createPass(caller, title, descrip) {
  let titleScVal = stringToScValString(title);
  let descripScVal = stringToScValString(descrip);
  let values = [titleScVal, descripScVal];

  try {
    const passId = await contractInt(caller, "create_pass", values);
    let resolvedPassId = Number(passId?._value?._value);
    console.log(resolvedPassId);


    return resolvedPassId;
  } catch (error) {
    console.log("Pass not created. Check if you already have a active pass");
  }
}



async function approvePass(caller, pass_id) {

  let values = numberToU64(pass_id);

  try {
    await contractInt(caller, "approve_pass", values);
    console.log(`!!Pass ID - ${pass_id}, is now Arrpoved!!`);
  } catch (error) {
    console.log("Pass can't be approved!!");
  }
}


async function expirePass(caller, pass_id) {
  let values = numberToU64(pass_id);

  try {
    await contractInt(caller, "expire_pass", values);
    console.log(`!!Pass ID - ${pass_id}, is now expired!!`);
  } catch (error) {
    console.log("Pass can't be expired!!");
  }
}



async function  fetchAllPassStatus(caller) {
  try {
    let result = await contractInt(caller, "view_all_pass_status", null);


    let approvedVal = Number(result?._value[0]?._attributes?.val?._value);


    let expiredVal = Number(result?._value[1]?._attributes?.val?._value);


    let pendingVal = Number(result?._value[2]?._attributes?.val?._value);


    let totalVal = Number(result?._value[3]?._attributes?.val?._value);

    console.log(approvedVal, expiredVal, pendingVal, totalVal);
    let ansArr = [];
    ansArr.push(approvedVal);
    ansArr.push(expiredVal);
    ansArr.push(pendingVal);
    ansArr.push(totalVal);
    return ansArr;
  } catch (error) {
    console.log("Unable to fetch All Pass Status!!");
  }
}


async function fetchMyPassStatus(caller, pass_id) {
  let values = numberToU64(pass_id);
  let result1;
  let result2;

  try {
    result1 = await contractInt(caller, "view_my_pass", values);

  } catch (error) {
    console.log("Unable to fetch Your Pass Status!!");
  }

  try {
    result2 = await contractInt(caller, "view_ac_pass_by_unique_id", values);

  } catch (error) {
    console.log("Unable to fetch Your Pass Status!!");
  }


  let createdTimeVal = Number(result1?._value[0]?._attributes?.val?._value);
  console.log(createdTimeVal);


  let descripVal = result1?._value[1]?._attributes?.val?._value?.toString();
  console.log(descripVal);


  let inTimeVal = Number(result1?._value[2]?._attributes?.val?._value);
  console.log(inTimeVal);


  let isExpiredVal = result1?._value[3]?._attributes?.val?._value;
  console.log(isExpiredVal);


  let titleVal = result1?._value[4]?._attributes?.val?._value?.toString();
  console.log(titleVal);


  let passIdVal = Number(result1?._value[5]?._attributes?.val?._value);
  console.log(passIdVal);


  let approvalStatusVal = result2?._value[1]?._attributes?.val?._value;
  console.log(approvalStatusVal);


  let outTimeVal = Number(result2?._value[2]?._attributes?.val?._value);
  console.log(outTimeVal);


  let ansArr = [];
  ansArr.push(createdTimeVal);
  ansArr.push(descripVal);
  ansArr.push(inTimeVal);
  ansArr.push(isExpiredVal);
  ansArr.push(titleVal);
  ansArr.push(passIdVal);
  ansArr.push(approvalStatusVal);
  ansArr.push(outTimeVal);

  return ansArr;
}




export {
  createPass,
  approvePass,
  expirePass,
  fetchAllPassStatus,
  fetchMyPassStatus,
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The App.js file is as follow;-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import "./App.css";
import Header from "./components/Header";
import Admin from "./components/Admin/Admin";
import RegularUser from "./components/RegularUser/RegularUser";
import { createContext, useState } from "react";
import { ADMIN_KEY } from "./constants/constants";

const pubKeyData = createContext();
const passIdContext = createContext();

function App() {
  const [pubkey, _setPubKey] = useState("");
  const [passId, _setPassId] = useState();

  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;pubKeyData.Provider value={pubkey}&amp;gt;
        &amp;lt;Header setPubKey={_setPubKey} /&amp;gt;

          &amp;lt;passIdContext.Provider value={{passId, _setPassId}}&amp;gt;
            &amp;lt;RegularUser /&amp;gt;
            {pubkey.toString() === ADMIN_KEY &amp;amp;&amp;amp; &amp;lt;Admin /&amp;gt;}
          &amp;lt;/passIdContext.Provider&amp;gt;
      &amp;lt;/pubKeyData.Provider&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
export { pubKeyData, passIdContext };
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The more about my code you can reach to my github repo:-&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Ankitsharma2023/volatile" rel="noopener noreferrer"&gt;https://github.com/Ankitsharma2023/volatile&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
