<?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>Developers Forum for XinFin XDC Network: Quincy Jones</title>
    <description>The latest articles on Developers Forum for XinFin XDC Network by Quincy Jones (@yourbroquincy).</description>
    <link>https://www.xdc.dev/yourbroquincy</link>
    <image>
      <url>https://www.xdc.dev/images/g2Fq6PSj9Xd98vWLsb7_UtLwibo50PQIJNtpaEwyk_g/rs:fill:90:90/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL3VzZXIvcHJv/ZmlsZV9pbWFnZS8z/Ny8yMDQ1YzA2NC02/YjEzLTQ3OGUtOWQ1/Yi1hMTU4YTg4MzZj/YzQuUE5H</url>
      <title>Developers Forum for XinFin XDC Network: Quincy Jones</title>
      <link>https://www.xdc.dev/yourbroquincy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.xdc.dev/feed/yourbroquincy"/>
    <language>en</language>
    <item>
      <title>Crypto Feels Like Whatever People Are Doing</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Thu, 16 Apr 2026 18:40:02 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/crypto-feels-like-whatever-people-are-doing-1n4e</link>
      <guid>https://www.xdc.dev/yourbroquincy/crypto-feels-like-whatever-people-are-doing-1n4e</guid>
      <description>&lt;p&gt;One thing I’ve started to notice about crypto, and I didn’t really get this at first, is that it’s not actually dictated by what’s “best” or even what’s most advanced. It’s dictated by activity. Just whatever people are doing at scale, that becomes the space, at least for a period of time.&lt;/p&gt;

&lt;p&gt;Like when things are hot, it feels obvious. Everyone’s trading, everyone’s posting, there’s new projects every day, people are jumping chains, minting, flipping, whatever it is. And because that activity is so loud, it kind of defines reality. It’s like, okay this is crypto right now. This is what matters.&lt;/p&gt;

&lt;p&gt;NFTs had that moment. Memecoins had that moment. Even certain ecosystems, they didn’t just win because they were better technically, they won because people were there, doing things, interacting, creating momentum. And momentum is weirdly one of the most powerful forces in this space.&lt;/p&gt;

&lt;p&gt;But then things slow down, and it almost feels like everything disappears. Prices drop, timelines get quiet, nobody is really talking the same way anymore. And it can feel like the whole space just… died or something. But it didn’t, it just changed form.&lt;/p&gt;

&lt;p&gt;Because what’s happening underneath during those slower periods is honestly kind of more important, it’s just not as visible. Builders are still there, probably even more focused because there’s less noise. People are working on infrastructure, fixing problems, trying to actually make things usable instead of just exciting. It’s not flashy, it doesn’t go viral, but it’s real.&lt;/p&gt;

&lt;p&gt;There’s almost like two versions of crypto. The one you see during hype cycles, and the one that actually gets built when nobody is paying attention. And they don’t really look the same at all.&lt;/p&gt;

&lt;p&gt;The hype version is fast. It’s social. It’s easy to understand. You can jump in, participate, feel like you’re part of something immediately. And that’s why speculation becomes such a big part of it, because speculation itself is activity. It creates movement, and movement pulls people in.&lt;/p&gt;

&lt;p&gt;But the quieter version, it’s slower, more technical, sometimes kind of boring if we’re being honest. But that’s where a lot of the real foundation gets laid. The stuff that actually sticks around longer than a cycle.&lt;/p&gt;

&lt;p&gt;And I think the interesting part is how those two phases feed into each other.&lt;/p&gt;

&lt;p&gt;Because the things that get built in the quiet don’t just stay there. They come back during the next hype cycle, just in a different form. Usually simplified, sometimes repackaged, but they’re rooted in that earlier work that nobody really saw at the time.&lt;/p&gt;

&lt;p&gt;So yeah, crypto is driven by activity, but not all activity is the same. Some of it is loud and temporary, and some of it is quiet and foundational. And if you only pay attention to one, you get a really incomplete picture of what’s actually going on.&lt;/p&gt;

&lt;p&gt;It’s not just what people are building, it’s what people are choosing to do at scale. That’s what defines the space, at least in that moment.&lt;/p&gt;

</description>
      <category>activity</category>
      <category>hype</category>
      <category>smart</category>
      <category>build</category>
    </item>
    <item>
      <title>The New Frontier of XDC Subnets</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Wed, 05 Nov 2025 19:28:33 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/setting-up-xdc-subnets-14de</link>
      <guid>https://www.xdc.dev/yourbroquincy/setting-up-xdc-subnets-14de</guid>
      <description>&lt;p&gt;So here’s the thing about XDC Subnets. They’re basically the missing link between private blockchains that companies love for control and the public XDC network that everyone uses for open trade. Think of it like having your own private world inside the internet that can still plug into the larger web whenever you want. An enterprise can build its own subnet where all its internal assets, transactions, and data stay private, but the magic is that those same assets can travel out to the public XDC chain when it’s time to trade or settle with other organizations.&lt;br&gt;
Inside a subnet, a company can create its own tokenized system. Every resource, share, or piece of data can exist as a digital asset. These assets can move around privately for accounting, record keeping, or even internal trades. The company has complete control, kind of like running its own economy. But when it wants to interact with another business, it can move those tokens to the public network. That’s when the subnet connects to the broader world and the assets become tradeable. It’s smooth, it’s efficient, and it keeps everything secure until you’re ready to go public.&lt;br&gt;
This setup completely changes how tokenization works. Instead of waiting for some big public exchange to list assets, enterprises can start small on their private subnets. They can create tokens for internal use, private sales, or equity distribution. When they’re ready, those tokens can step into the public arena, bringing liquidity with them. It’s like a new kind of incubation model for digital finance where innovation happens privately first and then expands outward.&lt;br&gt;
The potential use cases are endless. A real estate company could tokenize its property data and manage settlements privately before offering shares to investors on the public chain. A supply chain network could track goods internally while using the public side to verify authenticity. Financial institutions could test new instruments safely before connecting them to global markets.&lt;br&gt;
What makes it all exciting is the freedom this brings. Every organization can now build its own financial sandbox, run experiments, and still plug into a global settlement layer when it’s time to do business. XDC Subnets make blockchain feel less like a locked system and more like an open playground for value, trust, and trade.&lt;br&gt;
Setting up an XDC Subnet is like spinning up your own mini-blockchain inside the XDC ecosystem. It’s private, fast, and fully under your control, but it still connects to the public XDC network so the outside world can verify everything you do. Think of it as your own private island that occasionally sends postcards to the mainland to prove it’s real.&lt;br&gt;
Your subnet is where all your transactions live. It’s got its own validators that produce blocks and keep your internal system humming. Then there’s the Relayer, which acts like a messenger or a delivery guy. Every so often, it grabs a snapshot of your subnet’s activity called a checkpoint and delivers it to a Checkpoint Smart Contract (CSC) sitting on the main XDC chain. The CSC is like your public receipt. It’s proof that your subnet’s data is authentic and accounted for on the global network.&lt;br&gt;
Now, setting it up isn’t hard. All you really need is an Ubuntu server with Docker installed. After that, you just fire up the Subnet Deployment Wizard. It walks you through everything creating your network, generating node keys, linking to the parent chain, and deploying your CSC. The wizard even gives you your CSC address right away that’s what connects your subnet to either the XDC mainnet or the Apothem testnet. You can also decide how often your subnet sends checkpoints. If you want maximum precision, send them every block. If you’d rather save gas, set it to a checkpoint periodically.&lt;br&gt;
Once everything’s running, you configure the Relayer with your subnet’s RPC endpoint, the parent chain’s endpoint, and your CSC address. Then it just does its job quietly in the background, keeping your subnet synced with the public chain. You can open up the Subnet Dashboard anytime to watch the magic happen blocks being produced, validators doing their thing, checkpoints showing up live on XDC. In a few minutes, you’ve got your own fully functional, verifiable blockchain.&lt;br&gt;
And here’s where it gets even cooler once your subnet is online, you can integrate Subswap. It’s a decentralized exchange built specifically for subnets, so your users or organizations can trade tokens directly within your private network or bridge them out to the public XDC chain when you’re ready. Think of Subswap as the liquidity layer for your subnet. It turns your private ecosystem into an actual marketplace. You can launch internal assets, manage private liquidity pools, and even open up selective public trading.&lt;br&gt;
At the end of the day, XDC Subnets give you the best of both worlds — the privacy and control of your own blockchain with the security and visibility of the XDC main network. You can build, trade, and experiment freely inside your subnet, then connect to the public chain whenever it’s time to scale. With the Subnet Deployment Wizard and Subswap ready to go, setting one up feels less like a tech project and more like unlocking your own digital economy. It’s simple, powerful, and kind of addictive once you see it working. Honestly, you should try it out.&lt;/p&gt;

&lt;p&gt;All you need to get started is to run this script on the machine you want to run your subnet and open the deployment wizard on port 5210!&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -0 https://raw.githubusercontent.com/XinFin0rg/Subnet-&lt;br&gt;
Deployment/v2.0.0/container-manager/start.sh&lt;br&gt;
chmod +x start.sh&lt;br&gt;
/start.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.xdc.dev/images/AZP3sA_KGFM7qwvXC8dwI6QpG0qqWb4k-TlyMcjHMJI/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL2FydGljbGVz/LzU5enBuanRtcmc2/b3NhaHhxcjVpLnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://www.xdc.dev/images/AZP3sA_KGFM7qwvXC8dwI6QpG0qqWb4k-TlyMcjHMJI/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL2FydGljbGVz/LzU5enBuanRtcmc2/b3NhaHhxcjVpLnBu/Zw" alt="Image description" width="880" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>subnets</category>
      <category>subswap</category>
    </item>
    <item>
      <title>[Informative] How NFTs can be batched, creating new markets for batched assets</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Wed, 18 Oct 2023 18:00:35 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/how-nfts-can-be-batched-creating-new-markets-for-batched-assets-4f7a</link>
      <guid>https://www.xdc.dev/yourbroquincy/how-nfts-can-be-batched-creating-new-markets-for-batched-assets-4f7a</guid>
      <description>&lt;p&gt;The concept of batched assets plays a pivotal role in contemporary asset management, serving as a cornerstone for optimizing processes, cost reduction, and the streamlining of diverse financial and operational activities.&lt;/p&gt;

&lt;p&gt;In the context of smart contracts, an illustrative example involves the creation of a smart contract capable of consolidating tokens from multiple contracts, even encompassing multiple tokens within a singular contract. These aggregated tokens are then batched into a single token, offering possessors the ability to redeem the underlying tokens encapsulated within the smart contract. Such a tool finds valuable application in the realm of financial investments, particularly in the tokenization of collective assets managed as a unified entity.&lt;/p&gt;

&lt;p&gt;One compelling instance of batched assets emerges within the sphere of investment portfolios. Here, the grouping of akin financial instruments, spanning stocks, bonds, and real estate, enables investors to effectively oversee and manage their portfolios, informed by comprehensive performance data.&lt;/p&gt;

&lt;p&gt;Furthermore, in supply chain management, this concept underpins efficient inventory control, while in the tech sector, batched assets manifest in software updates. Software developers routinely bundle multiple patches and enhancements into a cohesive batch, facilitating seamless updates and bolstering system stability and security.&lt;/p&gt;

&lt;p&gt;In manufacturing, batched assets are integral to production lines, where products with congruous specifications or production requisites are produced in clusters. This approach curtails setup and transition times, driving heightened efficiency and cost-effectiveness, particularly within the realm of collecting accounting in the form of NFTs.&lt;/p&gt;

&lt;p&gt;The tokenization of diverse assets and objects using NFTs, alongside their integration into a contract governed by an NFT, offers a sophisticated mechanism for the management of multiple assets.&lt;/p&gt;

&lt;p&gt;As the DeFi (Decentralized Finance) landscape matures, the sheer volume of tokens in circulation is poised to expand significantly, rendering batch processing an essential strategy to minimize operational overhead and complexity when grappling with these novel forms of tokenized assets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="c1"&gt;//SPDX-License-Identifier: MIT
&lt;/span&gt;
&lt;span class="k"&gt;pragma&lt;/span&gt; &lt;span class="n"&gt;solidity&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"@openzeppelin/contracts/token/ERC1155/ERC1155.sol"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"@openzeppelin/contracts/token/ERC1155/IERC1155.sol"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"@openzeppelin/contracts/utils/math/SafeMath.sol"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;/// @title Multi Asset Batch Contract
/// @author Quincy J
/// @notice This contract is meant to allow a multitude of different assets from different contracts to be referenced by a single token
/// @dev This contract is built to allow for more complex contracts to only have to manage  a single token rather than a complex multitude of different tokens
&lt;/span&gt;
&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;MultiAssetBatch&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;batchName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;tokenIDNumber&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;maxBatchSize&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//50-100 recomended
&lt;/span&gt;
    &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_totalHandlers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_batchName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_maxBatchSize&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;handlerToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
        &lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_totalHandlers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;batchName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_batchName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;maxBatchSize&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_maxBatchSize&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;assetName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"user does not hold handler token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;addAssets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_assetName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenIDNumber&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;maxBatchSize&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"Contract has hit Max Batch limit"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"both the token id and the ammount arrays must have the same length"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;ERC1155&lt;/span&gt; &lt;span class="n"&gt;tokenContract&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_assetName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Assets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_assetName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;tokenIDNumber&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

            &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
                &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenContract&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"user is missing a token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="n"&gt;tokenContract&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;safeBatchTransferFrom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"new asset added"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint256&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
                &lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
                &lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

                &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
                &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_contract&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="n"&gt;tokenContract&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;safeBatchTransferFrom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Assets Added"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"asset already exist"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;redeemAssets&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="n"&gt;ERC1155&lt;/span&gt; &lt;span class="n"&gt;tokenContract&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;tokenContract&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;safeBatchTransferFrom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;viewAssets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;  &lt;span class="k"&gt;view&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetContract&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetID&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_tokenIDNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;//ERC1155Received fuctions
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;onERC1155Received&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;uint256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;uint256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;bytes&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;virtual&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bytes4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onERC1155Received&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;onERC1155BatchReceived&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;uint256&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;uint256&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;bytes&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;virtual&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bytes4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onERC1155BatchReceived&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;onERC721Received&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;uint256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;bytes&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;virtual&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bytes4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;onERC721Received&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;fallback&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;external&lt;/span&gt; &lt;span class="k"&gt;payable&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="k"&gt;receive&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;external&lt;/span&gt; &lt;span class="k"&gt;payable&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Github:&lt;/strong&gt; &lt;a href="https://github.com/CoinClubQuincy/XDC-BrokerageDapp/blob/main/contracts/BrokerageTools/MultiAssetBatch.sol"&gt;https://github.com/CoinClubQuincy/XDC-BrokerageDapp/blob/main/contracts/BrokerageTools/MultiAssetBatch.sol&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>nft</category>
      <category>markets</category>
      <category>assets</category>
    </item>
    <item>
      <title>[Informative]How Brokerage DApps can change trade finance on the XDC network</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Mon, 21 Aug 2023 18:01:28 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/how-brokerage-dapp-can-change-trade-finance-on-the-xdc-network-38cj</link>
      <guid>https://www.xdc.dev/yourbroquincy/how-brokerage-dapp-can-change-trade-finance-on-the-xdc-network-38cj</guid>
      <description>&lt;p&gt;Most of the crypto space is quite familiar with the notion of NFTs and marketplaces. Typically, when people refer to these different types of instruments in Blockchain technology, they often refer shallowly to pictures being sold in the new online markets. This tends to create a misconception that NFTs are merely pictures, rather than a shared accounting tool to represent a particular object of ownership. NFTs are unique digital objects residing within smart contracts that can be used as units of account by shared applications. These objects can be referenced as derivative objects, such as a representation of a stock or a currency, or they could be abstract representations of some piece of code, like possessing a token to allow access to an application, using it as a key license, or even keeping track of scores.&lt;/p&gt;

&lt;p&gt;Previously, I wrote a smart contract to create a representation of an asset as a token in my article titled "A Conceptualization on How Brokers, Banks, and Financial Institutions can Tokenize Assets on XDC": &lt;/p&gt;

&lt;p&gt;[(&lt;a href="https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17)"&gt;https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17)&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;In that article, I explained how a token can be used as a unit of account for traditional assets, similar to how assets can be represented in a database. What makes the token special on the blockchain is that it can be referenced by third-party applications like marketplaces and other DApps. In this article, I aim to articulate how new markets can be formed and how tokenized assets can be automated in these new marketplaces.&lt;/p&gt;

&lt;p&gt;To demonstrate how you can automate assets on XDC, I forked an NFT marketplace repository from TronzitVeca’s ERC1155-Marketplace-Contract. Using my previous Assets contract and creating a portfolio contract, I managed to create a 4-contract DApp that enables the Marketplace to trade assets and a portfolio to manage assets for users, and allowing them to interact with the marketplace.&lt;br&gt;
A DApp like this is analogous to an application like Robinhood, but with three main differences:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The infrastructure is self-hosted. So any broker interacting with this application does not need to set up or manage in infrastructure of the application&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Users can self-custody assets via access to their portfolio contract, enabling them to move between different marketplaces and brokers with ease. The user has a portfolio generated by the original broker but can take that portfolio to other brokers while remaining in potential compliance rules established by the portfolio and marketplace.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Broker-dealers and other firms can engage with each other via the decentralized marketplaces. Other broker-dealers can allow their users portfolios to interact with the marketplaces, providing more options to their users and additional liquidity in their marketplace.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As more broker-dealers create their marketplaces tailored to their clientele, the number of financial participants and the necessary liquidity for exchanges will exponentially increase. Each broker can access the marketplaces of others, and clients from different brokers can access the assets of other marketplaces if liquidity is needed locally. &lt;/p&gt;

&lt;p&gt;This enables easier and faster trading between partners and investors. Traditionally, trading between finance partners required intricate relationships and redundant record-keeping. With partners using the XDC network as a shared accounting system, asset transfers become significantly quicker, and partners don't need to sync extensively to ensure accurate recording. What used to take days can now happen in seconds.&lt;br&gt;
Similar to how social media enabled greater online connections, blockchain technology allows banks and financial institutions to trade over the internet on the blockchain with more parties than they could otherwise.&lt;/p&gt;

&lt;p&gt;This contract can be broken into 4 parts&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Marketplace Contract [&lt;a href="https://github.com/TronzitVeca/ERC1155-Marketplace-Contract%5DThe"&gt;https://github.com/TronzitVeca/ERC1155-Marketplace-Contract]The&lt;/a&gt; marketplace is where the Assets are located to be traded, this is no different than most NFT marketplaces the main difference being The assets held in this one are Tradition assets listed by broker-Dealers to help facilitated the sale to &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Portfolio Ledger&lt;br&gt;
The portfolio Ledger is a contract that generate Portfolio contracts and keeps track of all the users who are interacting with a particular Marketplace These portfolios can be possessed by other brokers or just investors interacting with the Marketplace&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Portfolio contract&lt;br&gt;
The portfolio contract is a way for users to directly interact with the Marketplace and custody Assets, that acts a a basket that can manage and interact with 3rd party assets while giving &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Asset that gets traded [(&lt;a href="https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17)"&gt;https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17)&lt;/a&gt;] The underlying Asset that get traded and owned within this application&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Portfolio Ledger&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;
&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;portfolioLedger&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;portfolioTokenURI&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;//URI formart for users
&lt;/span&gt;    &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;marketplaceAddress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//address of marketplace Contract
&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;totalAccounts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_totalHandlers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_marketplaceName&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;portfolioTokenURI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;marketplaceAddress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Marketplace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_totalHandlers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_marketplaceName&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;totalAccounts&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Ledger&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;numberLedger&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;numbLedger&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Ledger&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;accountNumber&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;portfolio&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;numberLedger&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;portfolio&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  
        &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;//Create new User Account
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;createAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"account already exist"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;portfolioContractAddress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
        &lt;span class="n"&gt;portfolioContractAddress&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="n"&gt;Portfolio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;portfolioTokenURI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;this&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="n"&gt;marketplaceAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
        &lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Ledger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;totalAccounts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;portfolioContractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;numbLedger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;totalAccounts&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;numberLedger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;portfolioContractAddress&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;totalAccounts&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"new account created"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;portfolioContractAddress&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;//check and view new user Account
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;checkAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;accountNumber&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;numbLedger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;accountNumber&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;account&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;portfolio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;ledger&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;_account&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mh"&gt;0x0000000000000000000000000000000000000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;//forward funds from one user name to another
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;forwardFunds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_reciver&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;external&lt;/span&gt; &lt;span class="k"&gt;payable&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;account_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;portfolio_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exist_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;portfolio_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;exist_&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;checkAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_reciver&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exist_&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"User does not exist"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;payable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;portfolio_&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nb"&gt;transfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Portfolio Contract&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;Portfolio&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;accountName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;marketplaceCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="n"&gt;Marketplace&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;marketplace&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;portfolioLedger&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;DAppLedger&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="n"&gt;ledgerPrivate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;currentOwner&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;event&lt;/span&gt; &lt;span class="n"&gt;changedMarketPlace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;_newmarketplace&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;event&lt;/span&gt; &lt;span class="n"&gt;changedOwner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;_brokerMSG&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;savedMarketPlaces&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;savedmarketplace&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;savedMarketPlaces&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;marketplaceNumber&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;savedMarketPlaces&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;marketplaceAddress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;marketplaceName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_DAppLedger&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_marketplace&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;handlerToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
        &lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;accountName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;ledgerPrivate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_DAppLedger&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;DAppLedger&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;portfolioLedger&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_DAppLedger&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;marketplace&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Marketplace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_marketplace&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="n"&gt;logNewMarketPlace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_marketplace&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

        &lt;span class="n"&gt;currentOwner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;broker&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;marketplace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;marketplace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"broker does not hold handler token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"user does not hold handler token"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;resetOwner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;broker&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
           &lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
           &lt;span class="n"&gt;_burn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;currentOwner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
           &lt;span class="n"&gt;currentOwner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

           &lt;span class="k"&gt;emit&lt;/span&gt; &lt;span class="n"&gt;changedOwner&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"The registerd broker has chaged the owner of this contract"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
           &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;_newOwner&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;//Delegate functions that interact directly with the marketplace
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The future of blockchain technology is about connecting siloed entities that struggle with maintaining settlement and moving capital among multiple parties globally. With the XDC network and connected markets, the means of connection have never been easier. Marketplaces can reference liquidity from other marketplaces directly, brokers can interact without intermediaries, and investors can self-custody assets, enabling more people to participate directly. This reduces the cost and ease of access to financial services, with the barrier to entry lowered to having an internet connection.&lt;/p&gt;

&lt;p&gt;The more participant that operate in this way the more engagement this online economy can facilitate an the better the trade volume globally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Github:&lt;/strong&gt; &lt;a href="https://github.com/CoinClubQuincy/XDC-BrokerageDapp"&gt;https://github.com/CoinClubQuincy/XDC-BrokerageDapp&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>nftmarketplace</category>
      <category>brokersdealer</category>
    </item>
    <item>
      <title>A Conceptualization on How Brokers,Banks and Finance Institutions can Tokenize Assets on XDC</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Thu, 27 Jul 2023 17:46:57 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17</link>
      <guid>https://www.xdc.dev/yourbroquincy/a-conceptualization-on-how-brokersbanks-and-finance-institutions-can-tokenize-assets-on-xdc-2g17</guid>
      <description>&lt;p&gt;Being able to tokenize assets, such as commodities, securities, derivatives, currencies, and other types of assets, can allow financial institutions like banks and brokerage firms to have easier means of managing, trading, and accounting for different assets, not only for themselves but also for their trade partners.&lt;br&gt;
These organizations can offset databasing costs by having the accounting of their assets on decentralized networks, making them easier to exchange and cheaper to operate. By moving hosting fees to transaction fees, the management of these assets becomes incredibly inexpensive and allows these organizations to focus more on their business model rather than on the hosting and operation of the systems that run their business.&lt;br&gt;
Having assets tokenized on decentralized networks allows for a shared accounting of unique assets that would otherwise be siloed in independent databases operated by individual organizations. The means of syncing information between organizations during an exchange or transfer can be slow and a manual process when dealing with international organizations. When these assets are tokenized and used as shared accounting tools, the means of exchanging ownership of different assets becomes simple.&lt;br&gt;
I built a proof-of-concept smart contract that takes the place of a broker who is not only tokenizing their possessed assets (asset certificates custodied under management) for their clients but also allows for these assets to be exchanged with other brokerage services. This contract is meant to illustrate that utilizing smart contracts and tokenization as a tool can allow for a simple means of management of these new assets, a cheaper operational cost, and a shared accounting tool that allows for engagement with anyone who also operates on the XDC network.&lt;br&gt;
This asset smart contract provides a means for administrators to manage the contract by possessing a particular token called the handlerToken. The handler token is a token that acts as a key and allows the broker to create new assets with predefined sets of attributes.&lt;br&gt;
When the handler deploys the contract the handler key is generated with a random integer not to interfere with the other asset tokens being generated, each token is paired to an integer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//initializer Execute some initial code as contract is launched
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also, when launching the contract, you must set a Uniform Resource Identifier (URI). The URI is a set of metadata referenced by the user interface (UI) to allow data about the assets to be depicted on a screen. This typically includes attributes about the asset like images, the asset's origin broker, or even a name and description of the asset.&lt;br&gt;
These attributes are typically hosted off-chain, but their links are referenced in the URI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"{id}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://hostedSite/description/{id}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"image"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://hostedSite/{id}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"Broker"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"QTrade"&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The administrator becomes the initial handlerToken holder as the contract is launched. This special token grants exclusive rights to certain contract functions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="c1"&gt;//Store Asset details within contract 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//This function allows you to add or create new tokens and log their data into the smart contract 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;AddToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att2&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;att1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;att2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the contract is launched, the handler can call the AddToken function to create a new token to represent an asset. These tokens represent unique assets possessed by the broker with predefined attributes. The trust that these assets represent tangible means of ownership relies on the trust of the broker who issued them. Similar to how assets custodied on an app like Robin Hood are trusted due to Robin Hood being a trusted organization, if I were to create a clone of Robin Hood and sell assets that I do not currently possess, the user would not actually be buying the asset, and my sales would be fraudulent.&lt;br&gt;
The firm can provide the token's name and attributes during the token creation process. In practice, these attributes can be anything about the asset that is important, like total supply, origin, expiration date (commodities/derivatives), or any other detail to describe the asset.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//view token name and price of token to gauge what asset is corelated to the index nuber acociatyed with the asset
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;viewToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;view&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Users can view the name of a token and its attributes by calling the viewToken function.&lt;br&gt;
The contract allows the handlerToken holder to move or destroy abandoned tokens to help recover lost or stolen assets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//if the broker for any reason need to move the asset from an abandond account
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//they can use the move Asset function 
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;moveAsset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Insufficient balance"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;safeTransferFrom&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_userB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"0x0"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;destroyAsset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Insufficient balance"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_burn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In summary, this smart contract offers a convenient and secure way for finance firms and brokers to create and manage new assets on XDC. The handlerToken mechanism provides the necessary access control, allowing administrators to govern the contract while empowering brokers to create unique and valuable representations of their assets to be easily exchanged.&lt;/p&gt;

&lt;p&gt;These Assets are accounting tools and as tools they are built to allow for a better more productive financial system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="c1"&gt;// SPDX-License-Identifier: GPL-3.0
&lt;/span&gt;&lt;span class="k"&gt;pragma&lt;/span&gt; &lt;span class="n"&gt;solidity&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"@openzeppelin/contracts/token/ERC1155/ERC1155.sol"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;Asset&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;totalCoins&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//toal tokens
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//initializer Execute some initial code as contract is launched
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;uint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//The Handler function allows the holder of the handler token to allows the owner of the contract create more assets 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// As well as allows only the handler to redeem value from the contract
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;handlerToken&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"user does not hold handlerToken"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//Store Asset details within contract 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//This function allows you to add or create new tokens and log their data into the smart contract 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;AddToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att2&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;att3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Tokens&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;att1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;att2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;totalCoins&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="c1"&gt;//view token name and price of token to gauge what asset is corelated to the index nuber acociatyed with the asset
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;viewToken&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;view&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tokens&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;assetType&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//if the broker for any reason need to move the asset from an abandond account
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="c1"&gt;//they can use the move Asset function 
&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;moveAsset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Insufficient balance"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_burn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;destroyAsset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Insufficient balance"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;_burn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_userA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Token&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*&lt;em&gt;GitHub: *&lt;/em&gt; &lt;a href="https://github.com/CoinClubQuincy/XDC-Automated-Asset-Management"&gt;https://github.com/CoinClubQuincy/XDC-Automated-Asset-Management&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>assets</category>
      <category>broker</category>
      <category>tokenize</category>
    </item>
    <item>
      <title>Automating Agreements with the XDC network</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Tue, 18 Jul 2023 19:19:57 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/automating-agreements-with-the-xdc-network-1ppg</link>
      <guid>https://www.xdc.dev/yourbroquincy/automating-agreements-with-the-xdc-network-1ppg</guid>
      <description>&lt;p&gt;I started a series of templates to help other developers with their projects. I created a basic contract that allows you to manage and represent an asset, such as a stock, commodity, or even debt. The contract can also programmatically manage the means of management of the asset and assign metadata to describe its attributes.&lt;/p&gt;

&lt;p&gt;The contract's terms and conditions are embedded in the code and stored on the blockchain. Once deployed, the contract becomes immutable, meaning that its contents cannot be altered or tampered with. This immutability ensures that the agreed-upon terms cannot be changed without the consent of all parties involved. Additionally, the contract's transparency allows all parties to view and verify its content, eliminating the need for trust in a central authority.&lt;/p&gt;

&lt;p&gt;The contract assigns a document hash to a variable, which represents the agreement between the parties. The document hash serves as a unique identifier for the agreement's content and can be used to verify its integrity. By comparing the document hash provided by any party to the stored document hash, the contract can determine whether the agreement has been modified or tampered with.&lt;/p&gt;

&lt;p&gt;The contract enables parties to sign the agreement by interacting with the smart contract using their respective addresses. Once a party signs the contract, their address is recorded, indicating their consent and commitment to the agreement. This digital signature provides a non-repudiable proof of the party's involvement and prevents them from denying their participation later.&lt;/p&gt;

&lt;p&gt;The contract includes functions for counterproposals, allowing either party to suggest modifications to the agreement by reassigning the document hash. This automation eliminates the need for manual communication and revision of physical documents. Furthermore, the contract keeps track of the total number of counterproposals, enabling parties to track the negotiation process accurately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="c1"&gt;// SPDX-License-Identifier: GPL-3.0
&lt;/span&gt;&lt;span class="k"&gt;pragma&lt;/span&gt; &lt;span class="n"&gt;solidity&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"@openzeppelin/contracts/token/ERC1155/ERC1155.sol"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;//Smart contract
&lt;/span&gt;&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;Contract&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint256&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;constant&lt;/span&gt; &lt;span class="n"&gt;PartyA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint256&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;constant&lt;/span&gt; &lt;span class="n"&gt;PartyB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;uint256&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;constant&lt;/span&gt; &lt;span class="n"&gt;witnessA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint256&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;constant&lt;/span&gt; &lt;span class="n"&gt;witnessB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;DocumentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;PartyASignature&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;address&lt;/span&gt; &lt;span class="n"&gt;PartyBSignature&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;total_Counter_Proposals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;contractComplete&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;//Create 2 tokens for Party A-B
&lt;/span&gt;    &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;ERC1155&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;DocumentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyA&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_mint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;//only Party A-B can use functions with their modifier
&lt;/span&gt;    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;PartyA_Sign&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contractComplete&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"contract has already been signed"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;PartyB_Sign&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contractComplete&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"contract has already been signed"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;///once both parties have sign you can no loger modify the contract
&lt;/span&gt;    &lt;span class="k"&gt;modifier&lt;/span&gt; &lt;span class="n"&gt;contractSigned&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;contractComplete&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"Contract has been signed by both parties"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PartyASignature&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;PartyBSignature&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="s"&gt;"contract has been signed"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;//this function will compare any data of hash to see if it matches the DocumentHash
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="k"&gt;view&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nb"&gt;keccak256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;abi&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;encodePacked&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DocumentHash&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// Party A or party B can make a counter proposal and  reassign the hash
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;counter_proposal_A&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;  &lt;span class="n"&gt;PartyA_Sign&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;DocumentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;total_Counter_Proposals&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;counter_proposal_B&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;PartyB_Sign&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="n"&gt;DocumentHash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;_DocumentHash&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="n"&gt;total_Counter_Proposals&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;//Both parties can sign an make the contract official
&lt;/span&gt;    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;sign_proposal&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;contractSigned&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="k"&gt;memory&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyA&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="n"&gt;PartyASignature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Party A has signed Document"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;balanceOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;PartyB&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="n"&gt;PartyBSignature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"Party A has signed Document"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PartyASignature&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;PartyBSignature&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="kt"&gt;address&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="n"&gt;contractComplete&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"only one party  has signed"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"error user does not hold token to authorize this call"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The contract utilizes modifiers to control the execution of certain functions. For example, the PartyA_Sign and PartyB_Sign modifiers ensure that only Party A or Party B, respectively, can call the counter-proposal functions. The contractSigned modifier restricts further modifications to the agreement once both parties have signed, preventing any unauthorized changes.&lt;/p&gt;

&lt;p&gt;These features provided by smart contracts on XDC offer increased efficiency, security, transparency, and automation to contractual agreements. They have the potential to revolutionize the way parties engage in business interactions, potentially reducing the need for intermediaries in certain scenarios.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/CoinClubQuincy/XDC-Automated-Asset-Management"&gt;https://github.com/CoinClubQuincy/XDC-Automated-Asset-Management&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>smartcontract</category>
    </item>
    <item>
      <title>The Coupled Relationship between Blockchain and AI and how it changes Big Data Analysis</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Wed, 08 Mar 2023 22:10:33 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/the-coupled-relationship-between-blockchain-and-ai-and-how-it-changes-big-data-analysis-nbm</link>
      <guid>https://www.xdc.dev/yourbroquincy/the-coupled-relationship-between-blockchain-and-ai-and-how-it-changes-big-data-analysis-nbm</guid>
      <description>&lt;p&gt;The power of artificial intelligence (AI) has taken the tech industry by storm in recent months. Years of computer science modeling through machine learning and deep learning have provided the traction for what has become a wide range of AI use cases. Its capabilities are now evident in everyday use, whether giving instructions to a smart assistant like Siri or sitting behind the wheel of a self-driving car. And with supervised and reinforcement learning, conversant AI systems can handle an articulate back-and-forth discussion with a human. The trajectory of AI’s potential impact on our lives seems long and steep.&lt;/p&gt;

&lt;p&gt;Blockchain technology provides a unique opportunity for big data to operate like never before. Previously, a subset of private data would have to be gathered over time until it became rich enough for its artificial intelligence (AI) to run insights.&lt;/p&gt;

&lt;p&gt;Coinmarketcap recently published a very informative piece about the merging of blockchain and AI. Without getting too much into why AI and blockchain make so much sense together, the article outlines a dozen or so AI projects on blockchain, from generative NFTs to health and wellness applications. But why? Why does the overlap of blockchain and AI present so much promise in the long term? Let’s first discuss the basics of this powerful combination.&lt;/p&gt;

&lt;p&gt;Through behavior pattern observations and learning, traditional AI systems analyze all sorts of operations, particularly for financial institutions and financial regulators. These tasks can range from fraud detection, to audits, to live market research, making way for predictive analytics.&lt;/p&gt;

&lt;p&gt;Data to an AI is like a knife sharpener to a blade. The more data, the more accurate and precise the results are — similar to the more you sharpen a knife, the easier it is to cut. The difference is AI will have an infinitely sharpening blade that makes it more accurate over time. &lt;/p&gt;

&lt;p&gt;As data on blockchain is much more accessible, sharpening this blade becomes a lot easier. On-chain applications generate more user data that AI systems can analyze almost instantaneously. Blockchain can not only extract rich data from smart contracts, it can also pull data from the relationship between one contract and another, or between contracts and users. This allows for data insight on behavioral patterns like we’ve never seen before.&lt;/p&gt;

&lt;p&gt;For those worried about privacy, this will not be private identifying data. The data being analyzed will be similar to public market data provided by exchange and regulator agencies for transparency, the way public companies have reporting standards. The big difference is the on-chain aggregate data being reported will be public and automatically produced instantaneously.&lt;/p&gt;

&lt;p&gt;When you couple AI with blockchain technology, there is just so much more data readily available. Blockchain and AI would allow financial regulators to conduct live audits and fraud detection. Decentralized applications on a given blockchain network can maintain a close relationship with AI to root out bot users, analyze user activity, generate complex user stats, and conduct in-depth evaluations of third party application activity.&lt;/p&gt;

&lt;p&gt;Data is power. As more applications come onto blockchain networks, their activity and growth can be monitored in new, unprecedented ways. It can be analyzed in real time for insights into new companies, allowing for creation of better growth models or increased profitability.&lt;/p&gt;

&lt;p&gt;Real time monitoring of an economy, afforded uniquely by blockchain and AI, can provide insight into macroeconomic systems that is simply not possible through other means. Economic growth in an entire industry could be tracked live, allowing economists and lawmakers to craft relevent policy or detect widespread impropriety. Government subsidies could be doled out while AI monitors for fraudulent activity.&lt;/p&gt;

&lt;p&gt;There are over 100 projects on blockchain - or in the pipeline - that incorporate AI. Some of these use - or plan to use - AI as a predictor much like traditional AI platforms. These capabilities range from spot stock trading and hedge funds, to disease prevention and diagnosis. Others are simply expanding AI capabilities in a very general sense, and bringing them on blockchain. But down the line, as more data goes on chain, we will see even more exciting, real-time, extremely practical use cases like what I outlined above. These AI capabilities will only be possible on blockchain networks.&lt;/p&gt;

&lt;p&gt;When coupled with the distributed ledger of a blockchain network, the possibilities of AI are nearly limitless. And as no one party has a monopoly on subsets of data, not only will the intelligence be richer, but the AI capacities themselves can grow by leaps and bounds through open source innovation. It’s almost impossible to predict exactly what is in the promising future of blockchain plus AI, but I can’t wait to see what it brings.&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>ai</category>
      <category>bigdata</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Creating an index of all Layer 2s on the XDC Network</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Thu, 22 Dec 2022 20:25:09 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/creating-an-index-of-all-layer-2s-on-the-xdc-network-3bgi</link>
      <guid>https://www.xdc.dev/yourbroquincy/creating-an-index-of-all-layer-2s-on-the-xdc-network-3bgi</guid>
      <description>&lt;p&gt;Currently for the past few days I've been putting together a list of Layer 2s on the XDC Network to index all current DApps and there contract addresses,github,documentation, and website to allow developers a simple means of finding information on XDC layer 2 projects to allow new devs to build smart contracts with features embed from current projects allowing:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;more use and adoption of current Layer 2s &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.makes it easier to create new dApps with more functionality (like using a DEX,NFT market place, or oracle) can now leverage current L2s to bring more services to their projects.&lt;/p&gt;

&lt;p&gt;Currently Ive taken note of the bigger ones &lt;strong&gt;(Globiance, XSwap, Plugin, StoreX)&lt;/strong&gt; as well as some others to list on the XDC Community Website to allow for Users, Investors and Developers to have a one step shop for XDC layer 2s&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The basic require meant to be included in the index are:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a valid Website with a secure (HTTPS) domain name &lt;/li&gt;
&lt;li&gt;Github repo with any public open source code
&lt;/li&gt;
&lt;li&gt;The Contract Address
&lt;/li&gt;
&lt;li&gt;The contract Must be Verified on Blocksscan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As more applications come on to the network we will continuously be adding to the index to continually updating the website to allow for people to find all available info on current Layer 2s&lt;/p&gt;

&lt;p&gt;once a good draft of Layer 2s have been put together you will be able to see them on the XDC Community website to find all the info you need on your favorite L2s on XDC.&lt;/p&gt;

&lt;p&gt;all suggestions welcomed, Thank you!&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>layer2s</category>
      <category>indexofdapp</category>
    </item>
    <item>
      <title>NFT Keys to Manage Multi-Sig Wallets</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Thu, 03 Nov 2022 20:51:49 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/nft-keys-to-manage-multi-sig-wallets-163o</link>
      <guid>https://www.xdc.dev/yourbroquincy/nft-keys-to-manage-multi-sig-wallets-163o</guid>
      <description>&lt;p&gt;Most people are familiar with the aesthetic functions of non-fungible tokens (NFTs), but their capabilities actually include functionality that goes far beyond anything visual. Those who understand that NFTs can have real utility usually think of tickets or supply chain tools. But an NFT can also act as a key.&lt;/p&gt;

&lt;p&gt;In the world of crypto, having multiple signatures required for wallet access allows for further security and further redundancy as well as a decentralized mechanism for giving multiple parties custody of assets in a wallet. &lt;/p&gt;

&lt;p&gt;In addition, using a key to cast a signature on a multi-signature wallet allows users to easily move the access key to other devices. Users can even delegate their key to another smart contract for further functionality. Contract keys may be a popular contract design in the future due to their ability to hold NFTs as an access mechanism to the contract. As contracts become increasingly sophisticated, access keys may manage access rights for all users and contracts that use them, and can allow further automation when used within other smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.xdc.dev/images/Ko4BcCfuzAdzPguDab4eS689izbZzJfrwBiF-fHcLDg/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL2FydGljbGVz/L2JzMng4Z2Q0eDlh/cGlydnRxYmI0LnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://www.xdc.dev/images/Ko4BcCfuzAdzPguDab4eS689izbZzJfrwBiF-fHcLDg/w:880/mb:500000/ar:1/aHR0cHM6Ly93d3cu/eGRjLmRldi91cGxv/YWRzL2FydGljbGVz/L2JzMng4Z2Q0eDlh/cGlydnRxYmI0LnBu/Zw" alt="Image description" width="557" height="925"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this Multisig Key contract, I added in a few additional functions. Instead of tying each account to an address, I tied it to a token. This allows for users to use an NFT as a key to sign a proposed transaction. In theory, the NFT can act as a ballot to propose and vote on proposals proposed within the contract by any of the key holders. This means a multisig contract can be used to propose and vote on principal items by the key holders as well as act as a standing treasury for assets to be decentrally held in custody and voted on to be reallocated to other addresses.&lt;/p&gt;

&lt;p&gt;The Multisig Key contract can primarily act as a decentralized trust, a dApp, DAO, escrow, or even a secondary wallet for someone who wants to have multiple protective measures to safeguard their assets. With any of these use cases, users can have a form of governance and community control over a given smart contract. In fact, they can make community-driven decisions by having each user hold a key which they use to vote. Additional means of governance can be programmed into the smart contract using the signer key tokens as governance tokens for any additional function created.&lt;/p&gt;

&lt;p&gt;dApps and DAOs can also use this contract as a library for basic governance amongst a given set of users. Keys can be used to manage assets and votes within their applications, greatly increasing functionality of a dApp with little effort. As further libraries are built out, future dApps and DAOs will be able to gain greater functionality for less.&lt;/p&gt;

&lt;h1&gt;
  
  
  when engaging with the contract there are many different Settings (proposals, confirmation to a proposal, type of proposal) so all input parameters are an array with a syntax in accordance to the Setting
&lt;/h1&gt;

&lt;h1&gt;
  
  
  &lt;strong&gt;&lt;em&gt;submitProposal()&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;Parameters&lt;/em&gt;
&lt;/h1&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function submitProposal(uint  _ammount, address [] memory  _address,string  memory  _topic,string  memory  _messege) public CheckKeys returns(bool)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;uint: [Amount,tokenID] &lt;/li&gt;
&lt;li&gt;address: [0: toAddress, 1: XRC_Type, 2: NFT_id] &lt;strong&gt;(token based parameters)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;String: [Topic,Message, FunctionExecution() ] &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  #int [] Based Parameters
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;governance Vote&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[NA]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;XDC &amp;amp; XRC20 transactions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[amount,N/A]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;XRC721&amp;amp;1155 Transactions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[1,tokenNumber]&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  #address [] Based Parameters
&lt;/h1&gt;

&lt;p&gt;Note: 0x0000000000000000000000000000000000000000 is used as a 0 place hoder&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance Vote:&lt;/strong&gt;&lt;br&gt;
A blank vote where token holders can vote on a topic (no execution is made other than showing the result of a majority vote)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;0: (address) 0x0000000000000000000000000000000000000000 (Required!)&lt;/li&gt;
&lt;li&gt;1: (address) 0x0000000000000000000000000000000000000000 (Required!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;XDC Transactions:&lt;/strong&gt;&lt;br&gt;
A simple transaction sending XDC to another address upon a completed vote&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;0:(address) toAddress &lt;/li&gt;
&lt;li&gt;1: N/A&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;XRC20  Transactions:&lt;/strong&gt;&lt;br&gt;
A simple transaction sending XRC20 tokens to another address upon a completed vote&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;0: (address) toAddress &lt;/li&gt;
&lt;li&gt;1: (address) XRC contract address &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;XRC721&amp;amp;1155 Transactions:&lt;/strong&gt;&lt;br&gt;
A simple transaction sending a XRC721 or XRC1155  tokens to another address upon a completed vote&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;0: (address) toAddress 

&lt;ul&gt;
&lt;li&gt;1: (address) XRC contract address&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  #String [] Based Parameters
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Topic &amp;amp; Message&lt;/strong&gt; &lt;br&gt;
Topic and message of transaction or vote describing the &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;["Topic name" , "message",""] : XDC transaction without function excution or blank transaction&lt;/li&gt;
&lt;li&gt;["Topic name" , "message","XRC20"] : XRC20 transaction or blank transaction&lt;/li&gt;
&lt;li&gt;["Topic name" , "message","XRC20"] : NFT transaction or blank transaction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;FunctionExecution()&lt;/strong&gt; [Not completed]&lt;/p&gt;

&lt;p&gt;Function Execution can only be made with an XDC transaction and execute another contracts external functions &lt;strong&gt;(only one execution at a time!)&lt;/strong&gt; &lt;br&gt;
so a multi executing function would require to be done in a separately created contract where the Treasury would execute to automate multiple executions&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; ["Topic name" , "message", FunctionExecution()]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Github:&lt;a href="https://github.com/CoinClubQuincy/Multi-Sig-Treasury"&gt;https://github.com/CoinClubQuincy/Multi-Sig-Treasury&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>evm</category>
      <category>contract</category>
    </item>
    <item>
      <title>Unable to Sync Testnet Nodes</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Fri, 14 Oct 2022 21:24:44 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/unable-to-sync-testnet-nodes-4n67</link>
      <guid>https://www.xdc.dev/yourbroquincy/unable-to-sync-testnet-nodes-4n67</guid>
      <description>&lt;p&gt;For the past few weeks I've been getting quite familiar with deploying and managing private XDC test networks and i came into a little snag once having them deployed i couldn't get them to sync. Either I'm stuck on block 0 or when I do have  have some short term successes i maintain having consensus for about 500 blocks or so but then the nodes go into a pending state and get stuck on that block &lt;/p&gt;

&lt;p&gt;I made an Issue is the &lt;a href="https://github.com/XDCFoundation/xdc-testnetwork-leo/issues/new"&gt; xdc-testnetwork-leo&lt;/a&gt; Github Repo addressing my struggles following the documentation to deploy the test network&lt;/p&gt;

&lt;p&gt;Ive been deploying the testnets and trying to get them synced for a weeks now my primary issue seems to be the nodes are able to peer and for a time will make consensus but after 500 blocks or so the network gets stalled and won't proceed to make consensus any more.&lt;/p&gt;

&lt;p&gt;I don't get any errors except for the logs stating its not their turn to publish a block, or permission denied or failed to create the protocol stack I'm not sure what is causing this to be the case but its keeping my nodes from gaining consensus. even with the error I can see the nodes are online but not sure what the consensus issue may be of what may be flagging any of the issues listed above.&lt;/p&gt;

&lt;p&gt;While following the Documentation most of the documentation has been pretty straight forward the 2 parts that were difficult to reconcile was making sure the encodeIDs and IPs are associated to every node so the boot nodes can see and launch off each other and ensuring firewall/ Security group ports are Identified so the nodes can have a clear read of each others ports the main ones being 8545-8547 for the RPC and 30303-30307 for peering &lt;/p&gt;

&lt;p&gt;The main issue is syncing and consensus for moving forward with progress to the next block with a Master node and 2 other full nodes (3 nodes total) &lt;/p&gt;

&lt;p&gt;What gives a network initial consensus? the boot nodes seem to be the initial connectors and they are able to see each other but what gives it consensus when they can see each other?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ubuntu@ip-172-31-93-57:~/xdc-testnetwork-leo$ bash run.sh 
touch: cannot touch '.pwd': Permission denied
make: go: No such file or directory
go run build/ci.go install ./cmd/XDC
make: go: No such file or directory
make: *** [Makefile:14: XDC] Error 127
INFO [10-14|17:43:30] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/1: permission denied
INFO [10-14|17:43:30] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/2: permission denied
INFO [10-14|17:43:30] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/3: permission denied
INFO [10-14|17:43:30] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/1: permission denied
INFO [10-14|17:43:30] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/2: permission denied
INFO [10-14|17:43:31] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/3: permission denied
Starting the bootnode ...
Starting the nodes ...
Fatal: -ListenUDP: listen udp 0.0.0.0:30301: bind: address already in use
INFO [10-14|17:43:31] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/1: permission denied
INFO [10-14|17:43:31] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/2: permission denied
INFO [10-14|17:43:31] Maximum peer count                       ETH=25 LES=0 total=25
Fatal: Failed to create the protocol stack: mkdir /home/ubuntu/xdc-testnetwork-leo/nodes/3: permission denied
ubuntu@ip-172-31-93-57:~/xdc-testnetwork-leo$ sudo bash run.sh 
make: go: No such file or directory
go run build/ci.go install ./cmd/XDC
make: go: No such file or directory
make: *** [Makefile:14: XDC] Error 127
INFO [10-14|17:43:38] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:38] XDCX datadir                             path=/root/.XDC
INFO [10-14|17:43:38] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:38] XDCX datadir                             path=/root/.XDC
INFO [10-14|17:43:38] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:38] XDCX datadir                             path=/root/.XDC
Starting the bootnode ...
Starting the nodes ...
Fatal: -ListenUDP: listen udp 0.0.0.0:30301: bind: address already in use
INFO [10-14|17:43:39] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:39] XDCX datadir                             path=/root/.XDC
INFO [10-14|17:43:39] Allocated cache and file handles         database=/root/.XDC cache=134.22mB handles=1024
INFO [10-14|17:43:39] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:39] XDCX datadir                             path=/root/.XDC
INFO [10-14|17:43:39] Allocated cache and file handles         database=/root/.XDC cache=134.22mB handles=1024
ERROR[10-14|17:43:39] Can't create new DB                      error="resource temporarily unavailable"
INFO [10-14|17:43:39] Starting peer-to-peer node               instance=XDC/v1.4.4-stable/linux-amd64/go1.15
INFO [10-14|17:43:39] Allocated cache and file handles         database=/home/ubuntu/xdc-testnetwork-leo/nodes/2/XDC/chaindata cache=805.31mB handles=512
INFO [10-14|17:43:39] Maximum peer count                       ETH=25 LES=0 total=25
INFO [10-14|17:43:39] XDCX datadir                             path=/root/.XDC
INFO [10-14|17:43:39] Allocated cache and file handles         database=/root/.XDC cache=134.22mB handles=1024
ERROR[10-14|17:43:39] Can't create new DB                      error="resource temporarily unavailable"
INFO [10-14|17:43:39] Starting peer-to-peer node               instance=XDC/v1.4.4-stable/linux-amd64/go1.15
INFO [10-14|17:43:39] Allocated cache and file handles         database=/home/ubuntu/xdc-testnetwork-leo/nodes/3/XDC/chaindata cache=805.31mB handles=512
INFO [10-14|17:43:39] Starting peer-to-peer node               instance=XDC/v1.4.4-stable/linux-amd64/go1.15
INFO [10-14|17:43:39] Allocated cache and file handles         database=/home/ubuntu/xdc-testnetwork-leo/nodes/1/XDC/chaindata cache=805.31mB handles=512
INFO [10-14|17:43:39] Initialised chain configuration          config="{ChainID: 72 Homestead: 1 DAO: &amp;lt;nil&amp;gt; DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: &amp;lt;nil&amp;gt; Engine: XDPoS}"
INFO [10-14|17:43:39] Initialising Ethereum protocol           versions="[63 62]" network=72
INFO [10-14|17:43:39] Loaded most recent local header          number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Loaded most recent local full block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Loaded most recent local fast block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Initialised chain configuration          config="{ChainID: 72 Homestead: 1 DAO: &amp;lt;nil&amp;gt; DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: &amp;lt;nil&amp;gt; Engine: XDPoS}"
INFO [10-14|17:43:39] Initialising Ethereum protocol           versions="[63 62]" network=72
INFO [10-14|17:43:39] Loaded most recent local header          number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Initialised chain configuration          config="{ChainID: 72 Homestead: 1 DAO: &amp;lt;nil&amp;gt; DAOSupport: false EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 4 Constantinople: &amp;lt;nil&amp;gt; Engine: XDPoS}"
INFO [10-14|17:43:39] Loaded most recent local full block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Initialising Ethereum protocol           versions="[63 62]" network=72
INFO [10-14|17:43:39] Loaded most recent local fast block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Loaded local transaction journal         transactions=0 dropped=0
INFO [10-14|17:43:39] Loaded most recent local header          number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Loaded most recent local full block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Regenerated local transaction journal    transactions=0 accounts=0
INFO [10-14|17:43:39] Loaded most recent local fast block      number=0 hash=8997ba…315e17 td=1
INFO [10-14|17:43:39] Starting P2P networking 
INFO [10-14|17:43:39] Loaded local transaction journal         transactions=0 dropped=0
INFO [10-14|17:43:39] Regenerated local transaction journal    transactions=0 accounts=0
INFO [10-14|17:43:39] Starting P2P networking 
INFO [10-14|17:43:39] Loaded local transaction journal         transactions=1 dropped=0
INFO [10-14|17:43:39] Regenerated local transaction journal    transactions=1 accounts=1
INFO [10-14|17:43:39] Starting P2P networking 
INFO [10-14|17:43:41] UDP listener up                          self=enode://3a80d2dde89c9fdca3f7d28f49bcac1266f5f78095418971c1feff8c38b1809b51a91b793fc4b1d2a9731e7671c619a490cd9c202efa122a4f7b98307e341902@[::]:30305
INFO [10-14|17:43:41] UDP listener up                          self=enode://5661081332f458bd512daa76c149042c00f78f045aba4494cc64fcfaf7517638025b979d0fe11c7a420447f76d24ddd438da6253027820ed95eade4fcdeaf4b6@[::]:30303
INFO [10-14|17:43:41] HTTP endpoint opened                     url=http://0.0.0.0:8545 cors=* vhosts=*
INFO [10-14|17:43:41] WebSocket endpoint opened                url=ws://[::]:8555
INFO [10-14|17:43:41] UDP listener up                          self=enode://6a67c3175b994311c8e4408b671471ef166d3d3d828d432233f349c395907f9a843b18d5e6ccab1c278778193c452dcfefc83d431678078d41d7140bcef3860b@[::]:30304
INFO [10-14|17:43:41] HTTP endpoint opened                     url=http://0.0.0.0:8547 cors=* vhosts=*
INFO [10-14|17:43:41] WebSocket endpoint opened                url=ws://[::]:8557
INFO [10-14|17:43:41] RLPx listener up                         self=enode://6a67c3175b994311c8e4408b671471ef166d3d3d828d432233f349c395907f9a843b18d5e6ccab1c278778193c452dcfefc83d431678078d41d7140bcef3860b@[::]:30304
INFO [10-14|17:43:41] IPC endpoint opened                      url=/home/ubuntu/xdc-testnetwork-leo/nodes/1/XDC.ipc
INFO [10-14|17:43:41] RLPx listener up                         self=enode://5661081332f458bd512daa76c149042c00f78f045aba4494cc64fcfaf7517638025b979d0fe11c7a420447f76d24ddd438da6253027820ed95eade4fcdeaf4b6@[::]:30303
INFO [10-14|17:43:41] IPC endpoint opened                      url=/home/ubuntu/xdc-testnetwork-leo/nodes/2/XDC.ipc
INFO [10-14|17:43:41] HTTP endpoint opened                     url=http://0.0.0.0:8546                              cors=* vhosts=*
INFO [10-14|17:43:41] RLPx listener up                         self=enode://3a80d2dde89c9fdca3f7d28f49bcac1266f5f78095418971c1feff8c38b1809b51a91b793fc4b1d2a9731e7671c619a490cd9c202efa122a4f7b98307e341902@[::]:30305
INFO [10-14|17:43:41] IPC endpoint opened                      url=/home/ubuntu/xdc-testnetwork-leo/nodes/3/XDC.ipc
INFO [10-14|17:43:41] WebSocket endpoint opened                url=ws://[::]:8556
INFO [10-14|17:43:42] Unlocked account                         address=xdc4e7D2c63d5afd93058fC7a827745a17339EdCcFF
INFO [10-14|17:43:42] Etherbase automatically configured       address=xdc4e7D2c63d5afd93058fC7a827745a17339EdCcFF
INFO [10-14|17:43:42] Unlocked account                         address=xdcb96016369693812449D6F08e64275d5D639258D1
INFO [10-14|17:43:42] Etherbase automatically configured       address=xdcb96016369693812449D6F08e64275d5D639258D1
INFO [10-14|17:43:42] Unlocked account                         address=xdc78e5c3bBBcD34a1cffdbEe9b6670e59763709bC4
INFO [10-14|17:43:42] Etherbase automatically configured       address=xdc78e5c3bBBcD34a1cffdbEe9b6670e59763709bC4

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

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;This shows that the nodes are peering but for some reason they won't make consensus I have a transaction pending but no consensus is made&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt; txpool
{
  content: {
    pending: {
      xdc9EC5998c873A295b01491375B092E0BCF5B0B4e8: {
        0: {...}
      }
    },
    queued: {}
  },
  inspect: {
    pending: {
      xdc9EC5998c873A295b01491375B092E0BCF5B0B4e8: {
        0: "xdcB22fe441774c143D3CeF39d739b9B062C087a9ae: 100000000000000000000 wei + 21000 gas × 1000000000 wei"
      }
    },
    queued: {}
  },
  status: {
    pending: 1,
    queued: 0
  },
  getContent: function(callback),
  getInspect: function(callback),
  getStatus: function(callback)
}

&amp;gt; eth.blockNumber
0
&amp;gt; net.peerCount
2
&amp;gt; admin.peers
[{
    caps: ["eth/62", "eth/63"],
    id: "3a80d2dde89c9fdca3f7d28f49bcac1266f5f78095418971c1feff8c38b1809b51a91b793fc4b1d2a9731e7671c619a490cd9c202efa122a4f7b98307e341902",
    name: "XDC/v1.4.4-stable/linux-amd64/go1.15",
    network: {
      inbound: false,
      localAddress: "172.31.93.57:42776",
      remoteAddress: "18.212.67.27:30305",
      static: false,
      trusted: false
    },
    protocols: {
      eth: {
        difficulty: 1,
        head: "0x8997bae00839d39d4dbc3f6fa3a209fa56f7ce8c558ef71eaf6b56cb31315e17",
        version: 63
      }
    }
}, {
    caps: ["eth/62", "eth/63"],
    id: "6a67c3175b994311c8e4408b671471ef166d3d3d828d432233f349c395907f9a843b18d5e6ccab1c278778193c452dcfefc83d431678078d41d7140bcef3860b",
    name: "XDC/v1.4.4-stable/linux-amd64/go1.15",
    network: {
      inbound: false,
      localAddress: "172.31.93.57:41228",
      remoteAddress: "18.212.67.27:30304",
      static: false,
      trusted: false
    },
    protocols: {
      eth: {
        difficulty: 1,
        head: "0x8997bae00839d39d4dbc3f6fa3a209fa56f7ce8c558ef71eaf6b56cb31315e17",
        version: 63
      }
    }
}]
&amp;gt; eth.coinbase
"xdcb96016369693812449d6f08e64275d5d639258d1"
&amp;gt; admin.nodeInfo.enode
"enode://5661081332f458bd512daa76c149042c00f78f045aba4494cc64fcfaf7517638025b979d0fe11c7a420447f76d24ddd438da6253027820ed95eade4fcdeaf4b6@[::]:30303"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;Ive tried running all the nodes collectively on one server with the run.sh script &lt;a class="mentioned-user" href="https://www.xdc.dev/anilchinchawale"&gt;@anilchinchawale&lt;/a&gt; recommended from the XDPoSChain deployment script I've been able to have the nodes peer each other any sync for a short period of time. Ive also tried running the nodes on separate servers but I can get them to peer so I've been focusing on the single server node deployment strategy &lt;/p&gt;

&lt;p&gt;run.sh from &lt;strong&gt;XDPoSChain&lt;/strong&gt;&lt;br&gt;
`&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
_interupt&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; 
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Shutdown &lt;/span&gt;&lt;span class="nv"&gt;$child_proc&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="nb"&gt;kill&lt;/span&gt; &lt;span class="nt"&gt;-TERM&lt;/span&gt; &lt;span class="nv"&gt;$child_proc&lt;/span&gt;
    &lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;trap &lt;/span&gt;_interupt INT TERM

&lt;span class="nb"&gt;touch&lt;/span&gt; .pwd
&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; .env | xargs&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="nv"&gt;Bin_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;XDC

&lt;span class="nv"&gt;WORK_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$PWD&lt;/span&gt;
&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"/root/XinFin/XDPoSChain"&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$PROJECT_DIR&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; make XDC
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$WORK_DIR&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; ./nodes/1/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt;/chaindata &lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nv"&gt;wallet1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account import &lt;span class="nt"&gt;--password&lt;/span&gt; .pwd &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/1 &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PRIVATE_KEY_1&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nv"&gt;wallet2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account import &lt;span class="nt"&gt;--password&lt;/span&gt; .pwd &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/2 &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PRIVATE_KEY_2&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nv"&gt;wallet3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account import &lt;span class="nt"&gt;--password&lt;/span&gt; .pwd &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/3 &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PRIVATE_KEY_3&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/1 init ./genesis/genesis.json
  &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/2 init ./genesis/genesis.json
  &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/3 init ./genesis/genesis.json
&lt;span class="k"&gt;else
  &lt;/span&gt;&lt;span class="nv"&gt;wallet1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account list &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/1 | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nv"&gt;wallet2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account list &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/2 | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
  &lt;span class="nv"&gt;wallet3&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; account list &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/3 | &lt;span class="nb"&gt;head&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;FS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"({|})"&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;fi

&lt;/span&gt;&lt;span class="nv"&gt;VERBOSITY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3
&lt;span class="nv"&gt;GASPRICE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"1"&lt;/span&gt;
&lt;span class="nv"&gt;networkid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;50


&lt;span class="nb"&gt;echo &lt;/span&gt;Starting the bootnode ...
&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/bootnode &lt;span class="nt"&gt;-nodekey&lt;/span&gt; ./bootnode.key &lt;span class="nt"&gt;--addr&lt;/span&gt; 0.0.0.0:30301 &amp;amp;
&lt;span class="nv"&gt;child_proc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$!&lt;/span&gt; 

&lt;span class="nb"&gt;echo &lt;/span&gt;Starting the nodes ...
&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--bootnodes&lt;/span&gt; &lt;span class="s2"&gt;"enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30303,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30304,enode://ef4d512152b875de3fc3990e3e124ae55adea35c49c5df40d0c4bea9327116fcfba70b920a7c164e08f425876025cbcf2519ad5238e57c10ea205e7897926a35@45.76.113.250:30303,enode://bcda483330dc0845f521ad611bcdc8cb147a7a8008c022dba20da2ab52ae46fd6d04f3cb9b7da4e94cf81d2c61065e008a13b5f05f3b69795b0dbdd2a14bb48d@209.222.30.63:30303,enode://2edc16258f6f2e18b105362df5af89889b5dbb7b098f266c39ba1b6200e9dfa76b8fd3bc0cdefce089d9e285772ae69d549e6807b23341ac975d0c085b936f1b@139.180.131.100:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@149.28.135.114:30303,enode://5fcb6aa25e9e4184f278f842581507e4180851e861a59e1a02cf62f2927ee073ba921b5cba10301043f41ed494860f0ccc7508f1058c25f8ebcd56e9f8da018b@149.28.140.203:30303,enode://3a792327abf09be1b78db697c33de653d21bb702eaf6e292899c31a59f0b9535753a34d41f088416bc3f90d25c35ecd6b79d0015c36cf10f9a27c89ecd1f7fa4@149.28.140.232:30303,enode://26def7887241597a30314a77b1a32f156bdcc92eee198b086ae7c4dc26b986a9be6d078b09e93a1f963b083885020e1edfbf6b053dcebbdd090f6dfb289b59f0@149.28.142.223:30303,enode://f35e4ff8bfca2b37297dae0524146c2e4ef20c5d95be48cabe0072334bcf77a9385bad27b9630ee5ba4de451076c2123ad06113f21e3f78387a0e6fde7ec1b0b@45.77.183.160:30303,enode://44f8256e0285d1a94a73187116772522dcf53ef3affcac171cf01ffb00ec613ba1960f1309cc9353207a8f1211e645016c6e30b9669190aac8386c78545b84b1@198.13.34.190:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.218.68:30303,enode://5701cfd1d03a04a3a17076e50983397ff634ff7f00693f62f6d4d94107796b74b8e10b8ad6efbf1499ae0c6263e84594d30986c79242a37b1c9d27cddb57cdc5@207.148.71.42:30303,enode://b0bd514f1b0892ab26c1d8be59510406f7d700c74cd3cd03d3f8d0fc21b784bb2fb7bde3afacf435928ca9506decf73bd15af5a64bd5dd113b26fc91605ce397@45.77.181.79:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.135.153:30303,enode://297167bcccf50a94fd2b9a1f1a372228526a95066030295ee8842e0bcaf798da751974a8b08caa9fb9764d2b2d50e64ec5a90a8b942a2a9d6b1db9d5995de3ff@139.180.143.152:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.77.244.187:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.76.153.161:30303,enode://3a914391c6f6ff0af000b5e614df1074c2a2db2575d6c4d02c3d96bc00ed52ba4281df45b065cbc253c2a02d0bc34272520e772ee9880b28ef107e91b86166d8@109.169.55.28:30303,enode://2953c5ea2a2829a242123e14538b137be858602da1e68beb8c7f7ec797d9d42cf4f0c76b62e98c4d5578e0eeefa42a501fdfec7079e8db206d89d037a09cde3a@109.169.55.28:30304,enode://80dee88ded07fcb0ed1f4a9db4c60c0bd0592d44656571822b479047653b0c30d84e68c83057db048d2120cd7d504fd6a70a89161c31aaf98e65cfba4a77a528@109.169.55.28:30305,enode://7e495d7e1be1fc47d62f8510249435fb3b6f279880704896cbd78e05027298ed133979a388cc0ecf51fb014a8c68438b45e4a2d82ab1ed9cf86a31e87fed32c5@78.129.229.96:30303,enode://02c155fe4b34293b50d70a10889a57d9f2434fefdf142c6d24d73df9ccff19994cb243b55e87a9349a8f87d827363f74b0b40f44d96925aaaedadb456e38c0c0@78.129.229.96:30304,enode://bc2a722d080b008132ef395763d87f491fb6adc34b5d34b698cfeeadced2d4468ee5dc09f39956b4686c88af9bf26e39bc050feb52c0976238645a0343e6049f@78.129.229.96:30305,enode://560113969268e30a430991e36fcb1a6ea8a2bc16f23bc1dabffd6f8c17649237d58d8cf554e9ce882184abdc9b3a607230123e2bcf819d4ed01ec02acee1c4c2@78.159.100.155:30303,enode://a86d3268c060323572bfeb6df76081e4668ec44cc60ff028c1685a9a683c5d6497c987b5dfade81323d08875066218a1877484396e11f400ce1c2c9bd343c935@78.159.100.155:30304,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@127.0.0.1:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301"&lt;/span&gt; &lt;span class="nt"&gt;--syncmode&lt;/span&gt; &lt;span class="s2"&gt;"full"&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/1 &lt;span class="nt"&gt;--networkid&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;networkid&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 30303 &lt;span class="nt"&gt;--rpc&lt;/span&gt; &lt;span class="nt"&gt;--rpccorsdomain&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--ws&lt;/span&gt; &lt;span class="nt"&gt;--wsaddr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0.0.0.0"&lt;/span&gt; &lt;span class="nt"&gt;--wsorigins&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--wsport&lt;/span&gt; 8555 &lt;span class="nt"&gt;--rpcaddr&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--rpcport&lt;/span&gt; 8545 &lt;span class="nt"&gt;--rpcvhosts&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--unlock&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;wallet1&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--password&lt;/span&gt; ./.pwd &lt;span class="nt"&gt;--mine&lt;/span&gt; &lt;span class="nt"&gt;--gasprice&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GASPRICE&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--targetgaslimit&lt;/span&gt; &lt;span class="s2"&gt;"420000000"&lt;/span&gt; &lt;span class="nt"&gt;--verbosity&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERBOSITY&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;--rpcapi&lt;/span&gt; admin,db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS &lt;span class="nt"&gt;--ethstats&lt;/span&gt; &lt;span class="s2"&gt;"XinFin-MasterNode-01:xinfin_xdpos_hybrid_network_stats@stats.xinfin.network:3000"&lt;/span&gt; &amp;amp;
&lt;span class="nv"&gt;child_proc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$child_proc&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$!&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--bootnodes&lt;/span&gt; &lt;span class="s2"&gt;"enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30303,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30304,enode://ef4d512152b875de3fc3990e3e124ae55adea35c49c5df40d0c4bea9327116fcfba70b920a7c164e08f425876025cbcf2519ad5238e57c10ea205e7897926a35@45.76.113.250:30303,enode://bcda483330dc0845f521ad611bcdc8cb147a7a8008c022dba20da2ab52ae46fd6d04f3cb9b7da4e94cf81d2c61065e008a13b5f05f3b69795b0dbdd2a14bb48d@209.222.30.63:30303,enode://2edc16258f6f2e18b105362df5af89889b5dbb7b098f266c39ba1b6200e9dfa76b8fd3bc0cdefce089d9e285772ae69d549e6807b23341ac975d0c085b936f1b@139.180.131.100:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@149.28.135.114:30303,enode://5fcb6aa25e9e4184f278f842581507e4180851e861a59e1a02cf62f2927ee073ba921b5cba10301043f41ed494860f0ccc7508f1058c25f8ebcd56e9f8da018b@149.28.140.203:30303,enode://3a792327abf09be1b78db697c33de653d21bb702eaf6e292899c31a59f0b9535753a34d41f088416bc3f90d25c35ecd6b79d0015c36cf10f9a27c89ecd1f7fa4@149.28.140.232:30303,enode://26def7887241597a30314a77b1a32f156bdcc92eee198b086ae7c4dc26b986a9be6d078b09e93a1f963b083885020e1edfbf6b053dcebbdd090f6dfb289b59f0@149.28.142.223:30303,enode://f35e4ff8bfca2b37297dae0524146c2e4ef20c5d95be48cabe0072334bcf77a9385bad27b9630ee5ba4de451076c2123ad06113f21e3f78387a0e6fde7ec1b0b@45.77.183.160:30303,enode://44f8256e0285d1a94a73187116772522dcf53ef3affcac171cf01ffb00ec613ba1960f1309cc9353207a8f1211e645016c6e30b9669190aac8386c78545b84b1@198.13.34.190:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.218.68:30303,enode://5701cfd1d03a04a3a17076e50983397ff634ff7f00693f62f6d4d94107796b74b8e10b8ad6efbf1499ae0c6263e84594d30986c79242a37b1c9d27cddb57cdc5@207.148.71.42:30303,enode://b0bd514f1b0892ab26c1d8be59510406f7d700c74cd3cd03d3f8d0fc21b784bb2fb7bde3afacf435928ca9506decf73bd15af5a64bd5dd113b26fc91605ce397@45.77.181.79:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.135.153:30303,enode://297167bcccf50a94fd2b9a1f1a372228526a95066030295ee8842e0bcaf798da751974a8b08caa9fb9764d2b2d50e64ec5a90a8b942a2a9d6b1db9d5995de3ff@139.180.143.152:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.77.244.187:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.76.153.161:30303,enode://3a914391c6f6ff0af000b5e614df1074c2a2db2575d6c4d02c3d96bc00ed52ba4281df45b065cbc253c2a02d0bc34272520e772ee9880b28ef107e91b86166d8@109.169.55.28:30303,enode://2953c5ea2a2829a242123e14538b137be858602da1e68beb8c7f7ec797d9d42cf4f0c76b62e98c4d5578e0eeefa42a501fdfec7079e8db206d89d037a09cde3a@109.169.55.28:30304,enode://80dee88ded07fcb0ed1f4a9db4c60c0bd0592d44656571822b479047653b0c30d84e68c83057db048d2120cd7d504fd6a70a89161c31aaf98e65cfba4a77a528@109.169.55.28:30305,enode://7e495d7e1be1fc47d62f8510249435fb3b6f279880704896cbd78e05027298ed133979a388cc0ecf51fb014a8c68438b45e4a2d82ab1ed9cf86a31e87fed32c5@78.129.229.96:30303,enode://02c155fe4b34293b50d70a10889a57d9f2434fefdf142c6d24d73df9ccff19994cb243b55e87a9349a8f87d827363f74b0b40f44d96925aaaedadb456e38c0c0@78.129.229.96:30304,enode://bc2a722d080b008132ef395763d87f491fb6adc34b5d34b698cfeeadced2d4468ee5dc09f39956b4686c88af9bf26e39bc050feb52c0976238645a0343e6049f@78.129.229.96:30305,enode://560113969268e30a430991e36fcb1a6ea8a2bc16f23bc1dabffd6f8c17649237d58d8cf554e9ce882184abdc9b3a607230123e2bcf819d4ed01ec02acee1c4c2@78.159.100.155:30303,enode://a86d3268c060323572bfeb6df76081e4668ec44cc60ff028c1685a9a683c5d6497c987b5dfade81323d08875066218a1877484396e11f400ce1c2c9bd343c935@78.159.100.155:30304,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@127.0.0.1:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301"&lt;/span&gt; &lt;span class="nt"&gt;--syncmode&lt;/span&gt; &lt;span class="s2"&gt;"full"&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/2 &lt;span class="nt"&gt;--networkid&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;networkid&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 30304 &lt;span class="nt"&gt;--rpc&lt;/span&gt; &lt;span class="nt"&gt;--rpccorsdomain&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--ws&lt;/span&gt; &lt;span class="nt"&gt;--wsaddr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0.0.0.0"&lt;/span&gt; &lt;span class="nt"&gt;--wsorigins&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--wsport&lt;/span&gt; 8556 &lt;span class="nt"&gt;--rpcaddr&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--rpcport&lt;/span&gt; 8546 &lt;span class="nt"&gt;--rpcvhosts&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--unlock&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;wallet2&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--password&lt;/span&gt; ./.pwd &lt;span class="nt"&gt;--mine&lt;/span&gt; &lt;span class="nt"&gt;--gasprice&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GASPRICE&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--targetgaslimit&lt;/span&gt; &lt;span class="s2"&gt;"420000000"&lt;/span&gt; &lt;span class="nt"&gt;--verbosity&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERBOSITY&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;--rpcapi&lt;/span&gt; admin,db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS &lt;span class="nt"&gt;--ethstats&lt;/span&gt; &lt;span class="s2"&gt;"XinFin-MasterNode-02:xinfin_xdpos_hybrid_network_stats@stats.xinfin.network:3000"&lt;/span&gt; &amp;amp;
&lt;span class="nv"&gt;child_proc&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$child_proc&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$!&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;PROJECT_DIR&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/build/bin/&lt;span class="nv"&gt;$Bin_NAME&lt;/span&gt; &lt;span class="nt"&gt;--bootnodes&lt;/span&gt; &lt;span class="s2"&gt;"enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30303,enode://d757f1a21828c9c426e26df39176053302209e3dd05e7a6c0e0eae57739e233c0fa970c9b98e010cee4817e6233c3ad3eef461cef3e731c485ed4bc08de7d0ac@37.58.56.228:30304,enode://ef4d512152b875de3fc3990e3e124ae55adea35c49c5df40d0c4bea9327116fcfba70b920a7c164e08f425876025cbcf2519ad5238e57c10ea205e7897926a35@45.76.113.250:30303,enode://bcda483330dc0845f521ad611bcdc8cb147a7a8008c022dba20da2ab52ae46fd6d04f3cb9b7da4e94cf81d2c61065e008a13b5f05f3b69795b0dbdd2a14bb48d@209.222.30.63:30303,enode://2edc16258f6f2e18b105362df5af89889b5dbb7b098f266c39ba1b6200e9dfa76b8fd3bc0cdefce089d9e285772ae69d549e6807b23341ac975d0c085b936f1b@139.180.131.100:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@149.28.135.114:30303,enode://5fcb6aa25e9e4184f278f842581507e4180851e861a59e1a02cf62f2927ee073ba921b5cba10301043f41ed494860f0ccc7508f1058c25f8ebcd56e9f8da018b@149.28.140.203:30303,enode://3a792327abf09be1b78db697c33de653d21bb702eaf6e292899c31a59f0b9535753a34d41f088416bc3f90d25c35ecd6b79d0015c36cf10f9a27c89ecd1f7fa4@149.28.140.232:30303,enode://26def7887241597a30314a77b1a32f156bdcc92eee198b086ae7c4dc26b986a9be6d078b09e93a1f963b083885020e1edfbf6b053dcebbdd090f6dfb289b59f0@149.28.142.223:30303,enode://f35e4ff8bfca2b37297dae0524146c2e4ef20c5d95be48cabe0072334bcf77a9385bad27b9630ee5ba4de451076c2123ad06113f21e3f78387a0e6fde7ec1b0b@45.77.183.160:30303,enode://44f8256e0285d1a94a73187116772522dcf53ef3affcac171cf01ffb00ec613ba1960f1309cc9353207a8f1211e645016c6e30b9669190aac8386c78545b84b1@198.13.34.190:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.218.68:30303,enode://5701cfd1d03a04a3a17076e50983397ff634ff7f00693f62f6d4d94107796b74b8e10b8ad6efbf1499ae0c6263e84594d30986c79242a37b1c9d27cddb57cdc5@207.148.71.42:30303,enode://b0bd514f1b0892ab26c1d8be59510406f7d700c74cd3cd03d3f8d0fc21b784bb2fb7bde3afacf435928ca9506decf73bd15af5a64bd5dd113b26fc91605ce397@45.77.181.79:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@139.180.135.153:30303,enode://297167bcccf50a94fd2b9a1f1a372228526a95066030295ee8842e0bcaf798da751974a8b08caa9fb9764d2b2d50e64ec5a90a8b942a2a9d6b1db9d5995de3ff@139.180.143.152:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.77.244.187:30303,enode://95fc2505216570bce1f75de47289d5cdcd35eba61a3e2d89fe1690dbdc60e22d8a12fe12c54c77d87f7b56035aa9ef2021387906ac3f5b3814cd90267b64f02e@45.76.153.161:30303,enode://3a914391c6f6ff0af000b5e614df1074c2a2db2575d6c4d02c3d96bc00ed52ba4281df45b065cbc253c2a02d0bc34272520e772ee9880b28ef107e91b86166d8@109.169.55.28:30303,enode://2953c5ea2a2829a242123e14538b137be858602da1e68beb8c7f7ec797d9d42cf4f0c76b62e98c4d5578e0eeefa42a501fdfec7079e8db206d89d037a09cde3a@109.169.55.28:30304,enode://80dee88ded07fcb0ed1f4a9db4c60c0bd0592d44656571822b479047653b0c30d84e68c83057db048d2120cd7d504fd6a70a89161c31aaf98e65cfba4a77a528@109.169.55.28:30305,enode://7e495d7e1be1fc47d62f8510249435fb3b6f279880704896cbd78e05027298ed133979a388cc0ecf51fb014a8c68438b45e4a2d82ab1ed9cf86a31e87fed32c5@78.129.229.96:30303,enode://02c155fe4b34293b50d70a10889a57d9f2434fefdf142c6d24d73df9ccff19994cb243b55e87a9349a8f87d827363f74b0b40f44d96925aaaedadb456e38c0c0@78.129.229.96:30304,enode://bc2a722d080b008132ef395763d87f491fb6adc34b5d34b698cfeeadced2d4468ee5dc09f39956b4686c88af9bf26e39bc050feb52c0976238645a0343e6049f@78.129.229.96:30305,enode://560113969268e30a430991e36fcb1a6ea8a2bc16f23bc1dabffd6f8c17649237d58d8cf554e9ce882184abdc9b3a607230123e2bcf819d4ed01ec02acee1c4c2@78.159.100.155:30303,enode://a86d3268c060323572bfeb6df76081e4668ec44cc60ff028c1685a9a683c5d6497c987b5dfade81323d08875066218a1877484396e11f400ce1c2c9bd343c935@78.159.100.155:30304,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@127.0.0.1:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@78.129.229.96:30301,enode://1c20e6b46ce608c1fe739e78611225b94e663535b74a1545b1667eac8ff75ed43216306d123306c10e043f228e42cc53cb2728655019292380313393eaaf6e23@5.152.223.199:30301"&lt;/span&gt; &lt;span class="nt"&gt;--syncmode&lt;/span&gt; &lt;span class="s2"&gt;"full"&lt;/span&gt; &lt;span class="nt"&gt;--datadir&lt;/span&gt; ./nodes/3 &lt;span class="nt"&gt;--networkid&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;networkid&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 30305 &lt;span class="nt"&gt;--rpc&lt;/span&gt; &lt;span class="nt"&gt;--rpccorsdomain&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--ws&lt;/span&gt; &lt;span class="nt"&gt;--wsaddr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"0.0.0.0"&lt;/span&gt; &lt;span class="nt"&gt;--wsorigins&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--wsport&lt;/span&gt; 8557 &lt;span class="nt"&gt;--rpcaddr&lt;/span&gt; 0.0.0.0 &lt;span class="nt"&gt;--rpcport&lt;/span&gt; 8547 &lt;span class="nt"&gt;--rpcvhosts&lt;/span&gt; &lt;span class="s2"&gt;"*"&lt;/span&gt; &lt;span class="nt"&gt;--unlock&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;wallet3&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--password&lt;/span&gt; ./.pwd &lt;span class="nt"&gt;--mine&lt;/span&gt; &lt;span class="nt"&gt;--gasprice&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;GASPRICE&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--targetgaslimit&lt;/span&gt; &lt;span class="s2"&gt;"420000000"&lt;/span&gt; &lt;span class="nt"&gt;--verbosity&lt;/span&gt; &lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VERBOSITY&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt; &lt;span class="nt"&gt;--rpcapi&lt;/span&gt; admin,db,eth,debug,miner,net,shh,txpool,personal,web3,XDPoS &lt;span class="nt"&gt;--ethstats&lt;/span&gt; &lt;span class="s2"&gt;"XinFin-MasterNode-03:xinfin_xdpos_hybrid_network_stats@stats.xinfin.network:3000"&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
` &lt;/p&gt;

</description>
      <category>xdc</category>
      <category>testnetworks</category>
      <category>development</category>
      <category>xdpos</category>
    </item>
    <item>
      <title>A New XIP Proposal to Tokenize DApps with Dividend Yielding Tokens on the XDC Network</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Tue, 04 Oct 2022 20:53:29 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/a-new-xip-proposal-to-tokenize-dapps-with-dividend-yielding-tokens-on-the-xdc-network-5659</link>
      <guid>https://www.xdc.dev/yourbroquincy/a-new-xip-proposal-to-tokenize-dapps-with-dividend-yielding-tokens-on-the-xdc-network-5659</guid>
      <description>&lt;p&gt;&lt;strong&gt;Tokenizing DApps: SHARES &amp;amp; SPLITS&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most people are familiar with NFTs as decentralized objects that show ownership of an item or keep a unit of account. An NFT can represent literally anything, even a decentralized application (DApp).&lt;/p&gt;

&lt;p&gt;I recently made a proposal to the XDC Community (&lt;a href="https://github.com/XDC-Community/XIPs.github.io"&gt;XIP Proposal&lt;/a&gt;) to standardize a new type of token — the SHARE. A SHARE is an NFT that represents ownership over a DApp and will take the incoming funds and distribute them among the token holders. Developers can also use these NFTs within their application to give the SHARES governance capabilities, such as access control and voting rights, by defining the tokens in the code itself.&lt;/p&gt;

&lt;p&gt;There are 2 types of SHARES — SHARES and SPLITS. A SHARE acts as a share of a DApp that receives the dividends based on its performance while a SPLIT is a share of a SHARE, receiving the yield of the original SHARE while splitting the dividends again amongst a set of derivative token holders.&lt;/p&gt;

&lt;p&gt;SHARES are not a crypto currency but a native crypto asset to a crypto application. The performance and relative value of the SHARE is predicated on the growth and use of the DApp and the accumulated fees that are dispersed among the token holders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;SHARES Attributes:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A DApp can have a max of 1,000 SHARES.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Each SHARE has its own account in the contract, and the holder of the SHARE can redeem any yield from that token’s account.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;SPLIT Attributes:&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;SPLITS have the same amount of splits per SHARE as the SHARE has total SHARES.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A SPLIT is a uniform contract and doesn't have any additional functions but redeem value from the deriving SHARE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A SPLIT of the same generation maintains equal value even if it comes from a different SHARE in the same SHARES contract.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example of a DApp with SHARES:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.xdc.dev/images/dPhDRAIKPoihts2yZETZyW5KFv7foxVpfAz4_XHl2yg/w:880/mb:500000/ar:1/aHR0cHM6Ly9saDUu/Z29vZ2xldXNlcmNv/bnRlbnQuY29tL1ZH/QWhMZm9kS0R5ejhL/Y1AtZE5CQVU5Z1dF/akJuc2V3bkYzQzJa/bHBkTzJUdUo2cnpW/NmlBeTk1UFhzWkV2/RGlfRzNyRnM4Yk0y/YnlOTHJuSmFHTzlm/RE54VmJzMl9GV0ha/TG4xX09VZjNIdUFG/THUxYW40cU9kLUVW/Z25XTDBlWU1HckRC/UjY3bU5OMEFwSWxm/UldYU2dJYTdVOXRw/M3A4Rkd2cTdaX2Nv/NlQydUNVazhFTjQ4/SFVvUQ" class="article-body-image-wrapper"&gt;&lt;img src="https://www.xdc.dev/images/dPhDRAIKPoihts2yZETZyW5KFv7foxVpfAz4_XHl2yg/w:880/mb:500000/ar:1/aHR0cHM6Ly9saDUu/Z29vZ2xldXNlcmNv/bnRlbnQuY29tL1ZH/QWhMZm9kS0R5ejhL/Y1AtZE5CQVU5Z1dF/akJuc2V3bkYzQzJa/bHBkTzJUdUo2cnpW/NmlBeTk1UFhzWkV2/RGlfRzNyRnM4Yk0y/YnlOTHJuSmFHTzlm/RE54VmJzMl9GV0ha/TG4xX09VZjNIdUFG/THUxYW40cU9kLUVW/Z25XTDBlWU1HckRC/UjY3bU5OMEFwSWxm/UldYU2dJYTdVOXRw/M3A4Rkd2cTdaX2Nv/NlQydUNVazhFTjQ4/SFVvUQ" alt="" width="880" height="751"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/CoinClubQuincy/XRC-SHARDS"&gt;https://github.com/CoinClubQuincy/XRC-SHARES&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;All function within contract can use this line of code at the bottom of their function to forward funds to the receiving function to allocate funds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="n"&gt;redirectValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;//this will forward all funds to share token treasury
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This contract bellow is an example of a lemonade stand contract that receives 10XDC for a glass of lemonade and divides those funds amongst a set token holders while keeping track of how many glasses have been sold.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight solidity"&gt;&lt;code&gt;&lt;span class="k"&gt;contract&lt;/span&gt; &lt;span class="n"&gt;lemonadeStand&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="n"&gt;XRCSHARE&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;lemonadeCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;  &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;  &lt;span class="k"&gt;memory&lt;/span&gt; &lt;span class="n"&gt;_symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="kt"&gt;uint&lt;/span&gt; &lt;span class="n"&gt;_totalSupply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;XRCSHARE&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_symbol&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;_totalSupply&lt;/span&gt;&lt;span class="p"&gt;){}&lt;/span&gt;

    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="n"&gt;GlassOfLemonade&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="k"&gt;public&lt;/span&gt;  &lt;span class="k"&gt;payable&lt;/span&gt;  &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="nb"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt;  &lt;span class="mi"&gt;10000000000000000000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"need more funds"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;lemonadeCount&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="c1"&gt;//this call can be used in all functions that recive fees
&lt;/span&gt;        &lt;span class="n"&gt;redirectValue&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;  &lt;span class="nb"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;SHARES &amp;amp; SPLITS&lt;/strong&gt; allow developers to sell portions of their DApps by allowing a simple means of owning and distributing equity of profitable applications that reside on the XDC Network. This means an investor can invest in the DApp, to help the developer build more features or to help grow its user and community base while being attributed dividends. The value of the tokens are based on the performance of the DApp. Any DApp, no matter how big or small, can have SHARES to allocate profits.&lt;/p&gt;

&lt;p&gt;SPLITS are uniform contracts to split SHARE tokens into smaller dividend tokens that redeem and split the dividends allocated to that associated token provided to the SPLIT contract. A SPLIT is functionally identical to a SHARE, but a SPLIT can only represent partial ownership of a SHARE, whereas a SHARE represents ownership of the DApp. If a DApp uses the SHARE tokens as governance tokens or in some form of automation, SPLITS cannot participate. SPLITS only redeem dividends from the SHARE that's been split.&lt;/p&gt;

&lt;p&gt;We refer to these layers of SPLITS as generations, as shown in the graphic above. The original SHARE stands as generation 0, the next is generation 1, and so forth. All SPLITS in a given generation hold equal value.&lt;/p&gt;

&lt;p&gt;These generations allow for SHARES to be divided up indefinitely. SPLITS can only have as many splits as the SHARE contract has SHARES. That means that if there are 1,000 SHARES, each of those SHARES can have only 1,000 SPLITS in the first generation. In the second generation, each of these 1,000 first generation SPLITS can have 1,000 second generation SPLITS.&lt;/p&gt;

&lt;p&gt;Meaning that in generation one, all the SHARES can have a total of 1 million SPLITS derived from them, and in the second generation can have 1 Billion SPLITS derived from its first generation SPLITS . Simply put, dividend-earning stakeholding of a DApp can increase liquidity in each generation, as these SPLITS also increase affordability to investors who want to own the yield of a DApp,as a derivative token of the original SHARE.&lt;/p&gt;

&lt;h3&gt;
  
  
  How DApps Can Use SHARES
&lt;/h3&gt;

&lt;p&gt;DApps can use SHARES in a few different ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;DApps can be built with SHARES to allow for dividend allocation of the revenue in these DApps&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers can also build more smart contracts after the fact, which can offer more functionality and consolidate the profits from the new DApps into the original SHARE contract&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Third-party developers can also do this to add functionality and increase the yield for the SHARES&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Developers can also create abstract single function contracts (ex: polling DApp, analysis DApp, Tax DApp) called DApplets — isolated DApps that aren't typically user facing and may allow functionality to other smart contracts that can hold SHARES and justify profitability from otherwise abstract functions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SHARES are a direct means of having developers sell portions of their products no matter how big or small to help fund their future products&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Investors can own DApps similar to how they own companies&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Currently, crypto currencies are the primary market on blockchain. However, as DApps develop novel means of ownership, new markets will arise that are centered around the popularity and growth of DApps. As primary DApps interconnect with secondary applications that rely on them, both the secondary and primary DApps may become profitable. The SHARE holders of both are able to gain fees on the usage of their contract.&lt;/p&gt;

&lt;p&gt;SHARES and SPLITs allow developers, investors, and DApp users to easily sell and invest in DApps of all sizes in a more autonomous way than was possible before. This model exemplifies the promise of blockchain.&lt;/p&gt;

&lt;p&gt;The XRC-SHARE &amp;amp; XRC-SPLITS contracts have been submitted to be approved as an official standard on the XDC Network. To comment on the process or the contracts, check out the &lt;a href="https://github.com/XDC-Community/XIPs.github.io"&gt;XDC-Community&lt;/a&gt; Github to participate in the XDC XIP process.&lt;/p&gt;

</description>
      <category>xdc</category>
      <category>xip</category>
      <category>solidity</category>
      <category>developer</category>
    </item>
    <item>
      <title>Delegated Authorities &amp; Notarizing Identities on the XDC Network — #BuildItOnXDC</title>
      <dc:creator>Quincy Jones</dc:creator>
      <pubDate>Thu, 02 Jun 2022 16:20:10 +0000</pubDate>
      <link>https://www.xdc.dev/yourbroquincy/delegated-authorities-notarizing-identities-on-the-xdc-network-builditonxdc-49fd</link>
      <guid>https://www.xdc.dev/yourbroquincy/delegated-authorities-notarizing-identities-on-the-xdc-network-builditonxdc-49fd</guid>
      <description>&lt;p&gt;Blockchain technology can be used to implement a collection of different tools. Most deal with finance or automations, but what I want to talk about is personal data and self custody of information.&lt;/p&gt;

&lt;p&gt;Legacy applications currently run on third party servers hosted by a company. With this comes big risks. Data leaks, corporate hacks, or any other compromise of user information.&lt;/p&gt;

&lt;p&gt;Most users are familiar with Know Your Customer (KYC) conditions of financial institutions — be it a bank, a broker, or some application with requirements to identify users for regulatory requirements.&lt;/p&gt;

&lt;p&gt;Applications in Web 2.0 meet these conditions by possessing user data in their databases and verifying the user data within their own systems, as each application has its own means of collecting, verifying, and storing user data. This is a security concern, as users are reliant on the security of the different applications to secure their personal Identifiable information (PII). This information could be breached or leaked by any of the applications, leaving users’ private data exposed.&lt;/p&gt;

&lt;p&gt;The XDC Network offers the potential to mitigate that risk by hosting private userdata on the blockchain. Data stored privately in a contract cannot be leaked or stolen as in a typical relationship database. I have previously written about storing private data with a token and creating user logins.&lt;/p&gt;

&lt;p&gt;We can also store identities and verify them. Without the need for a 3rd party to host the data, leaks and hacks can be mitigated and redundancy of data can be reduced.&lt;/p&gt;

&lt;p&gt;In The Delegated_Authority.sol contract example I provide PII data for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(Public) Legal Name
(Private) Address
(Private)Passport ID
(Private)Social Security Number
(Private)Driver’s License Number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But any necessary data can be modified to suit the required needs of the delegated authority.&lt;/p&gt;

&lt;p&gt;A delegated authority is a dApp who would verify the identity of their users then having a boolean status result presented to third parties who have delegated trust to the delegate contract to give accurate results. The delegate contract is a contract who will deploy a series of smaller contracts that hold the user private data and will be allowed to view and notarize the identities of the contracts. Delegated authority contracts will have authentication tokens associated with them, only the possessor of which can read and notarize the identity of a user. These delegated authorities can be banks, financial institutions, or any establishment that is required to verify PII data on their users.&lt;/p&gt;

&lt;p&gt;For example if a bank needs to verify an identity of a user to create an account the bank can launch a delegate authority contract and as users submit information to confirm their identities there will be a new generated contract that will hold their data and issue a token to show that the new generated contract belongs to them. With this other applications like an exchange can delegate the task of authorizing and confirming the identities to the banks delegate contract,which can check to see if the users KYC contract has been notarized and can check to see if the current user is holding the token that represents the Identity of the KYC contract they was generated when the user submitted their KYC info to the delegate authority.&lt;/p&gt;

&lt;p&gt;On the XDC Network, a smart contract created by the delegated authority will allow for users to enter some know your customer (KYC) Personal Identification information (PII). This will create a separate KYC contract that contains the PII data of the user, and will generate an ID token for the user.&lt;/p&gt;

&lt;p&gt;This ID token can be used as a form of notarization to third party dApps that they are the correct Identity of KYC contract and can view contents of the contract to view the PII data. Only the delegated authority will also have permission to view the contents of the generated KYC contracts as well as store and notarize authenticity and the status of said contracts. When a KYC contract has finally been notarized, either manually or programmatically by the delegated authority, third party dApps can check the validity of any given KYC contract from the delegated authority. If the user in the dApp possesses the ID token produced by the contract, their identity is confirmed.&lt;/p&gt;

&lt;p&gt;The delegated authority contracts can even monetize their authority by charging micro fees to check the validity of a contract. Delegated authorities can bear the risk of notarization while being compensated for that risk. While dApps can offset the responsibility and resources to notarize identities for a fee and focus on other tasks.&lt;/p&gt;

&lt;p&gt;This will allow for a reduction in redundancy, as a user can notarize his or her data just once before carrying it to multiple dApps. The security of the authentication token mitigates risk by securing access to the data. This is similar to how you would hand a security key to a key management service (KMS) instead of hosting user data in a database.&lt;/p&gt;

&lt;p&gt;Blockchain dApps can finally have a means of compliance with KYC standards while offsetting risk and freeing up resources. Delegated authorities can be the gateway between legacy systems and blockchain by notarizing and tokenizing identities for easy use and even monetization by third party dApps who seek top notch security.&lt;/p&gt;

&lt;p&gt;This can be the future of identification, passports, and all other sorts of verification. All it takes is trusting a delegated authority to move identification data on the blockchain.&lt;/p&gt;

&lt;p&gt;About the Author: R Quincy Jones XDC Foundation developer, who on behalf of the XDC Network is building new standards and applications for the XDC Network. With over four years in cloud development, and a growing following on YouTube: CoinClubCrypto, is well-suited to break down the fundamentals of blockchain-based technologies for general audiences.&lt;/p&gt;

&lt;p&gt;GitHub Link: &lt;a href="https://github.com/QCloud-DevOps/Delegated_Authority"&gt;&lt;/a&gt;&lt;/p&gt;

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