<?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[Ginete Technologies - Medium]]></title>
        <description><![CDATA[Focusing on Blockchain, Ginete is a team of developers, consultants, strategists who are passionate in delivering end to end Blockchain solutions from ideation to implementation. - Medium]]></description>
        <link>https://medium.com/ginete-technologies?source=rss----8b6c21777ef3---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Ginete Technologies - Medium</title>
            <link>https://medium.com/ginete-technologies?source=rss----8b6c21777ef3---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 03:19:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ginete-technologies" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Gasless/Meta transactions on Matic using Biconomy]]></title>
            <link>https://medium.com/ginete-technologies/gasless-meta-transactions-on-matic-using-biconomy-bfae7ae8e743?source=rss----8b6c21777ef3---4</link>
            <guid isPermaLink="false">https://medium.com/p/bfae7ae8e743</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[biconomy]]></category>
            <category><![CDATA[meta-transactions]]></category>
            <category><![CDATA[matic-network]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Sameep singhania]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 18:41:19 GMT</pubDate>
            <atom:updated>2020-06-14T18:45:11.431Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Matic</strong> Network is a blockchain scalability platform that provides secure, scalable, and instant transactions powered by PoS side chains and an adapted version of Plasma. You can learn more about Matic <a href="https://matic.network/">here</a></p><p><strong>Biconomy</strong> is a relayer infrastructure network and transaction platform enabling you to build applications easily and reduce the friction between your applications built on the blockchain and your end-users. You can learn more about biconomy <a href="https://biconomy.io/">here</a></p><p>In this article, we will learn how to enable <a href="https://medium.com/@austin_48503/ethereum-meta-transactions-90ccf0859e84">gasless/meta</a> transactions in a DApp deployed on Matic using Biconomy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*_VvJXUzwrZ6rDlMKCPWJzw.png" /><figcaption>Ginete Technologies Private Limited</figcaption></figure><p>In this article, we will create a simple <strong>Token Transfer DApp</strong>.</p><p>This post is divided into the following 5sections-:</p><ol><li>Setting up the development environment</li><li>Developing the Smart Contract</li><li>Deploying the smart contract to Matic</li><li>Registering contracts on Biconomy</li><li>Developing the front-end with gasless transactions</li></ol><h3>1. Setting up the development environment</h3><p>The setup instructions are tested on Ubuntu 16.04 LTS. But they should work fine for macOS as well.</p><p>Open a new terminal.</p><pre>&gt; sudo apt-get update<br>&gt; curl -sL <a href="https://deb.nodesource.com/setup_8.x">https://deb.nodesource.com/setup_8.x</a> -o nodesource_setup.sh<br>&gt; sudo bash nodesource_setup.sh<br>&gt; sudo apt-get install nodejs<br>&gt; npm install -g truffle</pre><p>This will install nodejs and <a href="https://www.trufflesuite.com/">truffle</a>.</p><p>Open a new terminal and perform these steps</p><pre>&gt; cd ~<br>&gt; mkdir tutorial<br>&gt; cd tutorial<br>&gt; npx create-react-app meta-tx<br>&gt; cd meta-tx<br>&gt; truffle init<br>&gt; npm i --save web3 openzeppelin-solidity@2.5.1 truffle-hdwallet-provider dotenv @biconomy/mexa eth-sig-util</pre><p>The above commands will do the following-:</p><ol><li>Create a new directory <strong>tutorial/meta-tx</strong>. From now we will call this directory our working directory</li><li>Initialize the create-react-app project inside our working directory</li><li>Initialize truffle project inside our working directory</li><li>Install <strong>web3.js</strong>,<strong> openzeppelin-solidity</strong>,<strong> dotenv</strong>,<strong> eth-sig-util</strong>, <strong>@biconomy/mexa</strong> and <strong>truffle-hdwallet-provider </strong>node packages</li></ol><p>Your working directory should have the following directory structure after executing above commands</p><pre>&gt; meta-tx<br>  &gt; contracts<br>  &gt; migrations<br>  &gt; public<br>  &gt; src<br>  &gt; test<br>  &gt; package.json<br>  &gt; truffle-config.js</pre><h3>2. Developing the Smart Contract</h3><p>We will be using <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md">EIP712</a> standard to enable gasless/meta transactions in our DApp.</p><p>Now create <strong>EIP712Base.sol</strong> file in the <strong>contracts</strong> folder in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88afcf7f9c76b429c3d4a95f58ae4dcd/href">https://medium.com/media/88afcf7f9c76b429c3d4a95f58ae4dcd/href</a></iframe><p><strong>EIP712Base </strong>contract contains base functionalities to support <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md">EIP712</a></p><p>Now create <strong>EIP712MetaTransaction.sol</strong> in the <strong>contracts</strong> folder in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d226fbfc955b9b351f1e07d54a73d340/href">https://medium.com/media/d226fbfc955b9b351f1e07d54a73d340/href</a></iframe><p><strong>EIP712MetaTransaction </strong>contract contains functionality to support meta transactions. It does the following operations-:</p><ol><li>Calculating meta transaction hash</li><li>User signature verification as per <a href="https://github.com/ethereum/EIPs/blob/master/EIPS/eip-712.md">EIP712</a></li><li>Executing meta transaction</li></ol><p>Now create <strong>GineteToken.sol</strong> in the <strong>contracts</strong> folder in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0705e653c4305c10f8c83e21c3ef0527/href">https://medium.com/media/0705e653c4305c10f8c83e21c3ef0527/href</a></iframe><p><strong>GineteToken</strong> is a simple ERC20 token that inherits <a href="https://openzeppelin.com/contracts/">openzeppelin’s</a> ERC20, ERC20Detailed and EIP712MetaTransaction created in the previous step.</p><h3>3. Deploying the smart contract to the Matic testnet</h3><p>To deploy <strong>GineteToken</strong> smart contract we will have to follow these steps-:</p><ol><li>Compile the contract</li><li>Add environment variable</li><li>Update truffle’s migration file</li><li>Create migration file for GineteToken</li><li>Deploy the contract on the matic testnet using truffle migration</li></ol><p>Now let’s compile our contract. Follow the commands below to compile GineteToken contract.</p><p>Open a new terminal and perform these steps</p><pre>&gt; cd ~/tutorials/meta-tx<br>&gt; truffle compile</pre><p>The above command will compile your <strong>GineteToken</strong> contract and the generated artifacts will be saved inside <strong>build/contracts</strong> folder within your working directory.</p><p>Now let’s add required environment variables in our project.</p><p>Create <strong>.env</strong> file in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3d3fcdd81afaaad495ecb73de8ed314f/href">https://medium.com/media/3d3fcdd81afaaad495ecb73de8ed314f/href</a></iframe><p>The content of the .env file is the <strong>private key</strong> associated with the account(0x46CFAE95AA3172B1E30E0F7103A09A1DabC60941) which will be used to deploy the <strong>GineteToken</strong> contract on matic testnet</p><p><strong>NOTE: Please do not use the above mentioned private key in production.</strong></p><p>Now let’s update our truffle migration file.</p><p>Please replace the contents of the <strong>truffle-config.js</strong> file in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a9c5c81cf57e87a4dd2a08f8dc136f24/href">https://medium.com/media/a9c5c81cf57e87a4dd2a08f8dc136f24/href</a></iframe><p>Now let’s create the migration file for the GineteToken.</p><p>Please create <strong>2_GineteToken_migration.js</strong> inside the <strong>migrations</strong> folder in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/39a0657c16e791138fdde5ad8ad2ef47/href">https://medium.com/media/39a0657c16e791138fdde5ad8ad2ef47/href</a></iframe><p>Now let’s deploy our compiled contract on the blockchain, in our case matic testnet. Before running the next steps please ensure that you have completed the above steps successfully.</p><p>Open a new terminal and perform the following steps</p><pre>&gt; cd ~/tutorials/meta-tx<br>&gt; truffle migrate --network matic --reset</pre><p>The above commands will deploy GineteToken on the matic testnet using truffle’s migration.</p><p>The output of the above command should look similar to this image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*_h0_xeC0Kt-FCwWiwrA0Eg.png" /></figure><p>The output should contain the address of the <strong>GineteToken</strong> deployed on matic testnet. In above image the address of the GineteToken is <strong>0xc9fa015042CE672ffAC9761206504967A128fb59.</strong></p><p>Please keep this address safe somewhere. We will be needing this address in upcoming steps.</p><h3>4. Registering contracts on Biconomy</h3><p>To register contracts on thebiconomy we will have to follow these steps-:</p><ol><li>Create an account on the biconomy</li><li>Register our DApp on the biconomy dashboard</li><li>Add <strong>GineteToken</strong> Contract in your DApp</li><li>Add <strong>executeMetaTransaction</strong> API for the GineteToken contract</li></ol><p>Go to <a href="https://dashboard.biconomy.io/signup">biconomy</a> dashboard and create your account.</p><p>Now let’s register our DApp on biconomy. Goto biconomy dashboard and click on <strong>Register</strong> in <strong>Your Dapps</strong> section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*BWtI2dzArTOVcJaw3b6BHw.png" /></figure><p>Enter the following information while registering your dapp-:</p><ol><li>Enter Dapp name</li><li>Select <strong>Matic Testnet 3</strong> in Network dropdown</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*hjaXvjB_KA2urCIuHDsx8A.png" /></figure><p>Click on <strong>Create</strong></p><p>The above step will register a <strong>GineteToken</strong> dapp in your biconomy dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*sPom2DwVYrHyhhYXylyRgA.png" /></figure><p>Now let’s add our GineteToken contract in our recently registered dapp.</p><p><strong>Note- Please copy API Key from the newly created DApp. We will be needing in upcoming steps.</strong></p><p>Click on the <strong>View Dapp</strong> button. It should open a screen like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZTPRq8ATu69tKq0ZqYbcrg.png" /></figure><p>Click on <strong>Add Contract</strong> button in <strong>Smart Contracts</strong> section. Please enter the following information-:</p><ol><li>Name- GineteToken</li><li>Address- Address of the GineteToken deployed in <strong>Step</strong> <strong>3</strong></li><li>ABI- Copy and paste this <a href="https://gist.github.com/sameepsi/7d1c42921d7d4e5977d98d949c293ffb">abi</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*dha0e1DxgAbHEYiaol1UoA.png" /></figure><p>Click on <strong>Add</strong>.</p><p>Now let’s add <strong>executeMetaTransaction</strong> API for our GineteToken contract.</p><p>Click on <strong>Manage APIs</strong> button in <strong>DAPP APIs</strong> section</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fYJ7jT_b7q-6-6zzy23CdQ.png" /></figure><p>Now click on <strong>New API</strong> button. Please enter the following information-:</p><ol><li>Smart Contract- <strong>GineteToken</strong></li><li>Method- <strong>ExecuteMetaTransaction</strong></li><li>Name- <strong>executeMetaTransaction</strong></li><li>Enable Native meta-tx- <strong>True</strong></li><li>Click on <strong>Add</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0uVqck0Rio2Wng-rg9PKw.png" /></figure><p>Click on <strong>Save</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yJiLlYeRsOATGrZwfwS4iA.png" /></figure><h3>5. Developing the front-end with gasless transactions</h3><p>Now we will develop a front-end to interact with our deployed GineteToken using meta/gasless transactions</p><p>Now let’s create <strong>GineteToken.json</strong> inside the <strong>src</strong> folder in your working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/341166d476df46043c95f403b00dc4a3/href">https://medium.com/media/341166d476df46043c95f403b00dc4a3/href</a></iframe><p>This file contains the ABI for the GineteToken. We will be needing it to interact with the token in upcoming steps.</p><p>Now let’s edit <strong>App.js</strong> inside the <strong>src</strong> folder in your working directory. Please replace the contents of the file with this one.</p><ol><li>Add the necessary imports</li></ol><pre>// src/App.js</pre><pre>import React from &quot;react&quot;;<br>import Biconomy from &quot;@biconomy/mexa&quot;;</pre><p>2. Initialize constants</p><pre>const abi = require(&quot;./GineteToken.json&quot;).abi;<br>const Web3 = require(&quot;web3&quot;);<br>const sigUtil = require(&quot;eth-sig-util&quot;);<br>// GineteToken contract address<br>const contractAddress = &quot;<strong>0xc9fa015042CE672ffAC9761206504967A128fb59</strong>&quot;; <br>const biconomyAPIKey = &#39;&#39;;  // Biconomy api key from the dashboard  const parentChainId = &#39;3&#39;; // chain id of the network <br>const maticProvider = &#39;https://testnetv3.matic.network&#39;</pre><p>3. Define EIP712 domain params</p><pre>const domainType = [     <br>      { name: &quot;name&quot;, type: &quot;string&quot; },     <br>      { name: &quot;version&quot;, type: &quot;string&quot; },<br>      { name: &quot;chainId&quot;, type: &quot;uint256&quot; },<br>      { name: &quot;verifyingContract&quot;, type: &quot;address&quot; }<br>];<br>const metaTransactionType = [<br>     { name: &quot;nonce&quot;, type: &quot;uint256&quot; },<br>     { name: &quot;from&quot;, type: &quot;address&quot; },<br>     { name: &quot;functionSignature&quot;, type: &quot;bytes&quot; }<br>];<br>let domainData = {<br>     name: &quot;GineteToken&quot;,<br>     version: &quot;1&quot;,<br>     chainId: parentChainId,<br>     verifyingContract: contractAddress   <br>};</pre><p>4. Enable metamask &amp; initialize Web3 providers (metamask in page provider for web3 and biconomy provider for getWeb3)</p><pre>window.ethereum.enable().catch(error =&gt; {<br>     console.log(error); <br>});<br>const web3 = new Web3(window.ethereum); <br>const biconomy = new Biconomy(<br>   new Web3.providers.HttpProvider(maticProvider),<br>   {<br>       apiKey: biconomyAPIKey,<br>       debug: true     <br>   }   <br>); <br>const getWeb3 = new Web3(biconomy);  <br>biconomy<br>     .onEvent(biconomy.READY, () =&gt; {<br>        console.log(&quot;Mexa is Ready&quot;);<br>     })<br>     .onEvent(biconomy.ERROR, (error, message) =&gt; {<br>        console.error(error);<br>     });</pre><p>5. Initialize contract object and define params</p><pre>const contract = new getWeb3.eth.Contract(abi, contractAddress); const amount = &quot;1000000000000000000&quot;;<br>const recipient = &quot;Add your recipient address here&quot;;</pre><p>6. Define functions to execute the transaction</p><pre>const metaTransfer = async () =&gt; {<br>   let functionSignature = contract.methods<br>     .transfer(recipient, amount)<br>     .encodeABI();<br>   executeMetaTransaction(functionSignature); <br>};  <br>const executeMetaTransaction = async functionSignature =&gt; {<br>   const accounts = await web3.eth.getAccounts();<br>   let userAddress = accounts[0];<br>   let nonce = await contract.methods.getNonce(userAddress).call();<br>   let message = {};<br>   message.nonce = parseInt(nonce);<br>   message.from = userAddress;<br>   message.functionSignature = functionSignature;<br>   const dataToSign = JSON.stringify({<br>       types: {<br>         EIP712Domain: domainType,<br>         MetaTransaction: metaTransactionType<br>       },<br>       domain: domainData,<br>       primaryType: &quot;MetaTransaction&quot;,<br>       message: message<br>     });</pre><pre>     web3.eth.currentProvider.send(<br>       {<br>         jsonrpc: &quot;2.0&quot;,<br>         id: 999999999999,<br>         method: &quot;eth_signTypedData_v4&quot;,<br>         params: [userAddress, dataToSign]<br>       },<br>       function(error, response) {<br>         <br>          let { r, s, v } = getSignatureParameters(response.result);<br>          <br>           const recovered = sigUtil.recoverTypedSignature_v4({<br>             data: JSON.parse(dataToSign),<br>             sig: response.result<br>           });<br>           let tx = contract.methods<br>           .executeMetaTransaction(userAddress, functionSignature,<br>            r, s, v)<br>           .send({<br>             from: userAddress<br>           });<br>       }<br>     );<br>   };</pre><pre>    const getSignatureParameters = signature =&gt; {<br>     if (!web3.utils.isHexStrict(signature)) {<br>       throw new Error(<br>         &#39;Given value &quot;&#39;.concat(signature, &#39;&quot; is not a valid hex<br>          string.&#39;)<br>       );<br>     }<br>     var r = signature.slice(0, 66);<br>     var s = &quot;0x&quot;.concat(signature.slice(66, 130));<br>     var v = &quot;0x&quot;.concat(signature.slice(130, 132));<br>     v = web3.utils.hexToNumber(v);<br>     if (![27, 28].includes(v)) v += 27;<br>     return {<br>       r: r,<br>       s: s,<br>       v: v<br>     };<br>   };</pre><p>7. Define App() function</p><pre>function App() {<br>   return (<br>     &lt;div&gt;<br>       &lt;h3&gt; MetaToken &lt;/h3&gt;<br>         &lt;React.Fragment&gt;<br>           {&quot;&quot;}<br>           &lt;button onClick={() =&gt; metaTransfer()} size=&quot;small&quot;&gt;<br>             Transfer<br>           &lt;/button&gt;<br>         &lt;/React.Fragment&gt;<br>     &lt;/div&gt;<br>   );<br> }<br> export default App;</pre><p>You can find the <strong>App.js</strong> code <a href="https://gist.github.com/sameepsi/e136e0aa3ed16389222a534e062c29d7">here</a></p><p>8. Run your application</p><p>Open a new console and perform the following steps.</p><pre>&gt; cd ~/tutorials/meta-tx<br>&gt; npm start</pre><p>Now your app should be running on <a href="http://localhost:3000/">http://localhost:3000</a></p><p>Thanks for reading the article. I hope it was useful for you.</p><blockquote>If you are looking out for Blockchain consulting or development services then reach out to us at <strong>info@ginete.in </strong>or drop your query on our <a href="https://www.ginete.in/contact-us/"><strong>website</strong></a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfae7ae8e743" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ginete-technologies/gasless-meta-transactions-on-matic-using-biconomy-bfae7ae8e743">Gasless/Meta transactions on Matic using Biconomy</a> was originally published in <a href="https://medium.com/ginete-technologies">Ginete Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bitcoin Halving — Effect on Blockchain Ecosystem]]></title>
            <link>https://medium.com/ginete-technologies/bitcoin-halving-effect-on-blockchain-ecosystem-b5662f8b935d?source=rss----8b6c21777ef3---4</link>
            <guid isPermaLink="false">https://medium.com/p/b5662f8b935d</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smartcontractdevelopment]]></category>
            <category><![CDATA[bitcoin-news]]></category>
            <dc:creator><![CDATA[Prateek Singhania]]></dc:creator>
            <pubDate>Fri, 08 May 2020 10:12:59 GMT</pubDate>
            <atom:updated>2020-05-08T10:12:58.886Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bitcoin Halving — Effect on Blockchain Ecosystem</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A72B03L1HPo-3kTRj2W7LA.jpeg" /></figure><p><strong>The Effect of Bitcoin Halving on the Blockchain Ecosystem</strong></p><p>The emergence of <a href="https://www.ginete.in/"><strong>Bitcoin </strong></a>ten years ago has tremendously changed how we view money. The creation and continued existence of Bitcoin have proved that the digital and without a middleman the transfer of money is possible. For Bitcoin to truly serve as a transfer of value, certain features have been fused into the Bitcoin protocol to facilitate value transfer. For instance, the entire concept of proof-of-work is a feature that is intended as a solution to the double-spend problem. Bitcoin also has an interesting encoded feature that allows for what has now become known as Bitcoin halving events. You might be thinking what is Bitcoin Halving? What does it mean? When does it happen? How it affects the Blockchain ecosystem? In this post, we will answer these questions.</p><p><strong>What is Bitcoin Halving?</strong></p><p>In order to understand what Bitcoin Halving is, you need to first understand the basics of Bitcoin and how it works. Bitcoin is a cryptocurrency conducted on a public ledger known as the blockchain. It can be digitally transferred from one person to the other as it exists only online. As gold, it can have monetary value while also being a commodity, but it’s still its own currency. It is also decentralized and not managed by a single person, but rather a group of people who process transactions, known as <a href="https://www.ginete.in/"><strong>miners</strong></a>. This means one does not have to follow government regulations when traded or spent, and you don’t need a bank to use it. New Bitcoins come into the world as a reward for miners whenever they mine bitcoin block on the blockchain.</p><p><a href="https://en.wikipedia.org/wiki/Satoshi_Nakamoto">Satoshi Nakamoto</a> set up the rules for Bitcoin protocol stating that there are two important things: First, the supply of Bitcoin is finite and limited to 21 Million. Second, the number of bitcoins generated per block i.e. the reward decreases by 50% every 210,000 blocks.</p><p>Since there are 6 blocks found on an average within an hour and halving happens once every 210,000 blocks, then every four years there will be a halving event. Once 21 million coins are generated, the network stops producing more. This is also one of the main reasons Bitcoin is often referred to as digital gold. Just like the yellow metal, there is only a limited amount and someday all of it will have been extracted.</p><p>According to the protocol, after every 210,000 blocks, blockchain performs bitcoin halving and with this, producing new coins becomes even more difficult and miners receive 50% fewer BTC for verifying transactions, similar to gold mining where finding new deposits becomes more challenging over time.</p><p><strong>Timeline of Bitcoin Halving</strong></p><p>The next bitcoin halving is likely to occur in May 2020 and it represents the third halving in the history of Bitcoin. With this, the mining rewards will be reduced to 6.25 bitcoins from the current 12.5.</p><p>The first bitcoin halving occurred on 28 November 2012 which saw the rewards coming down from 50 to 25 bitcoins. The second halving happened on 9 July 2016, witnessing a further fall from 25 to 12.5 bitcoins.</p><p><strong>The Effect of Bitcoin Halving on Blockchain Ecosystem</strong></p><p>When we talk about the blockchain ecosystem, we are talking about the parts that make the whole system, how they interact with each other, and with the outside world. It boils down to four parts, the user sending and receiving payments, the miners generating cryptocurrency, investors buying it, and the developers that monitor and maintain the whole thing.</p><p><strong>Impact on Mining Fees</strong></p><p>Miners get incentives for mining the blocks in two forms, block rewards and mining fees. Block rewards are directly driven by the bitcoin halving event, but the mining fee is not. It is independent of the block reward and is based on the demand for using the network. With that said, the transaction fee has recently been on the rise and is expected to provide some relief to the miners from the third halving event to take place in May 2020.</p><p><strong>Impact on Hash Rate</strong></p><p>As some miners drop off the network due to lack of profitability, the hash rate sometimes tends to fall. Rises in the hash rate can be associated with the increased interest of people in mining Bitcoins before the third halving event. It is expected that the prices could recover by a large margin based on the history of the previous halving events as well as the current recovery of the overall cryptocurrency market.</p><p><strong>Impact on Cost of Mining</strong></p><p>The dynamic of Bitcoin halving indicates lesser rewards after each succeeding event as it has high-cost implications. It also requires more amount of time, effort, and greater energy consumption to solve complex algorithms for verifying a block. In the long run, it is expected that the cost of mining will continue to rise with the rewards falling and algorithms becoming more complex.</p><p>This is all about bitcoin halving and how it affects the blockchain ecosystem.</p><p>Have any doubt, or any Blockchain related queries, write to us info@ginete.in</p><p>Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5662f8b935d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ginete-technologies/bitcoin-halving-effect-on-blockchain-ecosystem-b5662f8b935d">Bitcoin Halving — Effect on Blockchain Ecosystem</a> was originally published in <a href="https://medium.com/ginete-technologies">Ginete Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DApp development with ethers.js]]></title>
            <link>https://medium.com/ginete-technologies/dapp-development-with-ethers-js-25872ccd7db7?source=rss----8b6c21777ef3---4</link>
            <guid isPermaLink="false">https://medium.com/p/25872ccd7db7</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[ethersjs]]></category>
            <dc:creator><![CDATA[Sameep singhania]]></dc:creator>
            <pubDate>Wed, 24 Jul 2019 13:44:27 GMT</pubDate>
            <atom:updated>2019-07-25T08:54:45.042Z</atom:updated>
            <content:encoded><![CDATA[<p>The <strong>ethers.js</strong> library is an alternative to both <a href="https://github.com/ethereum/web3.js/">web3.js</a> and <a href="https://github.com/ethereumjs">EthereumJS</a> and is designed to make it easier to interact with Ethereum Blockchain. It aims to be highly maintained, flexible, complete and compact library to interact with Ethereum Blockchain. Currently, the codebase of ethers.js looks more structured and maintained as compared to web3.js.</p><p>In this article, we will learn how to write a DApp using ethers.js. It will be followed by more advanced articles related to ethers.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IByAxvcYvZUM0NyoN195Vg.jpeg" /></figure><p>In this article, we will create a simple <strong>EthereumBank</strong>. In this EthereumBank the users can perform the following actions-:</p><ol><li>Deposit ethers</li><li>Withdraw their ethers</li><li>Check their account balance</li></ol><p>This post is divided into the following 4 sections-:</p><ol><li>Setting up the development environment</li><li>Developing the Smart Contract</li><li>Deploying the smart contract to locally running test node(ganache)</li><li>Interacting with the contract using ethers.js and nodejs</li></ol><h3>1. Setting up the development environment</h3><p>The setup instructions are tested on Ubuntu 16.04 LTS. But they should work fine for macOS as well.</p><p>Open a new terminal.</p><pre>&gt; sudo apt-get update<br>&gt; curl -sL <a href="https://deb.nodesource.com/setup_8.x">https://deb.nodesource.com/setup_8.x</a> -o nodesource_setup.sh<br>&gt; sudo bash nodesource_setup.sh<br>&gt; sudo apt-get install nodejs<br>&gt; npm install -g ganache-cli<br>&gt; npm install -g solc@0.5.7<br>&gt; ganache-cli</pre><p>This will install nodejs, solcjs , ganache-cli and will start ganache-cli on port 8545.</p><p>DO NOT CLOSE THE ABOVE TERMINAL.</p><p>Open a new terminal and perform these steps</p><pre>&gt; cd ~<br>&gt; mkdir -p tutorial/ethers/01<br>&gt; cd tutorial/ethers/01<br>&gt; npm init<br>&gt; npm install ethers fs --save</pre><p>The above commands will do the following-:</p><ol><li>Create a new directory <strong>tutorial/ethers/01</strong>. From now we will call this directory our working directory</li><li>Initialize the nodejs project inside our working directory</li><li>Install <strong>ethers.js</strong> and <strong>fs</strong> node packages</li></ol><h3>2. Developing the Smart Contract</h3><p>Now create EthereumBank.sol file in the working directory with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59ce7621932fe594e384b9c0eea2a671/href">https://medium.com/media/59ce7621932fe594e384b9c0eea2a671/href</a></iframe><p>EthereumBank contract allows users to deposit and withdraw ethers. It also provides a function to check the balance of a user. Please read inline comments.</p><h3>3. Deploying the smart contract to the local node</h3><p>To deploy EthereumBank smart contract we will have to follow these steps-:</p><ol><li>Compile the contract</li><li>Deploy the contract on the local node</li></ol><p>Now let’s compile our contract. Follow the commands below to compile our contract. Run these commands inside the working directory.</p><pre>&gt; solcjs --bin --abi EthereumBank.sol</pre><p>The above command will compile your EthereumBank contract and the compiler will output 2 files. Let’s have a look at them-:</p><ol><li><strong>EthereumBank_sol_EthereumBank.bin</strong>- This is the compiled byte code of your contract and will be deployed to the blockchain.</li><li><strong>EthereumBank_sol_EthereumBank.abi</strong>- This file contains the template of the contract. It is required whenever you want to interact with the deployed contract</li></ol><p>Now let’s deploy our compiled contract on the blockchain, in our case local ganache node. Before running the next steps please ensure that a ganache instance is running in your terminal.</p><p>Now go to your working directory and create <strong>index.js</strong> file with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f89a5af2cb9fb41ba56d17a7dba2a929/href">https://medium.com/media/f89a5af2cb9fb41ba56d17a7dba2a929/href</a></iframe><p>This will initialize the network provider to connect to the local node. We are using <strong>JsonRpcProvider</strong> to achieve that. Now we need to add the compiled bytecode and abi files.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d527db54de4dbbcec8cb059564470481/href">https://medium.com/media/d527db54de4dbbcec8cb059564470481/href</a></iframe><p>Now we have provider, bytecode and abi files for the contract. The next step will be to initialize the signer/wallet which will be used to deploy the contract. Once we have the signer we will initialize the contract factory and will deploy the contract.</p><p>Please, create a new method <strong>deploy()</strong> within your index.js file with the following contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/865fff9b64046ce6d20638a39d6362c4/href">https://medium.com/media/865fff9b64046ce6d20638a39d6362c4/href</a></iframe><p>Now let’s stop writing code and execute what we have written so far. Please execute below commands in the terminal inside your working directory.</p><pre>&gt; node index.js<br>&gt; 0x0C731D36AFE0B16aFe9F3D01C65E761C05047C7D</pre><p>Running above command will print an Ethereum address in the console. This is the address of the contract which we just deployed. So finally we are able to deploy our EthereumBank contract using ethers.js.</p><h3>4. Interacting with the contract</h3><p>Now we will interact with our deployed contract. As we know our contract has the following 3 methods-:</p><ol><li>deposit</li><li>withdraw</li><li>getUserBalance</li></ol><p>We will call each one of these methods using ethers.js. Please create <strong>interactWithBank</strong> method within your index.js file with the following contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d592bfb599a04bff7b69242f0c665af/href">https://medium.com/media/0d592bfb599a04bff7b69242f0c665af/href</a></iframe><p>The code within the <strong>interactWithBank </strong>method does the following-:</p><ol><li>Deploy the contract (line- 28)</li><li>Connects to the deployed contract using contract address, abi and current provider (line- 30)</li><li>Setup the wallet using which call to the smart contract will be made(line- 31)</li><li>Connects the wallet to the contract(line- 33)</li><li>Fetches balance of the user/address from the contract. Please note that here we have not provided any user/address to the method. The address associated with the wallet set in the previous step will be considered and balance of that particular user/address will be returned(line- 35)</li></ol><p>Now let’s test our code by running the below mentioned command in the terminal inside our working directory.</p><pre>&gt; node index.js<br>&gt; 0</pre><p>Running above command will return 0 as the user has not deposited any ethers in the bank so far. Now let’s deposit some ethers in the bank for the user. Please update the <strong>interactWithBank </strong>with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b044852b4fd5258a95d9c1f83b08418/href">https://medium.com/media/3b044852b4fd5258a95d9c1f83b08418/href</a></iframe><p>The additional code in <strong>interactWithBank</strong> method does the following-:</p><ol><li>Set up an additional parameter for the contract which specifies the amount of ethers to send with the call. The user wants to deposit 1 ETHER and hence we have set the value to be 1.0 ETH. The contract can accept more additional parameters which include- gasLimit, gasPrice, nonce, chainId.(line- 39–41)</li><li>Sends the transaction to deposit ethers by calling the <strong>deposit</strong> method of the contract. It will return the entire transaction object, you can print it out to see what is there in that object(line- 42)</li><li>Prints the hash of the transaction(line- 43)</li><li>Fetches the balance of user/address(line- 45)</li><li>Prints the balance on console(line- 46)</li></ol><p>Now let’s test our code by running below mentioned command in the terminal inside our working directory.</p><pre>&gt; node index.js<br>&gt; 0<br>&gt; 0xb2a7f5b927f8adbed371c876765410c2d04dcf8bf56e21b38c6f82427a3ff959<br>&gt; 1.0</pre><p>Running the above mentioned command will print the following on the console-:</p><ol><li>Initial balance of the user which is 0</li><li>The hash of the deposit transaction</li><li>The new balance of the user which is 1.0</li></ol><p>Now let’s withdraw some ethers from the bank for the user. Please update the <strong>interactWithBank </strong>with the below contents.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/873bd078cadbd7a7148ab7a4b4a4a472/href">https://medium.com/media/873bd078cadbd7a7148ab7a4b4a4a472/href</a></iframe><p>The additional code in <strong>interactWithBank</strong> method does the following-:</p><ol><li>Sends the transaction to withdraw ethers by calling the <strong>withdraw</strong> method of the contract. In this method, we are passing a parameter which tells the bank how much ethers to withdraw. In our case, it is 0.9 ETH. It will return the entire transaction object, you can print it out to see what is there in that object(line- 48)</li><li>Prints the hash of the transaction(line- 49)</li><li>Fetches the balance of user/address(line- 51)</li><li>Prints the balance on console(line- 52)</li></ol><p>Now let’s test our code by running below mentioned command in the terminal inside our working directory.</p><pre>&gt; node index.js<br>&gt; 0<br>&gt; 0x8481ea0adcf7fb97ce16cd0918f3c3dedc88de0b8349c5400d78d0f9d47a93cf<br>&gt; 1.0<br>&gt; 0xbe62055c99d186a0b6e27cc6ac0271ffb46ebafac5a643c1605bb59485e8551b<br>&gt; 0.1</pre><p>Running the above mentioned command will print the following on the console-:</p><ol><li>Initial balance of the user which is 0</li><li>The hash of the deposit transaction</li><li>The new balance of the user which is 1.0</li><li>The hash of the withdraw transaction</li><li>The new balance of the user which is 0.1</li></ol><p>Thanks for reading the article. I hope it was useful for you.</p><blockquote>If you are looking out for Blockchain consulting or development services then reach out to us at <strong>info@ginete.in </strong>or drop your query on our <a href="https://www.ginete.in/contact-us/"><strong>website</strong></a>.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25872ccd7db7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ginete-technologies/dapp-development-with-ethers-js-25872ccd7db7">DApp development with ethers.js</a> was originally published in <a href="https://medium.com/ginete-technologies">Ginete Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blockchain: Is it the solution to reduce carbon emission]]></title>
            <link>https://medium.com/ginete-technologies/blockchain-is-it-the-solution-to-reduce-carbon-emission-cc98b891e6bd?source=rss----8b6c21777ef3---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc98b891e6bd</guid>
            <category><![CDATA[blockchain-technology]]></category>
            <category><![CDATA[carbon-emissions]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Taru gupta]]></dc:creator>
            <pubDate>Wed, 29 May 2019 12:43:20 GMT</pubDate>
            <atom:updated>2019-05-29T12:43:19.945Z</atom:updated>
            <content:encoded><![CDATA[<p>Do mankind should abandon all the resources and start living on mountains as monk to protect this earth?</p><p>According to an article published in Guardian, the use of more coal, oil and gases in developing nations such as India and China continues to grow and renewable energies fails to offset the use of fossil fuel.</p><p>The following is the real statistics to prove the above assumption:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*17ytphIiK-7PjhW5J3pFMQ.jpeg" /><figcaption><strong>Global Carbon Emissions — All time high of 37.1bn tonnes in 2018</strong></figcaption></figure><p><strong>Frauds in Carbon Offsets:</strong></p><p>1) <strong>Corruption</strong>: Major consultancy in Mumbai copied and pasted large chunks of documentation from one CDM project to another. In fact, carbon markets have created a lot of income for consultants, carbon brokers and project developers, not to mention the validators, policy makers, NGO professionals and academics who have made a living from these markets.</p><p>2) <strong>Lack of Integrity</strong>: The <a href="http://cdm.unfccc.int/Projects/DB/SGS-UKL1092749325.58">GFL gas project in Gujarat</a>, India, for example, has been one of the biggest producers of CDM carbon offset credits in the world, selling them, many of the biggest polluters in the EU. GFL has profited immensely from the CDM, and Europe’s polluters have had a cheap way to offset their climate responsibilities without actually greening their way at all.</p><p>3) <strong>Negative after effect of offset money</strong>: The offset money is creating deforestation rather than afforestation.</p><p>4) <strong>Lack of third party</strong>: The offset intentions are not verified, permanent, and transparent and are not enforceable.</p><p><strong>Let’s discuss the background around reducing the carbon emissions:</strong></p><p>The Clean Development Mechanism(CDM)<strong> </strong>allows emission-reduction projects in developing countries to earn certified emission reduction (CER) credits, each equivalent to one tonne of CO2. These CERs can be traded and sold, and used by industrialized countries to a meet a part of their emission reduction targets under the Kyoto Protocol.</p><p>The mechanism stimulates sustainable development and emission reductions, while giving industrialized countries some flexibility in how they meet their emission reduction limitation targets.</p><p>The central feature of the <a href="http://unfccc.int/resource/docs/convkp/kpeng.pdf#page=12">Kyoto Protocol</a> is its requirement that countries limit or reduce their greenhouse gas emissions. By setting such targets, emission reductions took on economic value. To help countries meet their emission targets, and to encourage the private sector and developing countries to contribute to emission reduction efforts, negotiators of the Protocol included three market-based mechanisms — emissions trading, the CDM and <a href="http://ji.unfccc.int/">Joint Implementation (JI)</a>.</p><p><strong>Blockchain Integration</strong></p><p>Blockchain is the technology which can be integrated to counter the frauds in Carbon Offsets.</p><p>In this case of the distributed network of Public blockchain architecture, each node within the network maintains, approves, and updates new entries. Each node ensures that all records and procedures are in order, which results in data validity and security. Thus, parties that do not necessarily trust each other are able to reach a common consensus.</p><p>Thus Blockchain can create a platform which is decentralized, immutable, trustless which can trade carbon credits and sell it to the projects which are really genuine and can then offset the carbon emissions.</p><p>Projects credibility can be verified and recorded on Blockchain and at the same time the carbon credits buyer can easily buy the credits without the risk of the frauds.</p><p>This does not completely eradicate the above levels of carbon emissions but atleast lower it when people or countries start trusting the mechanism involved behind it.</p><p>Apart from that, yes it’s the duty of every individual to reduce its carbon footprint and offset it by taking some small steps towards a green ecosystem.</p><p><strong>Conclusion:</strong></p><blockquote>If you are interested in discussing about Blockchain, smart contracts, DApps, smart contract audits, wallets, blockchain platforms and its integration with your system to make it transparent, immutable, secure, trustless and decentralized;</blockquote><blockquote>Then Follow us on <a href="https://www.linkedin.com/company/ginete">Linkedin</a>, <a href="https://medium.com/ginete-technologies">Medium</a> or apply to work with us on our <a href="https://www.ginete.in/">website</a></blockquote><blockquote>We are available for any kind of chat or inquiry: info@ginete.in</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc98b891e6bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/ginete-technologies/blockchain-is-it-the-solution-to-reduce-carbon-emission-cc98b891e6bd">Blockchain: Is it the solution to reduce carbon emission</a> was originally published in <a href="https://medium.com/ginete-technologies">Ginete Technologies</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>