<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sanchay Mittal on Medium]]></title>
        <description><![CDATA[Stories by Sanchay Mittal on Medium]]></description>
        <link>https://medium.com/@sanchaymittal?source=rss-48cc8080ad6e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*IEW-RjPTgWFTOeAW.</url>
            <title>Stories by Sanchay Mittal on Medium</title>
            <link>https://medium.com/@sanchaymittal?source=rss-48cc8080ad6e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 16:38:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sanchaymittal/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to Deploy bZx Protocol on Matic Network]]></title>
            <link>https://medium.com/trellis-lab/how-to-deploy-bzx-protocol-on-matic-network-d318d20490ff?source=rss-48cc8080ad6e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d318d20490ff</guid>
            <category><![CDATA[matic-network]]></category>
            <category><![CDATA[matic]]></category>
            <category><![CDATA[bzx-protocol]]></category>
            <category><![CDATA[trellis-lab]]></category>
            <category><![CDATA[bzx]]></category>
            <dc:creator><![CDATA[Sanchay Mittal]]></dc:creator>
            <pubDate>Thu, 12 Sep 2019 09:50:30 GMT</pubDate>
            <atom:updated>2019-09-12T20:28:39.299Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZkgGhL5onkAQzOsvwbLQ5g.jpeg" /><figcaption>bZx Protocol on Matic Network</figcaption></figure><p>To enable a set of decentralized protocols on the Matic Network to make it easy for decentralized app (DApp) developers to reuse this functionality in their DApps just like on Ethereum, rather than reinventing the wheel.</p><h3><strong>Introduction</strong></h3><p><strong><em>Matic Network</em></strong><em> is a sidechain based scaling solution for public blockchains. It is based on an adapted implementation of Plasma framework. Matic provides scalability while ensuring a superior user experience in a secured and decentralized manner. More about </em><a href="https://docs.matic.network/"><em>Matic Network…</em></a></p><p><a href="https://bzx.network/"><strong><em>bZx</em></strong></a><strong><em> </em></strong><em>is a Decentralized margin-lending protocol</em></p><h3><strong>How to set it up</strong></h3><h4><strong>Prerequisites:</strong></h4><ul><li>Node.js (v10+): Install or update Node.js from <a href="https://nodejs.org/en/">official page</a>.</li></ul><pre>$ node -v<br>$ npm -v<br>$ npm install -g update-node</pre><ul><li>Truffle (v5+): Install Truffle a development environment for blockchain from <a href="https://www.trufflesuite.com/docs/truffle/getting-started/installation">official page</a>.</li></ul><pre>$ truffle -version</pre><ul><li>Yarn (v1+): Install Yarn from <a href="https://yarnpkg.com/lang/en/docs/install/#debian-stable">official Page</a>.</li></ul><pre>$ yarn --version</pre><h4>Setup the environment</h4><p>Install protocol dependencies</p><pre>$ git clone <a href="https://github.com/bZxNetwork/bZx-monorepo">https://github.com/bZxNetwork/bZx-monorepo</a><br>$ cd bZx-monorepo<br>bZx-monorepo$ yarn<br>$ cd packages/contracts<br>$ yarn</pre><p>Open <a href="https://github.com/bZxNetwork/bZx-monorepo">bZx-monorepo/packages/contracts/truffle.config</a> file and add matic network details for migration. Your file should look like <a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/truffle-config.js">this</a>.</p><ol><li>Comment out var HDWalletProvider = require(&quot;truffle-hdwallet-provider&quot;);</li><li>Add the below network details in the subsection of module exports.</li></ol><pre>matic: {<br>      provider: function () {<br>        return new HDWalletProvider(<br>          &quot;gesture rather obey video awake genuine patient base soon parrot upset lounge&quot;,<br>          &quot;https://testnet2.matic.network&quot;<br>        );<br>      },<br>      network_id: 8995,<br>      gas: 8000000,<br>      gasPrice: 0<br>    }</pre><p>Here, HDWalletProvider passes two arguments, first is mnemonic and second is network link.</p><pre>Warning: Please keep your mnemonic or private key safe. Use the above mnemonic for testing purposes only.</pre><h3><strong>Deploy Contracts</strong></h3><p>Now, Let’s prepare the migration files for Matic Network.</p><p>bZx protocol have many files which aren’t required or important to matic network.</p><ol><li>Let’s Remove the migration files which aren’t required to be deployed on matic network. Go to<a href="https://github.com/bZxNetwork/bZx-monorepo">bZx-monorepo/packages/contracts/migrations</a>and remove or transfer the following files out of the migrations directory. Se <a href="https://github.com/Trellis-Lab/bZx-monorepo/tree/development/packages/contracts/.Skipped">this</a> for reference.</li></ol><pre><a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/.Skipped/7_deploy_BZRxTokenConvert.js">7_deploy_BZRxTokenConvert.js</a><br><a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/.Skipped/13_deploy_iToken_Helpers.js">13_deploy_iToken_Helpers.js</a><br><a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/.Skipped/18_deploy_TestNetFaucet.js">18_deploy_TestNetFaucet.js</a><br><a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/.Skipped/19_dev_deploy_test_tokens.js">19_dev_deploy_test_tokens.js</a><br><a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/development/packages/contracts/.Skipped/20_testnetonly_deploy_sample_orders.js">20_testnetonly_deploy_sample_orders.js</a></pre><p>2. Now, Let’s prepare Protocol-config.js which includes addresses of protocols, coins and oracle. For matic, some of them are required to be mapped as it is a sidechain. And others have to be manually deployed on Matic testnet.</p><p>Here is the <a href="https://github.com/Trellis-Lab/bZx-monorepo/blob/182e31dc23853baa6f757302768021159a8b8807/packages/contracts/protocol-config.js#L44">link</a> of the addresses.</p><p><strong>Mapped Addresses</strong></p><pre>ZRXToken: &quot;0xc38ec8c07b3cfbf59cd9e5e9d01efed3bdd41384&quot;,                               EtherToken: &quot;0x3a33ddf84eb9e16129b00e92dd3445a96b329d29&quot;,                               WETH9: &quot;0x84e7ab5ec187ce4fa96588fee28b4d9299bd6332&quot;,<br>BZRXToken:&quot;0xb2f849d046b7fc5f90f18aac63d56e40cab186e2&quot;,<br>DAITokenAddress: &quot;0xfef8a6d3e37683bd16bb7a54052a85ad70b09192&quot;,                             WBTCTokenAddress: &quot;0x0cf3cf33448cb705ffbe88a934b4eafe8b0c2758&quot;</pre><p><em>P.S: Thanks to Angela from Matic Network for the above mapped addresses.</em></p><p><strong>Manually Deployed</strong></p><pre>TokenTransferProxy: &quot;0x3026cAD1B2e0E4c4893B7FE8fF868a0Ef3F8975f&quot;,                               ExchangeV1: &quot;0xCc786388E6e82C525b8ac324d81dCaCAC32Eb853&quot;,                               TokenRegistry: &quot;0xd574C27132f00F5b82A09F8E05726Ab3433c5617&quot;,<br>ERC20Proxy: &quot;0xc2fF576A20BB628aD646FA46f04A306f6D74695A&quot;,                               ERC721Proxy: &quot;0xa43AF06155F3f79CA2504473706bF17310814d22&quot;</pre><p>Other Addresses are not required while deploying but could be deployed if required.</p><p>Follow <a href="https://docs.matic.network/deploy-contracts-remix/">this</a> easy guide to deploy contracts on Matic. Contracts can be found on mainnet or other test network. Just copy the address and search on etherscan.</p><p>Add the below set of addresses to the protocol-config.js</p><pre>matic: {<br>      ZeroEx: {<br>        //Mapped Addresses<br>        ZRXToken: &quot;0xc38ec8c07b3cfbf59cd9e5e9d01efed3bdd41384&quot;,<br>        EtherToken: &quot;0x3a33ddf84eb9e16129b00e92dd3445a96b329d29&quot;,<br>        WETH9: &quot;0x84e7ab5ec187ce4fa96588fee28b4d9299bd6332&quot;,<br>        //Deployed Addresses<br>        TokenTransferProxy: &quot;0x3026cAD1B2e0E4c4893B7FE8fF868a0Ef3F8975f&quot;,<br>        ExchangeV1: &quot;0xCc786388E6e82C525b8ac324d81dCaCAC32Eb853&quot;,<br>        TokenRegistry: &quot;0xd574C27132f00F5b82A09F8E05726Ab3433c5617&quot;,<br>        ExchangeV2: &quot;0x0000000000000000000000000000000000000000&quot;,<br>        ERC20Proxy: &quot;0xc2fF576A20BB628aD646FA46f04A306f6D74695A&quot;,<br>        ERC721Proxy: &quot;0xa43AF06155F3f79CA2504473706bF17310814d22&quot;,<br>        AssetProxyOwner: &quot;0x0000000000000000000000000000000000000000&quot;<br>      },<br>      ENS: {<br>        Registry: &quot;0x0000000000000000000000000000000000000000&quot;,<br>        Resolver: &quot;0x0000000000000000000000000000000000000000&quot;<br>      },<br>      BZRXToken: &quot;0xb2f849d046b7fc5f90f18aac63d56e40cab186e2&quot;,<br><br>      OracleNotifier: &quot;0x0000000000000000000000000000000000000000&quot;,<br>      KyberContractAddress: &quot;0x0000000000000000000000000000000000000000&quot;,<br>      BZRXTokenSale: &quot;0x0000000000000000000000000000000000000000&quot;,<br>      BZxEther: &quot;0x0000000000000000000000000000000000000000&quot;,<br>      MultiSig: &quot;0x0000000000000000000000000000000000000000&quot;,<br>      TokenizedRegistry: &quot;0x0000000000000000000000000000000000000000&quot;, // old: &quot;0xaa5c713387972841995553c9690459596336800b&quot;,<br><br>      DAITokenAddress: &quot;0xfef8a6d3e37683bd16bb7a54052a85ad70b09192&quot;,<br>      WBTCTokenAddress: &quot;0x0cf3cf33448cb705ffbe88a934b4eafe8b0c2758&quot;<br>    }</pre><p>Now, We are all prepared to migrate the contracts on Matic Net.</p><p>Open Terminal</p><pre>cd bZx-monorepo/packages/contracts<br>truffle migrate --network matic</pre><p>Volla!!! Just like that bZx protocol is deployed on Matic Network.</p><h4>Updates and Changes</h4><p>bZx protocol is in active devlopment and will make changes in near future. If you face any problem while deploying join bZx and matic community on telegram or discord. They will definetly help you.</p><p>Thumbs up to Tom Bean(<a href="https://medium.com/u/c84b634c7ca3">bZx Team</a>) and Angela(<a href="https://medium.com/u/7961fd6ea60b">Matic</a>) for helping me out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d318d20490ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/trellis-lab/how-to-deploy-bzx-protocol-on-matic-network-d318d20490ff">How to Deploy bZx Protocol on Matic Network</a> was originally published in <a href="https://medium.com/trellis-lab">Trellis Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>