<?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"><channel><title><![CDATA[0xViking]]></title><description><![CDATA[0xViking]]></description><link>https://blog.praneethreddy.me</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 13:47:43 GMT</lastBuildDate><atom:link href="https://blog.praneethreddy.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Solidity Devs do something! Save some gas]]></title><description><![CDATA[Here is a list of tips for reducing gas usage for your solidity smart contract.
There are a lot of points out there and suggested by many masters in this field.
I will try my best to consolidate the majority of them here 👇
**Will update this blog pe...]]></description><link>https://blog.praneethreddy.me/solidity-devs-do-something-save-some-gas</link><guid isPermaLink="true">https://blog.praneethreddy.me/solidity-devs-do-something-save-some-gas</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[Solidity]]></category><category><![CDATA[Ethereum]]></category><dc:creator><![CDATA[0xViking]]></dc:creator><pubDate>Thu, 26 May 2022 17:05:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584433884/Ur6UsfIzs.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Here is a list of tips for reducing gas usage for your solidity smart contract.</p>
<p>There are a lot of points out there and suggested by many masters in this field.</p>
<p>I will try my best to consolidate the majority of them here 👇</p>
<p>**Will update this blog periodically, so save it for further reference</p>
<h1 id="heading-dont-initialize-variables-with-default-value">Don't Initialize Variables with Default Value</h1>
<p>If the variable is not set/initialized, it is assumed to have a default value (0, false, 0x0, etc., depending on the data type). </p>
<p>If you explicitly initialize it with its default value, you are just wasting gas.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584464487/4_KSbEq86.png" alt="image.png" /></p>
<h1 id="heading-reading-and-writing-local-variables-is-cheap-whereas-reading-and-writing-state-variables-stored-in-contract-storage-are-expensive">Reading and writing local variables is cheap, whereas reading and writing state variables stored in contract storage are expensive.</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584488454/nsp4PTwCo.png" alt="image.png" /></p>
<h1 id="heading-pack-your-variables">Pack your variables!</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584503103/nd5UaFsBd.png" alt="image.png" /></p>
<h1 id="heading-uint8-is-not-always-cheaper-than-uint256">uint8 is not always cheaper than uint256</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584519841/T2ZfEVB8w.png" alt="image.png" /></p>
<h1 id="heading-mark-immutable-variables">Mark immutable variables</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584533875/bBOCidz4-.png" alt="image.png" /></p>
<h1 id="heading-public-vs-external-external-is-cheaper">Public vs External (External is cheaper)</h1>
<p>The public modifier is equivalent to external + internal. In other words, both public and external can be called from outside your contract (like MetaMask), but only the public can be called from other functions inside your contract.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584547555/YWpaZPM-S.png" alt="image.png" /></p>
<p>Similarly, if a function is only called by other functions in the contract using the "internal" modifier is good it is cheaper to call</p>
<h1 id="heading-prefix-increment-is-better-than-postfix-increment">prefix increment is better than postfix increment.</h1>
<p>Note to be careful using this optimization whenever the expression's return value is used afterwards, e.g. <code>uint a = i++</code> and <code>uint a = ++i</code> result in different values for <code>a</code>.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1653584584273/fkAHhq-eG.png" alt="image.png" /></p>
<p>Another benefit of using this method👇</p>
<p>When using any kind of counter (like <code>_tokenId</code>), starting it off at <code>1</code> instead of <code>0</code> will make the first mint slightly cheaper. In general, writing a value to a slot that doesn’t have one will be more expensive than writing to one that does, so keep that in mind.</p>
<h1 id="heading-delete-variables-that-you-dont-need">Delete variables that you don’t need.</h1>
<p>In Ethereum, you get a gas refund for freeing up storage space. If you don’t need a variable anymore, you should delete it using the delete keyword provided by solidity or by setting it to its default value.</p>
]]></content:encoded></item><item><title><![CDATA[MY DevConnect AMS and ETHAmsterdam Experience and learnings from it]]></title><description><![CDATA[Hey all, I will be taking you on a week-long journey that I have experienced from 18th to 25th April 2022 at DevConnect Amsterdam and ETHAmsterdamorganized by ETHGlobal. And also embrace yourself with the learnings from my perspective.
Welcome again ...]]></description><link>https://blog.praneethreddy.me/devconnectams-ethamsterdam</link><guid isPermaLink="true">https://blog.praneethreddy.me/devconnectams-ethamsterdam</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[DEVCommunity]]></category><category><![CDATA[Ethereum]]></category><category><![CDATA[hackathon]]></category><dc:creator><![CDATA[0xViking]]></dc:creator><pubDate>Tue, 26 Apr 2022 16:09:28 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1650985592271/7oCutwcmU.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey all, I will be taking you on a week-long journey that I have experienced from 18th to 25th April 2022 at <a target="_blank" href="https://devconnect.org/">DevConnect Amsterdam</a> and <a target="_blank" href="https://amsterdam.ethglobal.com/">ETHAmsterdam</a>organized by <a target="_blank" href="https://twitter.com/ETHGlobal">ETHGlobal</a>. And also embrace yourself with the learnings from my perspective.</p>
<p>Welcome again to my blog, I am Praneeth Reddy Arikatla. Pursuing my master's in Computer Science at <a target="_blank" href="https://www.polimi.it/en/">Polimi</a>and living in Berlin as an exchange student at <a target="_blank" href="https://www.tu.berlin/">TU Berlin</a>. Also, looking for full-time job opportunities in WBE3. Please visit <a target="_blank" href="https://praneethreddy.me/">praneethreddy.me</a> for more details and here is my <a target="_blank" href="https://drive.google.com/file/d/1P0fywklB9E172ZFii3L1bNLd1nX0zDD7/view?usp=sharing">resume</a>.</p>
<p>Enough, let's get back to DevConnect and dive in.</p>
<p>Okay, Before getting in I should thank two people without them I wouldn't have gone to this event. <a target="_blank" href="https://twitter.com/BaptisteGreve">Baptiste</a> for sponsoring enough amount to attend this week-long event and <strong>Piablo</strong> another <a target="_blank" href="https://twitter.com/developer_dao">developer_dao</a>member for letting me crash in his place.</p>
<h1 id="heading-day-0"><strong>DAY 0</strong></h1>
<p>I was so excited and planned a lot on what events to attend and how to interact/network with people and get some benefit(JOB OPPORTUNITIES) out of it. Which didn't happen as exactly as planned, but in the end, everything went fine so, follow along till the end and see what happened.</p>
<h1 id="heading-day-1"><strong>DAY 1</strong></h1>
<p>Attended WEB3 UX unConference("A participant-driven meeting").</p>
<p>Met many great people in this space like <a target="_blank" href="https://twitter.com/tomonari_t_t">Tom</a> from Tokyo, <a target="_blank" href="https://twitter.com/tahabe_">Taha</a> from <a target="_blank" href="https://twitter.com/ChainSafeth">ChainSafe</a>, <a target="_blank" href="https://twitter.com/muhdraffiqq">Raffiq</a> and also <a target="_blank" href="https://twitter.com/samonchain">SAM</a> and discussed the user experience on ONBOARDING people into WBE3 with as a working group. That was a great talk with the group and also with Sam.</p>
<p><strong>My personal takeaway from the event:- </strong>
Maxis in this space wants everything to be as per the web3 principles, But the technology still didn't reach that advanced stage where it makes even non-tech people hop in without any friction/bad user experience.
I personally think the future would be WEB2.5 where people take leverage of WEB2 to bring more people onto WEB3 and both technologies will co-exist.</p>
<h1 id="heading-day-2"><strong>DAY 2</strong></h1>
<p>Attended "Build an ETH Dapp in 7hours" by <a target="_blank" href="https://twitter.com/_buildspace">buidspace</a></p>
<p>I know this is a beginners event, but I went there to meet <a target="_blank" href="https://twitter.com/FarzaTV">Farza</a>and the team behind buildspace IRL. I had a great time there and did a mini hack "Token gated file sharing" tool with a great team<a target="_blank" href="https://twitter.com/georgechrisc">George</a>, Pedro, and Jason.</p>
<p>Also, a suggestion for buildspace would be to try to have some in-hand building experience in-person in these types of events, I know the majority of people would be coming for networking but since this is a beginners event there will be people attending there who would be willing to learn something in-person.</p>
<p><strong>My Personal Takeaway from this event:-</strong> You should be very strong at the fundamentals be it a normal tech stack or web3 tech stack. This will help you build something faster than it takes when you google something.</p>
<h1 id="heading-day-3"><strong>DAY 3</strong></h1>
<p>Attended "Oh! Snap It's Metamask!" by <a target="_blank" href="https://twitter.com/MetaMask">MetaMask</a></p>
<p>Man, this was such a great workshop! got to know that metamask has a development version metamask(FLASK) and wrote a snap for a password manager. People who attended there are soooo technically strong in this space and the team behind metamask were there who are also really at another level, where at a time I felt it was over my head but two other people(<a target="_blank" href="https://twitter.com/0ceans404">Steph</a> and <a target="_blank" href="https://twitter.com/AlexNi245">Alex</a>) from <a target="_blank" href="https://twitter.com/developer_dao">developer_dao</a>helped me understand what's happening there :P </p>
<p><strong>My Personal Takeaway from this event:-</strong> Don't think you know many things, especially in WEB3, You know just a drop in an ocean.</p>
<p>Also attended a party "Filecoin &amp; Friends Social!" by <a target="_blank" href="https://twitter.com/IPFS">IPFS</a>&amp; <a target="_blank" href="https://twitter.com/Filecoin">FILECOIN</a> and met another incredible person <a target="_blank" href="https://twitter.com/MCERFSR">MICHAEL MORAMI</a> from <a target="_blank" href="https://twitter.com/CertoraInc">Certora</a> and had insights on formal verification in Smart contract security.</p>
<h1 id="heading-day-4"><strong>DAY 4</strong></h1>
<p>Attended "Secureum TrustX" by <a target="_blank" href="https://twitter.com/TheSecureum">Secureum</a></p>
<p>People who attended are really really knowledgeable and very strong at what they know/speak. Security is one of the most important aspects of any protocol or application being built especially in WEB3 because if you want to onboard more people you would make them feel that the tech here is safe enough to interact with. The recent rise in hacks, bugs, and scams scares the shi* out of people. Also, meeting <a target="_blank" href="https://twitter.com/0xRajeev">Rajeev</a> in person is really exciting</p>
<p><strong>My Personal Takeaway from this event:- </strong> Security in WEB3 should do a "LEFT SHIFT" in the development process. While developing always think from a security perspective as well.</p>
<h1 id="heading-day-5"><strong>DAY 5</strong></h1>
<p>ETHAmsterdam</p>
<p>I actually have registered for the hackathon but unfortunately couldn't stake the required eth to reserve my spot. So, they withdrew my application which I came to know lately. But, somehow I wanted to be there and have that experience of meeting people and sharing knowledge and meeting the companies in WEB3. Looked at all possible ways and finally decided to volunteer for the ETHGlobal team that is organizing ETHAms. Got into this space and spend as much time as I can there. Met really great people here and legends out there in this space. Also met people who are budding into this space which is really inspiring and motivating to stay strong and stick to your journey in web3.</p>
<p>Met great people like <a target="_blank" href="https://twitter.com/manhuichi">Huichi</a>, Andrew Dunscomb, <a target="_blank" href="https://twitter.com/TheRealKartik">Kartik Talwar</a>, <a target="_blank" href="https://twitter.com/schetty">Naomi</a>, <a target="_blank" href="https://twitter.com/cheechyuanang">CheeChyuan</a>,  <a target="_blank" href="https://twitter.com/lukebateman_">Luke</a>, <a target="_blank" href="https://twitter.com/Shakaleikaumaka">Shaka</a>, Emily, and Anna.</p>
<p>Also met the great <a target="_blank" href="https://twitter.com/evan_van_ness">Evan</a> and had a great talk. Thanks for the suggestion to start contributing to opensource, I will start doing that.</p>
<p><strong>My Personal Takeaway from this event:-</strong> Don't worry about how much you know in WEB3, just stay in this space and take your time and keep on building. Eventually, you will learn a lot and gain a lot of knowledge. We are soooooooo fuck*ng early into this there will be a lot of ups and downs in this journey, just take inspiration from the community and stay long.</p>
<h1 id="heading-developerdao-members-only-happy-hours">Developer_Dao members-only Happy hours</h1>
<p>Also attended developer_dao event sponsored by <a target="_blank" href="https://twitter.com/coinbase">coinbase</a> happened on Saturday(23rd April 2022). This is where real networking for me happened I met people whom I am following from the start of my web3 journey. Thanks to <a target="_blank" href="https://twitter.com/dabit3">Nader</a>, <a target="_blank" href="https://twitter.com/VittoStack">Vitto</a>, <a target="_blank" href="https://twitter.com/thatguyintech">Albert</a>, <a target="_blank" href="https://twitter.com/JoshCStein">Josh</a>, <a target="_blank" href="https://twitter.com/Rahatcodes">Rahat</a>, <a target="_blank" href="https://twitter.com/AlexNi245">Alex</a>, <a target="_blank" href="https://twitter.com/K4y1s">Kay</a>, <a target="_blank" href="https://twitter.com/sil_kreulen">Sil</a>, <a target="_blank" href="https://twitter.com/RyanCoordinator">Ryan</a>, piablo, pedro, Aakansha, <a target="_blank" href="https://twitter.com/kempsterrrr">kempsterrr</a>, <a target="_blank" href="https://twitter.com/georgechrisc">George</a>, <a target="_blank" href="https://twitter.com/camiinthisthang">Cami</a>, for making this happen, for hearing me out, giving me suggestions.</p>
<h1 id="heading-my-learnings-from-the-whole-week"><strong>MY LEARNINGS FROM THE WHOLE WEEK:- </strong></h1>
<p>STAY STRONG, KEEP LEARNING, KEEP BUILDING, KEEP NETWORKING, BELIEVE IN YOURSELF, and CONTRIBUTE TO OPEN SOURCE. You will eventually land in a good place that is designated for you. </p>
<p>I will be trying as much as I can and let's see what will happen. I AM ALL IN.</p>
]]></content:encoded></item><item><title><![CDATA[How to write a smart contract in solidity, deploy, and mint a simple NFT on the Polygon blockchain]]></title><description><![CDATA[Introduction
Blockchain is one of the most interesting and exciting technology in recent times. You can see people making millions of dollars by selling NFTs. Take for example an Indonesian guy Sultan Gustaf Al Ghozali, 22, who studies computer scien...]]></description><link>https://blog.praneethreddy.me/how-to-write-a-smart-contract-in-solidity-deploy-and-mint-a-simple-nft-on-the-polygon-blockchain</link><guid isPermaLink="true">https://blog.praneethreddy.me/how-to-write-a-smart-contract-in-solidity-deploy-and-mint-a-simple-nft-on-the-polygon-blockchain</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[Solidity]]></category><dc:creator><![CDATA[0xViking]]></dc:creator><pubDate>Thu, 14 Apr 2022 15:26:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1645919582274/Il7sHErW2.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">Introduction</h1>
<p>Blockchain is one of the most interesting and exciting technology in recent times. You can see people making millions of dollars by selling NFTs. Take for example an Indonesian guy Sultan Gustaf Al Ghozali, 22, who studies computer science at a college in Indonesia, he took a photo of himself sitting in front of his computer every day for five years.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://twitter.com/Ghozali_Ghozalu/status/1480524562609573892">https://twitter.com/Ghozali_Ghozalu/status/1480524562609573892</a></div>
<p>Started selling them as NFT for $3 each but later it became famous and was sold out, as of today total volume traded is Ether 396 which is ~ $1.1 M.</p>
<p><a target="_blank" href="https://opensea.io/collection/ghozali-everyday">ghozali-everyday Opensea account</a></p>
<p>With the rising interest in NFTs, developers are also slowly rising to the top. Ethereum is the biggest smart-contract blockchain and has a huge NFT community but the problem is its gas fees. </p>
<p>At the time of writing this article, a simple NFT smart contract would cost around $1000+ to deploy. So we would be using Polygon’s blockchain to deploy and mint. It is an EVM-compatible blockchain with many projects adopting it as a secondary option including OpenSea the dominating NFT marketplace. Gas fees in Polygon are relatively low compared to Ethereum and have the same functionalities.</p>
<h1 id="heading-project-setup">⚙️ Project Setup</h1>
<p>We will be using a tool called <strong>Hardhat</strong>, It is an Ethereum development environment, fortunately, it also works with Polygon and a few other chains. Hardhat will let us quickly compile smart contracts and test them locally. Assuming you already have node/npm in your system.</p>
<p>Next, let's head to the terminal. Go ahead and <code>cd</code> to the directory you want to work in. then install hardhat following the below commands,</p>
<pre><code>mkdir polygon<span class="hljs-operator">-</span>nft
cd polygon<span class="hljs-operator">-</span>nft
npm init <span class="hljs-operator">-</span>y
npm install <span class="hljs-operator">-</span><span class="hljs-operator">-</span>save<span class="hljs-operator">-</span>dev hardhat
</code></pre><blockquote>
<p>After you execute the last command and install hardhat, You may see a message about vulnerabilities. This is a common warning when you install anything using NPM. You can google about it if you want to know more!</p>
</blockquote>
<p>Now execute the following command which is basically initiating hardhat which will give us an option to start with basic/simple project setup. After you execute the below command it gives you a few options, for now, we will go ahead with default options, so just keep pressing enter.</p>
<pre><code><span class="hljs-attribute">npx</span> hardhat
</code></pre><p>The sample project will ask you to install a few other dependencies which are helpful like <code>hardhat-waffle</code> and <code>hardhat-ethers</code>. </p>
<p>I would suggest going ahead and installing these other dependencies just in case it didn't do it automatically.</p>
<pre><code>npm install <span class="hljs-operator">-</span><span class="hljs-operator">-</span>save<span class="hljs-operator">-</span>dev @nomiclabs<span class="hljs-operator">/</span>hardhat<span class="hljs-operator">-</span>waffle ethereum<span class="hljs-operator">-</span>waffle chai @nomiclabs<span class="hljs-operator">/</span>hardhat<span class="hljs-operator">-</span>ethers ethers
</code></pre><p>We'll also want to install "<strong>OpenZeppelin</strong>" which is another library that's used a lot to develop secure smart contracts</p>
<pre><code><span class="hljs-built_in">npm</span> install @openzeppelin/contracts
</code></pre><p>You should now have a directory filled with a few files and folders like contracts, scripts, and test.</p>
<p>So just to verify go ahead and run the following command</p>
<pre><code>npx hardhat run scripts<span class="hljs-operator">/</span>sample<span class="hljs-operator">-</span>script.js
</code></pre><p>which should give us something like </p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645907953741/XWd-bCmv5.png" alt="image.png" /></p>
<p>💥 If you see this it means your local environment is set up and you also ran/deployed a smart contract to a local blockchain.</p>
<p>What happened here is that</p>
<ul>
<li>Hardhat compiled your smart contract from solidity to bytecode</li>
<li>Hardhat created a "local blockchain" on your computer</li>
<li>Hardhat then "deployed" your compiled contract to your local blockchain</li>
</ul>
<h1 id="heading-writing-actual-smart-contract">✍Writing actual Smart Contract</h1>
<p>Now there are multiple files and folders in your <code>polygon-nft</code> folder.
Go ahead and delete the file sample-test.js under the test folder.  Also, delete sample-script.js under scripts. Then, delete Greeter.sol under contracts. <strong><em>Don't delete the actual folders!</em></strong></p>
<p>Now you can try going to https://docs.openzeppelin.com/contracts/4.x/wizard and get code is generated by their useful tool depending on selected features for making a simple contract.</p>
<p>OR</p>
<p>Let's write it!!</p>
<p>Create a file named polygonNFT.sol under the contracts directory and copy-paste the following code in that file and save it. I will explain the code below</p>
<pre><code><span class="hljs-comment">// SPDX-License-Identifier: UNLICENSED</span>

<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.1;</span>

<span class="hljs-keyword">import</span> <span class="hljs-string">"hardhat/console.sol"</span>;

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">polygonNFT</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) </span>{
        console.log(<span class="hljs-string">"This is my first ever Polygon NFT contract. I am Excited!"</span>);
    }
}
</code></pre><p>let's go line by line :</p>
<pre><code><span class="hljs-comment">// SPDX-License-Identifier: UNLICENSED</span>
</code></pre><p>This is about the license of using your smart contract, you can fine more about them <a target="_blank" href="https://spdx.org/licenses/">here</a>.</p>
<pre><code><span class="hljs-attribute">pragma</span> solidity ^<span class="hljs-number">0</span>.<span class="hljs-number">8</span>.<span class="hljs-number">1</span>;
</code></pre><p>This is the version of the Solidity compiler we want our contract to use. When you say 0.8.1, it means that any Solidity compiler with version 0.8.1 or higher but less than 0.9.0 can be used to run our smart contract.</p>
<blockquote>
<p>Note, be sure your compiler is set accordingly (0.8.1) in hardhat.config.js.</p>
</blockquote>
<pre><code><span class="hljs-keyword">import</span> <span class="hljs-string">"hardhat/console.sol"</span>;
</code></pre><p>Importing Hardhat provided a solidity file that will allow us to do some console logs in our contract which would be helpful while developing and testing.</p>
<pre><code><span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">polygonNFT</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) </span>{
        console.log(<span class="hljs-string">"This is my first ever Polygon NFT contract. I am Excited!"</span>);
    }
}
</code></pre><p>It is basically like a class on other object-oriented programming languages. Once we initialize this contract for the first time, that constructor will run and print out that line to the console.</p>
<h2 id="heading-lets-run-our-smart-contract">🏃 Let's run our smart contract</h2>
<p>Go ahead into the scripts folder and create a file named <code>run.js</code>. And copy-paste the following code in <code>run.js</code>:</p>
<pre><code>const main <span class="hljs-operator">=</span> async () <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> {
  const polygonContractFactory <span class="hljs-operator">=</span> await hre.ethers.getContractFactory(<span class="hljs-string">'polygonNFT'</span>);
  const nftContract <span class="hljs-operator">=</span> await polygonContractFactory.deploy();
  await nftContract.deployed();
  console.log(<span class="hljs-string">"Contract deployed to:"</span>, nftContract.<span class="hljs-built_in">address</span>);
};

const runMain <span class="hljs-operator">=</span> async () <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> {
  <span class="hljs-keyword">try</span> {
    await main();
    process.exit(<span class="hljs-number">0</span>);
  } <span class="hljs-keyword">catch</span> (<span class="hljs-function"><span class="hljs-keyword">error</span>) </span>{
    console.log(<span class="hljs-function"><span class="hljs-keyword">error</span>)</span>;
    process.exit(<span class="hljs-number">1</span>);
  }
};

runMain();
</code></pre><p>The above basically doing the following things:</p>
<ul>
<li>compile our smart contract </li>
<li>deploy it to our local blockchain</li>
</ul>
<p>let's go line by line again:</p>
<pre><code>const polygonContractFactory <span class="hljs-operator">=</span> await hre.ethers.getContractFactory(<span class="hljs-string">"polygonNFT"</span>);
</code></pre><p>This will compile our contract and generate a few necessary files in the <code>artifacts</code> folder which are needed work with our contract. </p>
<pre><code>const nftContract <span class="hljs-operator">=</span> await polygonContractFactory.deploy();
</code></pre><p>The above line will make Hardhat create a local Ethereum network for us, but just for this contract. Then, after the script completes it'll destroy that local network. So, every time you run the contract, it'll be a fresh blockchain. </p>
<pre><code>await nftContract.deployed();
</code></pre><p>The above line will make sure to wait until our contract is officially mined and deployed to our local blockchain. Yeah, hardhat will actually create fake "miners" on your machine to try its best to imitate the actual blockchain.</p>
<p>Our constructor will also run when the smart contract is fully deployed!</p>
<pre><code>console.log(<span class="hljs-string">"Contract deployed to:"</span>, nftContract.<span class="hljs-built_in">address</span>);
</code></pre><p>You know the console.log line, it will print the <code>nftContract.address</code> which is the address of our smart contract on that blockchain onto the terminal.</p>
<p>The runMain() function is actually the starting function that will be executed once we run below. Function content is self-explanatory :)</p>
<p>Now let's go ahead and run the actual smart contract we created. Go back to your terminal where you executed "npx hardhat run scripts/sample-script.js" previously</p>
<pre><code><span class="hljs-attribute">npx</span> hardhat run scripts/run.js
</code></pre><p>Once you run that command, on your terminal you would see "This is my first ever Polygon NFT contract. I am Excited!" the console.log text in your constructor then "Contract deployed to: .........." which displays your contract address.</p>
<p>It should look something like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645910880946/zhYtOoCJd.png" alt="image.png" /></p>
<h2 id="heading-now-lets-write-minting-functionality">👷 Now let's write minting functionality</h2>
<pre><code><span class="hljs-comment">// SPDX-License-Identifier: UNLICENSED</span>

<span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> ^0.8.1;</span>

<span class="hljs-comment">// We import some OpenZeppelin Contracts which are helpful.</span>
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"@openzeppelin/contracts/utils/Counters.sol"</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">"hardhat/console.sol"</span>;

<span class="hljs-comment">// We inherit the contract we imported. Which means we'll have access to the inherited contract's methods.</span>
<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">polygonNFT</span> <span class="hljs-keyword">is</span> <span class="hljs-title">ERC721URIStorage</span> </span>{
  <span class="hljs-comment">// provided by OpenZeppelin to help us keep track of tokenIds.</span>
  <span class="hljs-keyword">using</span> <span class="hljs-title">Counters</span> <span class="hljs-title"><span class="hljs-keyword">for</span></span> <span class="hljs-title">Counters</span>.<span class="hljs-title">Counter</span>;
  Counters.Counter <span class="hljs-keyword">private</span> _tokenIds;

  <span class="hljs-comment">// We need to pass the name of our NFT token and its symbol.</span>
  <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) <span class="hljs-title">ERC721</span> (<span class="hljs-params"><span class="hljs-string">"My First Polygon NFT Project"</span>, <span class="hljs-string">"0xViking"</span></span>) </span>{
    console.log(<span class="hljs-string">"This is my first ever Polygon NFT contract. I am Excited!"</span>);
  }

  <span class="hljs-comment">// A function our user will hit to get their NFT.</span>
  <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">mintMyPolygonNFT</span>(<span class="hljs-params"></span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
     <span class="hljs-comment">// Get the current tokenId, this starts at 0.</span>
    <span class="hljs-keyword">uint256</span> newItemId <span class="hljs-operator">=</span> _tokenIds.current();

     <span class="hljs-comment">//Main minting of the NFT to the caller using msg.sender.</span>
    _safeMint(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>, newItemId);

    <span class="hljs-comment">// Set the NFTs data.</span>
    _setTokenURI(newItemId, <span class="hljs-string">"ThisNeedsToBeChanges"</span>);

    <span class="hljs-comment">// Increment the counter for when the next NFT is minted.</span>
    _tokenIds.increment();
  }
}
</code></pre><p>I tried to explain each line using comments. If you still have any doubt please comment below, I am more than happy to explain you :)</p>
<p>Now let's update the <code>TokenURI</code> which is the actual NFT data. It usually links to a JSON file called the <code>metadata</code> and that looks something like this:</p>
<pre><code>{
    <span class="hljs-attr">"name"</span>: <span class="hljs-string">"This is Viking"</span>,
    <span class="hljs-attr">"description"</span>: <span class="hljs-string">"Let's conquer the web3"</span>,
    <span class="hljs-attr">"image"</span>: <span class="hljs-string">"https://i.imgur.com/ZIbmiR6.png"</span>
}
</code></pre><p>You can customize this, but, almost every NFT has a name, description, and a link to something like a video, image, etc. </p>
<p>Be careful with the structure of your metadata, if your structure does not match the <a target="_blank" href="https://docs.opensea.io/docs/metadata-standards">OpenSea Requirements</a> your NFT will appear broken on the website. This is all part of the ERC721 standards and it allows people to build websites on top of NFT data.</p>
<p>The image link mentioned above is an Imgur link which is a centralized image hosting service, I have created an account there and uploaded my image there, and copied the link from it.</p>
<blockquote>
<p>Please check your copied Imgur link should be a Direct Imgur link that looks like - https://i.imgur.com/abc123.png NOT https://imgur.com/gallery/abc123. The easiest way to tell is to check if the URL ends in an image extension like .png or .jpg. You can right-click the Imgur image and "copy image address". This will give you the correct URL.</p>
</blockquote>
<p>We can copy the <code>This is Viking</code> JSON metadata above and paste it into this <a target="_blank" href="https://jsonkeeper.com/">jsonkeeper</a> site. </p>
<p>This website is just an easy place for people to host JSON data and we'll be using it to keep our NFT data for now. Once you click "Save" you'll get a link to the JSON file. (Something like https://jsonkeeper.com/b/56BW). You can test your link by opening a new tab and be sure it all looks good!</p>
<p>Now, let's go head to our smart contract and change that one line.</p>
<p>Following line of code</p>
<pre><code><span class="hljs-selector-tag">_setTokenURI</span>(newItemId, <span class="hljs-string">"ThisNeedsToBeChanges"</span>)
</code></pre><p>to the below code where we are actually setting the URI as the link to our JSON file.</p>
<pre><code><span class="hljs-comment">// mine looks like _setTokenURI(newItemId, "https://jsonkeeper.com/b/56BW");</span>
<span class="hljs-selector-tag">_setTokenURI</span>(newItemId, <span class="hljs-string">"INSERT_YOUR_JSON_URL_HERE"</span>);
</code></pre><p>Under that line, we will add a <code>console.log</code> just to help us see when the NFT is minted and to whom!</p>
<pre><code>console.log(<span class="hljs-string">"An NFT with ID %s has been minted to %s"</span>, newItemId, <span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>);
</code></pre><h2 id="heading-lets-mint-an-nft-on-our-local-chain">🎉 Let's Mint an NFT on our local chain</h2>
<p>What we need to do is to change our <code>run.js</code> file to call our mintMyPolygonNFT() function. add the following code below our <code>console.log</code> line in the <code>main</code> function</p>
<pre><code>  <span class="hljs-comment">// Call the function.</span>
  let txn <span class="hljs-operator">=</span> await nftContract.mintMyPolygonNFT()
  <span class="hljs-comment">// Wait for it to be mined.</span>
  await txn.wait()

  <span class="hljs-comment">// Mint another NFT for fun.</span>
  txn <span class="hljs-operator">=</span> await nftContract.mintMyPolygonNFT()
  <span class="hljs-comment">// Wait for it to be mined.</span>
  await txn.wait()
</code></pre><p>that's it, let's run using the following command:</p>
<pre><code><span class="hljs-attribute">npx</span> hardhat run scripts/run.js
</code></pre><p>It should mint 2 NFTs on your local blockchain. Here is how mine looks like</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645913113599/UgNB8oKad.png" alt="image.png" /></p>
<h1 id="heading-lets-deploy-to-polygon-mumbai-testnet">💻 Let's deploy to Polygon Mumbai testnet</h1>
<p>When we deploy our contract, we need to tell all those miners, "hey, this is a new smart contract, please add my smart contract to the blockchain and then tell everyone else about it as well".</p>
<p>We will use Alchemy to do this.</p>
<p>Alchemy essentially helps us broadcast our contract creation transaction so that it can be picked up by miners as quickly as possible. Once the transaction is mined, it is then broadcasted to the blockchain as a legit transaction. From there, everyone updates their copy of the blockchain.</p>
<p>Go ahead and create an account at <a target="_blank" href="https://www.alchemy.com/">Alchemy</a></p>
<p>Then check out this video created by <a target="_blank" href="https://twitter.com/FarzaTV">Farza</a> below on how to get your Testnet API-key, in the video, he showed Rinkeby testent, instead, you can select Polygon and the Polygon-Mumbai in the dropdown.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.loom.com/share/21aa1d64ea634c0c9da8fc5faaf24283">https://www.loom.com/share/21aa1d64ea634c0c9da8fc5faaf24283</a></div>
<p>BTW you also need a wallet to do so, I will suggest to go with Metamask and creating a wallet. Now add Polygon Mumbai to your metamask wallet. Check out this short video below. which also shows adding fake matic tokens which are required to deploy our smart contract</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://youtu.be/I4C5RkiNAYQ">https://youtu.be/I4C5RkiNAYQ</a></div>
<p>Once everything is ready let's set our <code>deploy.js</code> file. Go ahead and create a file named <code>deploy.js</code> under the scripts folder. Copy-paste all of <code>run.js</code> into <code>deploy.js</code>. </p>
<p>Then update your <code>hardhat.config.js</code></p>
<pre><code><span class="hljs-built_in">require</span>(<span class="hljs-string">"@nomiclabs/hardhat-waffle"</span>);

<span class="hljs-comment">// This is a sample Hardhat task. To learn how to create your own go to</span>
<span class="hljs-comment">// https://hardhat.org/guides/create-task.html</span>
task(<span class="hljs-string">"accounts"</span>, <span class="hljs-string">"Prints the list of accounts"</span>, async (taskArgs, hre) <span class="hljs-operator">=</span><span class="hljs-operator">&gt;</span> {
  const accounts <span class="hljs-operator">=</span> await hre.ethers.getSigners();

  <span class="hljs-keyword">for</span> (const account of accounts) {
    console.log(account.<span class="hljs-built_in">address</span>);
  }
});

<span class="hljs-comment">// You need to export an object to set up your config</span>
<span class="hljs-comment">// Go to https://hardhat.org/config/ to learn more</span>

<span class="hljs-comment">/**
 * @type import('hardhat/config').HardhatUserConfig
 */</span>
module.exports <span class="hljs-operator">=</span> {
  solidity: <span class="hljs-string">"0.8.1"</span>,
  networks: {
    mumbai: {
      url: <span class="hljs-string">'YOUR_ALCHEMY_API_URL-COPY_IT-FROM-DASHBOARD'</span>,
      accounts: [<span class="hljs-string">'YOUR-MUMBAI-ACCOUNT-PRIVATE-KEY'</span>],
    },
  },
};
</code></pre><blockquote>
<p>DON'T COMMIT THIS FILE TO GITHUB. IT HAS YOUR PRIVATE KEY. YOU WILL GET HACKED + ROBBED. THIS PRIVATE KEY IS THE SAME AS YOUR MAINNET PRIVATE KEY. In the meantime - open your .gitignore file and add a line for hardhat.config.js.</p>
</blockquote>
<p>Once you've got your config setup we're set to deploy with the deploy script we wrote earlier.</p>
<p>execute the following command in the terminal:</p>
<pre><code>npx hardhat run scripts<span class="hljs-operator">/</span>deploy.js <span class="hljs-operator">-</span><span class="hljs-operator">-</span>network mumbai
</code></pre><p>Executing the above command gives you similar output:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645915062859/IjJ0fO0HF.png" alt="image.png" /></p>
<p>Copy that contract address and go to <a target="_blank" href="https://mumbai.polygonscan.com/">Mumbai Testnet explorer</a> and paste the address there and verify whether it was successful or not.</p>
<p>Okay, BTW you have minted two NFTs while deploying your smart contract let's go to <a target="_blank" href="https://testnets.opensea.io/">opensea testnets</a>and see in your account whether those minted NFTs are there are not, Opensea might take a few minutes to sync.</p>
<p>This is how my collection looks:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645915390416/3v8Ez-Gv6.png" alt="image.png" /></p>
<p>That brings an end to this article.</p>
<blockquote>
<p>So while deploying to the Polygon mainnet, in the <code>deploy.js</code> file remove that <code>mintMyPolygonNFT()</code> triggering statements so that your collection starts from starting in the mainnet.</p>
<pre><code>txn <span class="hljs-operator">=</span> await nftContract.mintMyPolygonNFT()
<span class="hljs-comment">// Wait for it to be mined.</span>
await txn.wait()
</code></pre><p><strong><em>BONUS</em></strong>: If you want to deploy it to mainnet, add configurations to <code>networks</code> key in hardhat.config.js. Something like;</p>
<pre><code><span class="hljs-selector-tag">networks</span>: {
    <span class="hljs-attribute">mumbai</span>: {
      url: <span class="hljs-string">'YOUR_ALCHEMY_API_URL-COPY_IT-FROM-DASHBOARD'</span>,
      accounts: [<span class="hljs-string">'YOUR-MUMBAI-ACCOUNT-PRIVATE-KEY'</span>],
    },
    <span class="hljs-selector-tag">rinkeby</span>: {
      <span class="hljs-attribute">url</span>: <span class="hljs-string">'YOUR_ALCHEMY_RINKEBY-API_URL-COPY_IT-FROM-DASHBOARD'</span>,
      accounts: [<span class="hljs-string">'YOUR-ACCOUNT-PRIVATE-KEY'</span>],
    },
    <span class="hljs-selector-tag">polygon</span>: {
      <span class="hljs-attribute">url</span>: <span class="hljs-string">'YOUR_ALCHEMY_POLYGON-MAINNET-API_URL-COPY_IT-FROM-DASHBOARD'</span>,
      accounts: [<span class="hljs-string">'YOUR-ACCOUNT-PRIVATE-KEY'</span>],
    },
  },
</code></pre></blockquote>
<p>I hope this was helpful and all the best for your journey in web3.</p>
<p>Let me know how this went on Twitter @<a target="_blank" href="https://twitter.com/0xViking">0xViking</a>. My DMs are open feel free to text me :)</p>
<p>WAGMI🚀</p>
]]></content:encoded></item><item><title><![CDATA[Ultimate roadmap for web3 developers "from zero to master"]]></title><description><![CDATA[According to CBInsights State Of Blockchain 2021 Report, Blockchain and crypto startups had a breakthrough year. Funding grew 713% year-over-year as investors poured money into crypto and NFT startups.

I believe this is the time to jump into this em...]]></description><link>https://blog.praneethreddy.me/ultimate-roadmap-for-web3-developers-from-zero-to-master</link><guid isPermaLink="true">https://blog.praneethreddy.me/ultimate-roadmap-for-web3-developers-from-zero-to-master</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[Solidity]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[0xViking]]></dc:creator><pubDate>Thu, 24 Feb 2022 13:08:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1645707592120/mAB8lCQCU.gif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>According to <a target="_blank" href="https://www.cbinsights.com/research/report/blockchain-trends-2021/">CBInsights</a> <strong>State Of Blockchain 2021</strong> Report, Blockchain and crypto startups had a breakthrough year. Funding grew <strong>713% year-over-year</strong> as investors poured money into crypto and NFT startups.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645696161448/ZMvneRt7d.png" alt="0.1.png" /></p>
<p>I believe this is the time to jump into this emerging field and grab the only <strong><em>" once in a lifetime"</em></strong> opportunity. </p>
<p>Below I have written a crowdsourced roadmap(step-by-step) I am going to follow to become a blockchain master. I chose Ethereum blockchain to start with and I have mentioned the reason below for that. You can choose whatever blockchain you want but I believe after looking at the stats below you feel the same as me. </p>
<p>According to <a target="_blank" href="https://www.stateofthedapps.com/stats">State of the Dapps</a> till January 2022 there are a total of 3,957 Dapps.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645696342682/TmD_YhojG.png" alt="0.png" /></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645696606672/pa6no7mPL.png" alt="1.png" /></p>
<p>Out of those 3,957 dapps the majority of the share was dominated by Ethereum with 2,929 dapps which is ~74% of the total dapps available. So I believe to start with Ethereum since there would be many opportunities, later you can go for other blockchains depending on your interest.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1645696856998/qR3yVOycZ.png" alt="2.png" /></p>
<h1 id="heading-building-vs-breaking">🏗🔨 Building vs Breaking</h1>
<p>I personally believe that you are a master in any field only if you have knowledge of how to break a system and find vulnerabilities in it.</p>
<p>So in my roadmap, I am going to make sure you know how to break a system, But without knowing how an application/protocol/framework is built or structured, we cannot proceed further to find any vulnerabilities in it, however, If you do manage to find actual vulnerabilities in a smart contract or any blockchain protocol, without having any prior knowledge of how it is built and structured; You were just throwing arrows in the dark, and got lucky.</p>
<p>To a great extent, your ability to break into an application is directly proportional to your understanding of how that application is built and structured</p>
<h1 id="heading-the-ultimate-roadmap">🛣The Ultimate Roadmap</h1>
<p>I have crowdsourced the majority of the roadmap from multiple GOATs and legends in this field, it is organized in a way to cover all rudimentary topics that one needs to know in order to master in this field.</p>
<p><strong>Note:</strong> I will be following this roadmap and will be updating as required in the process and will be posting links to my threads on each of the topics I learn and resources at the end of the thread which will help you to get along which would be like a TLDR; of each concept. Also will write an estimated time to complete that concept</p>
<p>All of the resources I would be posting later with the links will be <strong>100% free</strong> openly available to everyone.</p>
<blockquote>
<p>Note to mention: All the threads, text, images, videos are crowdsourced I am not the creator of any of them, I just try to find good resources already available over the internet and write a summary(TLDR;) on that topic. All the rights lie with the original creators/publishers.</p>
</blockquote>
<h3 id="heading-basicsunderstanding-of-below-concepts-is-enough-to-go-to-next-step">Basics(🤔Understanding of below concepts is enough to go to next step)</h3>
<ul>
<li><a target="_blank" href="https://twitter.com/0xViking/status/1497173579527426053">Linux &amp; Bash commands</a> (10 minutes)</li>
<li><a target="_blank" href="https://twitter.com/0xViking/status/1497600068727099392">Networking concepts</a> (8-10 minutes)</li>
<li><a target="_blank" href="https://twitter.com/0xViking/status/1497896692821082112">How a Web Browser works</a> (10-15 minutes)<blockquote>
<p><a target="_blank" href="https://github.com/alex/what-happens-when/">Also check this for more technical explanation</a></p>
</blockquote>
</li>
<li>DNS 👆</li>
<li>HTTP Protocol 👆 </li>
<li>HTTP Request and Response 👆 <blockquote>
<p>👆 meaning same resource as <a target="_blank" href="https://twitter.com/0xViking/status/1497896692821082112">above</a></p>
</blockquote>
</li>
<li><a target="_blank" href="https://www.cloudflare.com/en-in/learning/cdn/what-is-caching/">HTTP Caching</a> (5 minutes)</li>
<li><a target="_blank" href="https://www.guru99.com/remote-procedure-call-rpc.html">RPC Protocol</a> (5 minutes)</li>
<li><a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools">Browser’s developer tools</a> (10 minutes)<blockquote>
<p><a target="_blank" href="https://github.com/jaredwilli/devtools-cheatsheet">Amazing chrome dev tools cheat sheet</a></p>
</blockquote>
</li>
<li><a target="_blank" href="https://twitter.com/0xViking/status/1498654687255412739">JavaScript</a>(atleast Couple of days)</li>
<li><a target="_blank" href="https://ethereum.org/en/developers/docs/ides/">IDE's</a></li>
<li><a target="_blank" href="https://medium.com/pixel-pioneers/the-basics-of-version-control-system-git-explained-by-designing-a-new-car-3fb3a10e9e40">Version control systems such as Git</a></li>
<li><a target="_blank" href="https://youtu.be/TlB_eWDSMt4">node.js</a></li>
<li><a target="_blank" href="https://youtu.be/NjGG9AbTvXE">Package Managers (Like npm, yarn)</a></li>
<li><a target="_blank" href="https://twitter.com/0xZKP/status/1500841703863111683">Object-Oriented programming - check out resource at the end of this thread</a></li>
<li><a target="_blank" href="https://ehmatthes.github.io/pcc/index.html">Python</a></li>
</ul>
<h3 id="heading-essential-blockchain-basics-mandatory">Essential Blockchain Basics (✔️Mandatory)</h3>
<ul>
<li><a target="_blank" href="https://youtu.be/Cqk7PN8f8gM">Distributed Ledger</a></li>
<li><a target="_blank" href="https://medium.com/coinmonks/bitcoin-white-paper-explained-part-1-4-16cba783146a">Bitcoin Whitepaper - This is an explanation resource, please feel free to check out the original paper lined in the blog</a></li>
<li><a target="_blank" href="https://www.techtarget.com/searchsecurity/definition/asymmetric-cryptography">Asymmetric Cryptography</a></li>
<li><a target="_blank" href="https://medium.com/coinmonks/learn-how-to-code-elliptic-curve-cryptography-a952dfdc20ab">Elliptic Curve Cryptography</a></li>
<li><a target="_blank" href="https://www.sofi.com/learn/content/double-spending/">Double Spending problem</a></li>
<li><a target="_blank" href="https://academy.binance.com/en/glossary/51-percent-attack">51% Attack</a></li>
<li>Other basic terms used like web2, web3, blockchain, decentralized, distributed, Defi, NFT, etc., (<a target="_blank" href="https://github.com/0xViking/21DaysOfLearnandShare#readme">Can be found here</a>)</li>
</ul>
<h3 id="heading-basics-of-ethereum-mandatory">Basics of Ethereum (✔️Mandatory)</h3>
<ul>
<li>What is Ethereum</li>
<li>Why Ethereum is termed as World Computer</li>
<li>Why is it different from previous blockchains</li>
<li>Ethereum Protocol and how it started</li>
<li>Ether Currency</li>
<li>Transactions in Ethereum ecosystem using wallets like metamask etc.,</li>
<li>Types of accounts (EOAs vs contract accounts)</li>
<li>Ethereum Clients, Nodes, and Wallets</li>
<li>Public Key vs Private Key</li>
<li>Mining</li>
<li>Gas</li>
<li>Different types of networks in Ethereum (Mainnet, Testnet, etc)</li>
<li>Block Explorer</li>
<li>EIPs and ERC standards</li>
<li>Most used ERC20, ERC721, and ERC1155</li>
<li>Turing Completeness</li>
<li>Ethereum Virtual Machine</li>
<li>Smart Contracts</li>
<li>Ethereum High-Level Languages (Solidity, Vyper, LLL, Serpent)</li>
</ul>
<h3 id="heading-solidity-mandatory">Solidity (✔️Mandatory)</h3>
<ul>
<li>What is Solidity</li>
<li>The famous Remix IDE</li>
<li>Data types in Solidity</li>
<li>Predefined global variables and functions</li>
<li>Error handling in Solidity</li>
<li>Contract ABI</li>
<li>Lifecycle of a Smart Contract</li>
<li>Compiling, Testing &amp; Deploying of Smart Contracts</li>
<li>Interacting with deployed Smart Contracts</li>
<li>Interaction using an external library(web3.js,ethers.js)</li>
<li>JSON RPC</li>
</ul>
<h3 id="heading-frameworks-for-ethereum-development-for-ease-of-development">Frameworks for Ethereum Development (🤔For ease of development)</h3>
<ul>
<li>Truffle Suit (Truffle, Ganache, Mocha, Drizzle)</li>
<li>Brownie</li>
<li>Infura</li>
<li>Hardhat</li>
<li>Openzeppelin</li>
<li>Dapptools</li>
</ul>
<h3 id="heading-frontend-andgt-mandatory">Frontend (! -&gt; ✔️Mandatory)</h3>
<ul>
<li>HTML, CSS !</li>
<li>Javascript !</li>
<li>React !</li>
<li>Vue.js</li>
<li>next.js</li>
<li>tailwind.css </li>
</ul>
<h3 id="heading-professional-level-mandatory-to-know-if-you-wish-to-continue-to-work-in-this-field">Professional level (✔️Mandatory to know if you wish to continue to work in this field)</h3>
<ul>
<li>Distributed Storage Systems (IPFS, SWARM, storej)</li>
<li>ENS</li>
<li>Defi</li>
<li>NFT</li>
<li>Chain, Side Chain</li>
<li>Polygon, Solana, BSC(Now called BNB chain)</li>
<li>L1/L2 Solutions</li>
<li>Plasma</li>
<li>State Channels</li>
<li>Rollups - ZKRollup, Optimistic Rollup</li>
<li>DEX</li>
<li>MEV</li>
<li>Lending</li>
<li>Farming</li>
<li>Stable Coins</li>
<li>DAOs</li>
</ul>
<h3 id="heading-future-of-ethereum">Future of Ethereum</h3>
<ul>
<li>ETH2.0(🤔NOW called Consensus Layer)</li>
</ul>
<h3 id="heading-further-useful-resources">📻 Further useful resources</h3>
<ul>
<li><a target="_blank" href="https://github.com/ethereumbook/ethereumbook">Mastering Ethereum Book</a></li>
<li><a target="_blank" href="https://www.youtube.com/channel/UCJWh7F3AFyQ_x01VKzr9eyA/videos">Smart Contract Programmer</a></li>
<li><a target="_blank" href="https://www.weekinethereumnews.com/">Week in Ethereum News</a></li>
<li><a target="_blank" href="https://thedailygwei.substack.com/">The Daily Gwei</a> to stay updated </li>
</ul>
<p><strong>NOTE:</strong> Next steps are required only if you want to master, I suggest you go through them even if you are not into security/auditing because having knowledge of vulnerabilities will help you code better.</p>
<p>To become a smart contract auditor or security specialist in the blockchain you have to complete the whole roadmap including the below and should complete at least one CTF mentioned below</p>
<h3 id="heading-smart-contract-securityfirst-point-is-very-needed-to-master-rest-are-to-help-you-in-the-process">🔐 Smart Contract Security(✔️First point is very needed to master, rest are to help you in the process)</h3>
<ol>
<li><p>Most common Vulnerabilities in Smart contracts:- 
What is Reentrancy, What is Junk code (Code With No Effects), What is Unencrypted Private Data On-Chain, What is Integer Overflow and Underflow, What is Floating Pragma, What is Unchecked Call Return Value, What is Unprotected SELFDESTRUCT Instruction, State Variable Default Visibility, What is Uninitialized Storage Pointer, Use of Deprecated Solidity Functions, DoS with Failed Call, Authorization through tx.origin, Signature Malleability, Weak Sources of Randomness from Chain Attributes, Lack of Proper Signature Verification, Missing Protection against Signature Replay Attacks, Insufficient Gas Griefing, DoS With Block Gas Limit, Hash Collisions With Multiple Variable Length Arguments, Message call with a hardcoded gas amount, Oracle Manipulation.</p>
</li>
<li><p>Visualization Tools (Solidity Visual Developer, EVM Lab, Surya, Solgraph, Piet, Ethereum-graph-debugger )</p>
</li>
<li>Linters and formatters (Ethlint, Prettier + Solidity Plugin, Solhint)</li>
<li>Static and Dynamic Analysis (Oyente, Octopus, Vertigo, MythX, Mythril, Slither, Echidna)</li>
</ol>
<h3 id="heading-ctfs-to-look-atmandatory">CTF's to Look at(✔️Mandatory)</h3>
<ul>
<li><a target="_blank" href="https://ethernaut.openzeppelin.com/">Openzeppelin’s Ethernaut</a></li>
<li><a target="_blank" href="https://www.damnvulnerabledefi.xyz/">Damn Vulnerable DeFi</a></li>
<li><a target="_blank" href="https://capturetheether.com/">Capture the Ether</a></li>
<li><a target="_blank" href="https://ctf.paradigm.xyz/">Paradigm CTF</a></li>
<li>Smart Contract CTF</li>
</ul>
<h3 id="heading-bug-bounty-platformscommunity">💵Bug bounty platforms(🤔community)</h3>
<ul>
<li><a target="_blank" href="https://immunefi.com/">Immunefi</a></li>
<li><a target="_blank" href="https://www.hackerone.com/">HackerOne</a></li>
<li><a target="_blank" href="https://code4rena.com/">code4rena</a></li>
</ul>
<h3 id="heading-security-related-resources-to-stay-up-to-date">📻Security related resources to stay up to date</h3>
<ul>
<li><a target="_blank" href="https://rekt.news/">Rekt News</a></li>
<li><a target="_blank" href="https://blockthreat.substack.com/">Blockchain Threat Intelligence</a> Newsletter</li>
<li>GOAT <a target="_blank" href="https://samczsun.com/">samczsun blog</a></li>
<li><a target="_blank" href="https://docs.google.com/spreadsheets/d/1ZEEAmXjpN8kL9BvITg9GKu-dbeUra6c14YLpLkCp5Zo/edit#gid=1545239187">Bad Things - Crypto Security</a></li>
</ul>
<h1 id="heading-that-was-it-from-my-side-i-hope-and-wish-you-all-the-best-for-your-success-this-is-also-part-of-my-round-2-21daysoflearnandshare-challengehttps0xvikinghashnodedev21-days-of-learn-and-share-21dols-if-you-wish-to-join-the-challenge-and-learn-along-with-me-just-connect-and-ping-me-on-twitter-0xvikinghttpstwittercom0xviking">That was it from my side, I hope and wish you all the best for your success, This is also part of my Round 2 #21DaysOfLearnandShare <a target="_blank" href="https://0xviking.hashnode.dev/21-days-of-learn-and-share-21dols">Challenge</a>. If you wish to join the challenge and learn along with me just connect and ping me on Twitter @<a target="_blank" href="https://twitter.com/0xViking">0xViking</a></h1>
<p>I would like to take the opportunity to thank a few people from whom I inspired and compiled this roadmap and resources.</p>
<ul>
<li>@<a target="_blank" href="https://twitter.com/officer_cia">officer_cia</a></li>
<li>@<a target="_blank" href="https://twitter.com/0xAsm0d3us">Asm0d3us</a></li>
<li>@<a target="_blank" href="https://twitter.com/tinchoabbate">tinchoabbate</a></li>
<li>few more, will add in near future</li>
</ul>
<h1 id="heading-liked-my-work-would-like-to-support-me">❤️‍🔥 Liked my work? would like to support me?</h1>
<p>If you think my work has added some value to your existing knowledge, then you can follow me on Twitter @<a target="_blank" href="https://twitter.com/0xViking">0xViking</a> and share this article with others whom you think would be a valuable asset for them</p>
]]></content:encoded></item><item><title><![CDATA[21 Days Of Learn and Share #21DOLS]]></title><description><![CDATA[Welcome!
What is this 21DaysOfLearnandShare and why I think this will help everyone to make anything new as a habit.
I am 0xViking, a budding developer in web3 and want to learn a lot of things but majority of time I didn't complete learning that new...]]></description><link>https://blog.praneethreddy.me/21-days-of-learn-and-share-21dols</link><guid isPermaLink="true">https://blog.praneethreddy.me/21-days-of-learn-and-share-21dols</guid><category><![CDATA[learning]]></category><category><![CDATA[habits]]></category><category><![CDATA[Developer]]></category><dc:creator><![CDATA[0xViking]]></dc:creator><pubDate>Sun, 16 Jan 2022 13:34:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1642336547484/cyD9o4MyQ.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Welcome!</p>
<p>What is this 21DaysOfLearnandShare and why I think this will help everyone to make anything new as a habit.</p>
<p>I am <a target="_blank" href="https://twitter.com/0xViking">0xViking</a>, a budding developer in web3 and want to learn a lot of things but majority of time I didn't complete learning that new technology which I started. </p>
<p>So this is what I feel the best way(#21DOLS) to make a new habit which came out after some thought process after referencing <a target="_blank" href="https://www.100daysofcode.com/">100DaysOfCode</a> . </p>
<p>How it works:
Pick what ever topic you are planning to learn but never started till now or started but left after few days. <a target="_blank" href="https://twitter.com/intent/tweet?text=I%27m%20committing%20myself%20publicly%20to%20the%2021DayOfLearnandShare%20Challenge%20starting%20today!%20Learn%20and%20Share.%20Join%20me!%20@0xViking&amp;hashtags=21DaysOfLearnandShare">Commit yourself to the challenge</a> #21DaysOfLearnandShare #21DOLS on twitter. Later everyday share on twitter what you have learned and the resources that helped you with the hashtags explained later in the article.</p>
<p>Rules:</p>
<ul>
<li><p><a target="_blank" href="https://twitter.com/intent/tweet?text=I%27m%20committing%20myself%20publicly%20to%20the%2021DayOfLearnandShare%20Challenge%20starting%20today!%20Learn%20and%20Share.%20Join%20me!%20@0xViking&amp;hashtags=21DaysOfLearnandShare">Tweet</a> to commit to the challenge!</p>
</li>
<li><p>Plan: Formulate what you want to work on during the challenge. It might be - coding, new technology, design, sports. Don’t spend too much time planning, but having a plan like this will help you on your path.
From today on, for the next 21 days, tweet your progress every day using the #21DaysOfLearnandShare #21DOLS hashtag</p>
</li>
<li><p>Work <em>at least <strong>90 minutes per day</strong></em> with a <strong>20 minute learn</strong> and <strong>10 min documenting resources for sharing </strong></p>
</li>
<li><p>Other than me tag someone else who is willing to learn something new or can support you along with in the journey. He/She can also ask you about the progress to make sure you are accountable for something you started.</p>
</li>
</ul>
<p>So what is the 90 Days thing then?
Above challenge is something that helps you make a new habit.
Just learning something for 21 days will not make you an expert in it. Then how do you become an expert in something?, Ok to be honest being an expert level with in quite few days won't happen but rest assured you will be in top 1 percentile in the topic you have chosen. Do the #21DOLS in rounds like Round 1 of 21 days, Round 2 of 21 days etc., for at least of 4 rounds. Which makes a total of 84 days, adding the breaks of 1-2 days after each round makes a total of 90 days. This process will help you master any topic and make it as lifestyle.</p>
<p>Official Hashtags you can use for the Challenges:</p>
<p>#21DaysOfLearnandShare</p>
<p>#21DOLS</p>
<p>#R1D1 , #R1D2 ...... #R1D21 -- Round1Day15, Round3Day6 etc.,</p>
<p>#21DOLSweb3 -- Topic you choose</p>
<p>Benefits:</p>
<ul>
<li>You can be accountable to complete the challenge</li>
<li>Not only learn, you help others to learn by sharing</li>
<li>You can check the resources shared by other which might be useful to you on the topic you choose</li>
</ul>
<p>Have you implemented the process and succeeded?
"To be honest, No, I didn't and here I am <a target="_blank" href="https://twitter.com/0xViking/status/1482704704727658496?s=20">committing</a> to this challenge in the topic "WEB3" and tagging <a target="_blank" href="https://twitter.com/thatguyintech">thatguyintech</a> to join on my journey"</p>
<p>Credits to #100DaysOfCode - <a target="_blank" href="https://www.100daysofcode.com/">website</a> <a target="_blank" href="https://twitter.com/ka11away">@ka11awaay</a> for starting this revolution.</p>
<p><strong> This is my first blog, Sorry if there are any mistakes and help me correct if you find any. Thanks for joining me. Hope this helps me and everyone who joins along</strong></p>
]]></content:encoded></item></channel></rss>