CINXE.COM
Showcase
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="description" content="Get started with XDC Chain Docs. Explore the documentation for XDC Chain"> <meta name="author" content="XDC Network"> <link rel="canonical" href="https://xinfin.org/showcase/"> <link rel="prev" href="../announce/"> <link rel="next" href="flattening-smart-contracts/"> <link rel="icon" href="../assets/xdc.svg"> <meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.5.50"> <title>Showcase</title> <link rel="stylesheet" href="../assets/stylesheets/main.a40c8224.min.css"> <link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback"> <style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap"> <link rel="stylesheet" href="../assets/style/index.css"> <link rel="stylesheet" href="../assets/style/components/banner.css"> <link rel="stylesheet" href="../assets/style/components/nav.css"> <link rel="stylesheet" href="../assets/style/components/sidebar.css"> <link rel="stylesheet" href="../assets/style/components/content.css"> <link rel="stylesheet" href="../assets/style/components/footer-nav.css"> <link rel="stylesheet" href="../assets/style/components/footer.css"> <link rel="stylesheet" href="https://unpkg.com/katex@0.16.10/dist/katex.min.css"> <script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script> </head> <body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom"> <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off"> <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off"> <label class="md-overlay" for="__drawer"></label> <div data-md-component="skip"> <a href="#smart-contract-introduction" class="md-skip"> Skip to content </a> </div> <div data-md-component="announce"> <aside class="md-banner"> <div class="md-banner__inner md-grid md-typeset"> </div> </aside> </div> <!-- Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --> <!-- Determine classes --> <!-- Header --> <header class="md-header md-header--shadow md-header--lifted" data-md-component="header"> <nav class="md-header__inner md-grid" aria-label="Header"> <!-- Link to home --> <a href="../#" title="Documentation" class="md-header__button md-logo" aria-label="Documentation" data-md-component="logo" > <img src="../assets/logo.svg" alt="logo"> </a> <!-- Button to open drawer --> <label class="md-header__button md-icon" for="__drawer"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg> </label> <!-- Header title --> <div class="md-header__title" data-md-component="header-title"> <div class="md-header__ellipsis"> <div class="md-header__site_name"> <span class="md-ellipsis"> Documentation </span> </div> </div> </div> <!-- Color palette toggle --> <form class="md-header__option" data-md-component="palette"> <input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0"> <label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 19a7 7 0 1 1 0-14 7 7 0 0 1 0 14m0-1.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 1 0 0 11m-5.657.157a.75.75 0 0 1 0 1.06l-1.768 1.768a.749.749 0 0 1-1.275-.326.75.75 0 0 1 .215-.734l1.767-1.768a.75.75 0 0 1 1.061 0M3.515 3.515a.75.75 0 0 1 1.06 0l1.768 1.768a.749.749 0 0 1-.326 1.275.75.75 0 0 1-.734-.215L3.515 4.575a.75.75 0 0 1 0-1.06M12 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0V.75A.75.75 0 0 1 12 0M4 12a.75.75 0 0 1-.75.75H.75a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 4 12m8 8a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5A.75.75 0 0 1 12 20m12-8a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h2.5A.75.75 0 0 1 24 12m-6.343 5.657a.75.75 0 0 1 1.06 0l1.768 1.768a.75.75 0 0 1-.018 1.042.75.75 0 0 1-1.042.018l-1.768-1.767a.75.75 0 0 1 0-1.061m2.828-14.142a.75.75 0 0 1 0 1.06l-1.768 1.768a.75.75 0 0 1-1.042-.018.75.75 0 0 1-.018-1.042l1.767-1.768a.75.75 0 0 1 1.061 0"/></svg> </label> <input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1"> <label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.768 3.96zl-.002-.005a9 9 0 0 0-.218-.779c-.13-.394.21-.8.602-.67q.435.144.855.328l.01.005A10.002 10.002 0 0 1 12 22a10 10 0 0 1-9.162-5.985l-.004-.01a10 10 0 0 1-.329-.855c-.13-.392.277-.732.67-.602q.386.126.78.218l.004.002A9 9 0 0 0 14.999 6a9 9 0 0 0-.231-2.04M16.5 6c0 5.799-4.701 10.5-10.5 10.5q-.64 0-1.26-.075A8.5 8.5 0 1 0 16.425 4.74q.075.62.075 1.259Z"/></svg> </label> </form> <!-- User preference: color palette --> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <!-- Site language selector --> <!-- Button to open search modal --> <label class="md-header__button md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> </label> <!-- Search interface --> <div class="md-search" data-md-component="search" role="dialog"> <label class="md-search__overlay" for="__search"></label> <div class="md-search__inner" role="search"> <form class="md-search__form" name="search"> <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required> <label class="md-search__icon md-icon" for="__search"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </label> <nav class="md-search__options" aria-label="Search"> <a href="javascript:void(0)" class="md-search__icon md-icon" title="Share" aria-label="Share" data-clipboard data-clipboard-text="" data-md-component="search-share" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 5.5a3.498 3.498 0 0 1-6.062 2.385l-5.112 3.021a3.5 3.5 0 0 1 0 2.188l5.112 3.021a3.5 3.5 0 1 1-.764 1.29l-5.112-3.02a3.499 3.499 0 1 1-3.843-5.642 3.5 3.5 0 0 1 3.843.872l5.112-3.021A3.5 3.5 0 1 1 20 5.5m-1.5 13a2 2 0 1 0-3.999-.001 2 2 0 0 0 3.999.001m0-13a2 2 0 1 0-3.999-.001A2 2 0 0 0 18.5 5.5M5.5 14a2 2 0 1 0 .001-3.999A2 2 0 0 0 5.5 14"/></svg> </a> <button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg> </button> </nav> <div class="md-search__suggest" data-md-component="search-suggest"></div> </form> <div class="md-search__output"> <div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix> <div class="md-search-result" data-md-component="search-result"> <div class="md-search-result__meta"> Initializing search </div> <ol class="md-search-result__list" role="presentation"></ol> </div> </div> </div> </div> </div> <!-- Repository information --> <div class="md-header__source"> <a href="https://github.com/XinFinOrg/Docs" title="Go to repository" class="md-source" data-md-component="source"> <div class="md-source__icon md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </div> <div class="md-source__repository"> XDC Network GitHub </div> </a> </div> </nav> <!-- Navigation tabs (sticky) --> <nav class="md-tabs" aria-label="Tabs" data-md-component="tabs"> <div class="md-grid"> <ul class="md-tabs__list"> <li class="md-tabs__item"> <a href=".." class="md-tabs__link"> Home </a> </li> <li class="md-tabs__item"> <a href="../xdcchain/" class="md-tabs__link"> XDC Chain </a> </li> <li class="md-tabs__item"> <a href="../subnet/" class="md-tabs__link"> XDC Subnet </a> </li> <li class="md-tabs__item"> <a href="../announce/" class="md-tabs__link"> Announcements </a> </li> <li class="md-tabs__item md-tabs__item--active"> <a href="./" class="md-tabs__link"> Showcases </a> </li> </ul> </div> </nav> </header> <div class="md-container" data-md-component="container"> <main class="md-main" data-md-component="main"> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0"> <label class="md-nav__title" for="__drawer"> <a href="../#" title="Documentation" class="md-nav__button md-logo" aria-label="Documentation" data-md-component="logo"> <img src="../assets/logo.svg" alt="logo"> </a> Documentation </label> <div class="md-nav__source"> <a href="https://github.com/XinFinOrg/Docs" title="Go to repository" class="md-source" data-md-component="source"> <div class="md-source__icon md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><!--! Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2024 Fonticons, Inc.--><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8M97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </div> <div class="md-source__repository"> XDC Network GitHub </div> </a> </div> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href=".." class="md-nav__link"> <span class="md-ellipsis"> Home </span> </a> </li> <li class="md-nav__item md-nav__item--pruned md-nav__item--nested"> <a href="../xdcchain/" class="md-nav__link"> <span class="md-ellipsis"> XDC Chain </span> <span class="md-nav__icon md-icon"></span> </a> </li> <li class="md-nav__item md-nav__item--pruned md-nav__item--nested"> <a href="../subnet/" class="md-nav__link"> <span class="md-ellipsis"> XDC Subnet </span> <span class="md-nav__icon md-icon"></span> </a> </li> <li class="md-nav__item md-nav__item--pruned md-nav__item--nested"> <a href="../announce/" class="md-nav__link"> <span class="md-ellipsis"> Announcements </span> <span class="md-nav__icon md-icon"></span> </a> </li> <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" checked> <div class="md-nav__link md-nav__container"> <a href="./" class="md-nav__link md-nav__link--active"> <span class="md-ellipsis"> Showcases </span> </a> <label class="md-nav__link md-nav__link--active" for="__nav_5" id="__nav_5_label" tabindex=""> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="true"> <label class="md-nav__title" for="__nav_5"> <span class="md-nav__icon md-icon"></span> Showcases </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_2" > <label class="md-nav__link" for="__nav_5_2" id="__nav_5_2_label" tabindex=""> <span class="md-ellipsis"> Smart Contracts </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_2_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5_2"> <span class="md-nav__icon md-icon"></span> Smart Contracts </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="flattening-smart-contracts/" class="md-nav__link"> <span class="md-ellipsis"> Flattening Smart Contracts </span> </a> </li> <li class="md-nav__item"> <a href="flattening-smart-contracts/#flattening-smart-contracts-with-remix" class="md-nav__link"> <span class="md-ellipsis"> Flattening Smart Contracts with Remix </span> </a> </li> <li class="md-nav__item"> <a href="flattening-smart-contracts/#flattening-smart-contracts-with-truffle" class="md-nav__link"> <span class="md-ellipsis"> Flattening Smart Contracts with Truffle </span> </a> </li> <li class="md-nav__item"> <a href="flattening-smart-contracts/#flattening-smart-contracts-with-hardhat" class="md-nav__link"> <span class="md-ellipsis"> Flattening Smart Contracts with Hardhat </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5_3" > <label class="md-nav__link" for="__nav_5_3" id="__nav_5_3_label" tabindex=""> <span class="md-ellipsis"> Token Standards </span> <span class="md-nav__icon md-icon"></span> </label> <nav class="md-nav" data-md-level="2" aria-labelledby="__nav_5_3_label" aria-expanded="false"> <label class="md-nav__title" for="__nav_5_3"> <span class="md-nav__icon md-icon"></span> Token Standards </label> <ul class="md-nav__list" data-md-scrollfix> <li class="md-nav__item"> <a href="tokens/" class="md-nav__link"> <span class="md-ellipsis"> Tokens Overview </span> </a> </li> <li class="md-nav__item"> <a href="tokens/#xrc20" class="md-nav__link"> <span class="md-ellipsis"> XRC20 </span> </a> </li> <li class="md-nav__item"> <a href="tokens/#xrc721" class="md-nav__link"> <span class="md-ellipsis"> XRC721 </span> </a> </li> <li class="md-nav__item"> <a href="tokens/#xrc404" class="md-nav__link"> <span class="md-ellipsis"> XRC404 </span> </a> </li> <li class="md-nav__item md-nav__item--pruned md-nav__item--nested"> <a href="xdcstats/" class="md-nav__link"> <span class="md-ellipsis"> XDC Stats </span> <span class="md-nav__icon md-icon"></span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" > <div class="md-sidebar__scrollwrap"> <div class="md-sidebar__inner"> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> </nav> </div> </div> </div> <div class="md-content" data-md-component="content"> <article class="md-content__inner md-typeset"> <a href="https://github.com/XinFinOrg/Docs/edit/main/docs/showcase/index.md" title="Edit this page" class="md-content__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20H6V4h7v5h5v3.1l2-2V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h4zm10.2-7c.1 0 .3.1.4.2l1.3 1.3c.2.2.2.6 0 .8l-1 1-2.1-2.1 1-1c.1-.1.2-.2.4-.2m0 3.9L14.1 23H12v-2.1l6.1-6.1z"/></svg> </a> <div><h1 id="smart-contract-introduction">Smart Contract Introduction<a class="headerlink" href="#smart-contract-introduction" title="Link to this section">露</a></h1> <p>Blockchain technology is a digital ledger that continuously expands by adding records, known as blocks, which are securely connected through cryptography. Each block includes a cryptographic hash of the preceding block, a timestamp, and transaction data. The structure of blockchain ensures that once data is recorded, it is nearly impossible to alter, providing a high level of security. One of the key advantages of blockchain is its decentralized nature, eliminating the need for middlemen, which reduces both time and potential conflicts. Despite its challenges, blockchain technology is recognized for being faster, more economical, and more secure compared to traditional systems, which is why it鈥檚 being increasingly adopted by banks and governments.</p> <p>Now, imagine a contract that automatically executes when certain conditions are met, with the entire process managed by the blockchain network. This is the concept behind smart contracts.</p> <h1 id="what-are-smart-contracts">What Are Smart Contracts?<a class="headerlink" href="#what-are-smart-contracts" title="Link to this section">露</a></h1> <p>A smart contract is a self-executing program that runs on a blockchain, containing a set of rules agreed upon by the involved parties. Once these predefined rules are satisfied, the contract automatically enforces the terms. Smart contracts facilitate, verify, and enforce the execution of an agreement or transaction without needing an intermediary, representing the simplest form of decentralized automation.</p> <p>Put simply, a smart contract allows for the exchange of assets鈥攚hether money, property, or anything else鈥攚ithout the involvement of a middleman. This leads to trustless execution, where the contract enforces the terms without relying on any party鈥檚 honesty or reliability.</p> <p>Bitcoin was the first blockchain to introduce basic smart contracts, where transactions are only validated if specific conditions are met. Below is an example of a basic smart contract that includes functions to set and retrieve data, with simple operations to modify the data.</p> <h1 id="overview">Overview<a class="headerlink" href="#overview" title="Link to this section">露</a></h1> <h2 id="key-features-of-smart-contracts">Key Features of Smart Contracts<a class="headerlink" href="#key-features-of-smart-contracts" title="Link to this section">露</a></h2> <ol> <li> <p><strong>Trustworthiness:</strong> Smart contracts ensure that your agreements are securely stored on a blockchain, making it impossible for any party to lose or alter the contract. The terms are binding, and both parties must adhere to them.</p> </li> <li> <p><strong>Transparency:</strong> Every detail of the smart contract is visible to all participants before they agree, eliminating the possibility of disputes. The information is open to everyone involved, ensuring clarity and preventing misunderstandings.</p> </li> <li> <p><strong>Self-Governance:</strong> Smart contracts eliminate the need for intermediaries, such as brokers or lawyers, to validate the agreement. This also removes the risk of third-party manipulation, as the contract is automatically executed by the blockchain network.</p> </li> <li> <p><strong>Precision:</strong> Automated contracts not only speed up the process but also reduce costs and eliminate human error. The conditions are clearly defined in the smart contract, ensuring that no detail is overlooked.</p> </li> <li> <p><strong>Efficiency:</strong> Smart contracts automate tasks, saving considerable time that would otherwise be spent manually reviewing and processing agreements.</p> </li> <li> <p><strong>Cost-Effectiveness:</strong> By removing the need for intermediaries, smart contracts can significantly reduce costs. For instance, you don鈥檛 need to hire a lawyer to enforce the contract; the code itself ensures compliance.</p> </li> <li> <p><strong>Security:</strong> The data in smart contracts is encrypted and protected by blockchain technology, making it highly secure and reliable for critical processes.</p> </li> </ol> <h2 id="addressing-challenges">Addressing Challenges<a class="headerlink" href="#addressing-challenges" title="Link to this section">露</a></h2> <ul> <li> <p><strong>Upgradability:</strong> Modular smart contracts can address upgrade issues, allowing changes without losing valuable information.</p> </li> <li> <p><strong>Proxy Contracts:</strong> Using delegatecall-based proxies enables smart contracts to be upgraded while keeping the logic and data separate. However, this method requires careful handling to avoid introducing errors.</p> </li> <li> <p><strong>Legal Considerations:</strong> As smart contracts evolve, legal issues will gradually be resolved, but it will take time since they are still in the early stages of development.</p> </li> <li> <p><strong>Complexity Management:</strong> Simplifying smart contracts by avoiding Turing-complete designs can help reduce the complexity involved in writing them.</p> </li> <li> <p><strong>Oracle Problem:</strong> The oracle issue could be tackled by implementing a consensus protocol within the community, ensuring that the blockchain accurately reflects real-world conditions.</p> </li> </ul> <h2 id="applications-of-smart-contracts">Applications of Smart Contracts<a class="headerlink" href="#applications-of-smart-contracts" title="Link to this section">露</a></h2> <ol> <li> <p><strong>Digital Identity Management:</strong> Smart contracts allow individuals to maintain control over their digital identities, managing their data, reputation, and assets securely. Businesses can use this technology to streamline the know-your-customer (KYC) process.</p> </li> <li> <p><strong>Financial Data Integrity:</strong> Financial institutions can leverage smart contracts for accurate and transparent data recording, improving financial reporting and reducing auditing expenses. This also enhances market stability by ensuring uniform financial data across organizations.</p> </li> <li> <p><strong>Healthcare Management:</strong> Smart contracts can store personal health records securely on a blockchain, accessible only by authorized personnel. They can also be used to manage various healthcare operations, including drug tracking, compliance with regulations, and managing medical supplies.</p> </li> <li> <p><strong>Real Estate Transactions:</strong> Smart contracts simplify real estate transactions by cutting out intermediaries. For example, rental agreements can be directly managed on the blockchain, reducing costs and making the process more efficient.</p> </li> </ol> <h2 id="conclusion">Conclusion<a class="headerlink" href="#conclusion" title="Link to this section">露</a></h2> <p>Smart contracts offer immense potential and have already shown signs of transforming various industries. However, they are still in the early stages, and much remains to be explored. As organizations become more familiar with blockchain technology and its applications, smart contracts could become easier to implement and more widely trusted. In the future, we might see a blend of traditional and digital contracts, where blockchain technology verifies the terms while physical copies provide additional validation.</p></div> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <nav class="md-footer__inner md-grid" aria-label="Footer" > <a href="../announce/" class="md-footer__link md-footer__link--prev" aria-label="Previous: Announcements"> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg> </div> <div class="md-footer__title"> <span class="md-footer__direction"> Previous </span> <div class="md-ellipsis"> Announcements </div> </div> </a> <a href="flattening-smart-contracts/" class="md-footer__link md-footer__link--next" aria-label="Next: Flattening Smart Contracts"> <div class="md-footer__title"> <span class="md-footer__direction"> Next </span> <div class="md-ellipsis"> Flattening Smart Contracts </div> </div> <div class="md-footer__button md-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11z"/></svg> </div> </a> </nav> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> </div> </div> </div> </footer> <div class="doc-footer"> <div class="doc-footer__inner md-grid"> <div> <div>Explore</div> <ul> <li><a href="https://xinfin.org/" target="_blank">Official Website</a></li> <li><a href="https://xinfin.org/get-xdc" target="_blank">Get XDC</a></li> <li><a href="https://xinfin.org/wallets" target="_blank">XDC Wallets</a></li> <li><a href="https://xinfin.org/xdc-subnet" target="_blank">XDC Subnet</a></li> </ul> </div> <div> <div>Community</div> <ul> <li><a href="https://xinfin.org/developers-ecosystem-partners" target="_blank">Dev Ecosystem Partners</a></li> <li><a href="https://xinfin.org/join-community" target="_blank">Join Community</a></li> <li><a href="https://xinfin.org/events" target="_blank">Events</a></li> <li><a href="https://xinfin.org/community-bounty" target="_blank">Community Bounty</a></li> </ul> </div> <div> <div>About</div> <ul> <li><a href="#" target="_blank">Privacy Policy</a></li> <li><a href="#" target="_blank">Terms of Use</a></li> <li><a href="https://xinfin.org/join-community" target="_blank">Contact Us</a></li> </ul> </div> </div> </div> <div class="doc-copyright"> <div class="doc-copyright__inner md-grid"> 漏 2024 XDC Network. All rights reserved. </div> </div> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <div class="md-consent" data-md-component="consent" id="__consent" hidden> <div class="md-consent__overlay"></div> <aside class="md-consent__inner"> <form class="md-consent__form md-grid md-typeset" name="consent"> <h4>Cookie consent</h4> <p>We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. With your consent, you're helping us to make our documentation better.</p> <input class="md-toggle" type="checkbox" id="__settings" > <div class="md-consent__settings"> <ul class="task-list"> <li class="task-list-item"> <label class="task-list-control"> <input type="checkbox" name="github" checked> <span class="task-list-indicator"></span> GitHub </label> </li> </ul> </div> <div class="md-consent__controls"> <button class="md-button md-button--primary">Accept</button> <label class="md-button" for="__settings">Manage settings</label> </div> </form> </aside> </div> <script>var consent=__md_get("__consent");if(consent)for(var input of document.forms.consent.elements)input.name&&(input.checked=consent[input.name]||!1);else"file:"!==location.protocol&&setTimeout((function(){document.querySelector("[data-md-component=consent]").hidden=!1}),250);var form=document.forms.consent;for(var action of["submit","reset"])form.addEventListener(action,(function(e){if(e.preventDefault(),"reset"===e.type)for(var n of document.forms.consent.elements)n.name&&(n.checked=!1);__md_set("__consent",Object.fromEntries(Array.from(new FormData(form).keys()).map((function(e){return[e,!0]})))),location.hash="",location.reload()}))</script> <script id="__config" type="application/json">{"base": "..", "features": ["search.suggest", "search.highlight", "search.share", "navigation.instant", "navigation.tracking", "navigation.integration", "navigation.tabs", "navigation.tabs.sticky", "navigation.indexes", "navigation.sections", "navigation.prune", "navigation.path", "navigation.top", "navigation.footer", "toc.follow", "content.code.copy", "content.action.edit", "content.tooltips"], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script> <script src="../assets/javascripts/bundle.60a45f97.min.js"></script> <script src="../assets/js/mathjax.js"></script> <script src="../assets/js/custom.js"></script> <script src="https://unpkg.com/mathjax@3.2.2/es5/tex-mml-chtml.js"></script> <script src="https://unpkg.com/katex@0.16.10/dist/katex.min.js"></script> <script src="https://unpkg.com/katex@0.16.10/dist/contrib/auto-render.min.js"></script> </body> </html>