<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Robert Reinhart on Medium]]></title>
        <description><![CDATA[Stories by Robert Reinhart on Medium]]></description>
        <link>https://medium.com/@robertreinhart24?source=rss-3b8590260f37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Y1utMCT_OiiLycrJ6IgSrw.jpeg</url>
            <title>Stories by Robert Reinhart on Medium</title>
            <link>https://medium.com/@robertreinhart24?source=rss-3b8590260f37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 13:50:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@robertreinhart24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Smart Contract Verification, Simplified]]></title>
            <link>https://medium.com/@robertreinhart24/smart-contract-verification-simplified-ff441110f88a?source=rss-3b8590260f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff441110f88a</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[etherscan]]></category>
            <category><![CDATA[verification]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[polygon]]></category>
            <dc:creator><![CDATA[Robert Reinhart]]></dc:creator>
            <pubDate>Mon, 14 Feb 2022 17:09:53 GMT</pubDate>
            <atom:updated>2022-03-04T03:16:49.557Z</atom:updated>
            <content:encoded><![CDATA[<p>If you‘re building a dApp and expecting others to interact with it, verifying is a must. Unless you completely trust the source, do not interact with an unverified contract.</p><p>Hold up, what is smart contract verification?</p><p>Smart contract verification is the process of corroborating your contract source code with the deployed, compiled code. This provides transparency for contract users as they will know exactly how to interact with your contract. It also allows users to see vulnerabilities in the contract and spot malicious code. Once verified, users will be able to see the entire contract that you created and can interact with it through sites such as Etherscan and Polygonscan. These sites also allow you to verify your contracts. However, they don’t work as well when trying to verify a contract with multiple imports from outside contracts (i.e. OpenZeppelin contracts). The reason for this article is to share a better, easier method of verification that will handle these more complex contracts.</p><p>As mentioned, you can verify a contract right on <a href="https://etherscan.io/">Etherscan</a> or <a href="https://polygonscan.com/">Polygonscan</a>. However, you will run into many issues when trying to verify contracts with layers of imported contracts. Even a simple NFT contract that inherits OpenZeppelin contracts will not verify easily on these sites. The reason is that you would need to supply all of the code for each imported contract which is tedious and unnecessary. It can also lead to errors and frustration.</p><p>So how can you verify with ease? Through the command line. Hardhat has developed a package that allows for simple contract verification.</p><p>You will need to install Hardhat to use it which can be done here: <a href="https://hardhat.org/tutorial/creating-a-new-hardhat-project.html">https://hardhat.org/tutorial/creating-a-new-hardhat-project.html</a></p><p>You will also need an API key. If you are verifying an Ethereum contract use an Etherscan API key and for a Polygon contract you would use a Polygonscan API key.</p><h4>Here’s How it works:</h4><p>First, you want to install npm package.</p><ul><li>npm install — save-dev @nomiclabs/hardhat-etherscan</li></ul><p>Next, open the hardhat config file and edit as seen below (inputing your API key).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*8K53OXcoHMLkAOwwf88-yQ.png" /><figcaption>Verify on Ethereum</figcaption></figure><p>For Polygon projects, add a polygon object inside the “etherscan” object that contains the API key for Polygonscan (as shown here).</p><figure><img alt="Verify on Polygonscan" src="https://cdn-images-1.medium.com/max/1024/1*nOoUG8ZhHQfvmU9-vPX6KQ.png" /><figcaption>Verify on Polygonscan</figcaption></figure><p>Lastly, input the following into the command line:</p><ul><li><strong><em>npx hardhat verify - network mainnet DEPLOYED_CONTRACT_ADDRESS “Constructor argument 1”</em></strong></li></ul><p>DEPLOYED_CONTRACT_ADDRESS = Address you are verifying against</p><p>If no constructors, leave the constructor argument blank.</p><p>This method will allow you to verify on a variety of other blockchains as well (i.e. Binance Smart Chain, Avalanche, etc.).</p><p>For more information, go here:</p><p><a href="https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html">Ethereum development environment for professionals by Nomic Foundation</a></p><p>Hope you found this helpful! Happy developing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff441110f88a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ethereum’s Future: What does it mean for other blockchains?]]></title>
            <link>https://medium.com/@robertreinhart24/ethereums-future-what-does-it-mean-for-other-blockchains-35adfd5c48bf?source=rss-3b8590260f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/35adfd5c48bf</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[ethereum-blockchain]]></category>
            <category><![CDATA[polygon]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Robert Reinhart]]></dc:creator>
            <pubDate>Mon, 10 Jan 2022 19:40:34 GMT</pubDate>
            <atom:updated>2022-01-10T19:54:27.375Z</atom:updated>
            <content:encoded><![CDATA[<p>Well, I can’t start an article about Ethereum’s future without discussing its past first.</p><p>The Ethereum we all know now is not the Ethereum originally launched in July of 2015. The Ethereum Virtual Machine (EVM) that is currently referred to as “Ethereum”, is actually a fork of the original blockchain. The original blockchain is now referred to as Ethereum Classic. The reason for the fork was to due to a hack in which $50 million in Ether was stolen. This fix erased the theft history from the blockchain. Since then, Ethereum has continued to grow in popularity while Classic has been left to slowly wither away. It will have no value moving forward and should be trading at way less than it is (currently ~$28).</p><p>Ethereum is a blockchain that varies greatly from Bitcoin. The EVM allows anyone to deploy “smart contracts” to the blockchain. These contracts are essentially programs that run on a decentralized network. The use cases for Ethereum contracts are almost endless. The most popular uses come in the form of tokens whether fungible, or non fungible. Non-fungible tokens (NFTs) have really brought Ethereum into the spotlight. The use cases for NFTs alone, are extensive, and go way beyond just digital art. This all sounds great, but with greater adoption came greater problems.</p><p>Ethereum is being used so frequently that the network is congested and gas prices have sky-rocketed. [Aside: Gas is the amount of work needed to complete a transaction. Gas price is dictated by Ethereum miners. Total gas paid is the gas price multiplied by the total gas used]. These gas prices have risen to the point where most people cannot afford to make transactions. Furthermore, when a transaction is made, it’s very slow. This makes Ethereum impractical for mass use and adoption. This is why many have taken it upon themselves to build more efficient, environmentally friendly, and cheaper alternatives. Other popular alternatives are Layer 2 options like Polygon which are blockchains that connect to the Ethereum blockchain, but allow for lower gas fees and faster transactions. That being said, many of these options sacrifice centralization and security to do so.</p><p>It was only a matter of time before it was realized that Ethereum would not survive without a big change. That change was to move from a Proof-of-Work (PoW) mining consensus to Proof-of-Stake (PoS). This would greatly speed up transactions and lower gas fees. The question quickly changed from “if” to “when”. Ethereum 2, as it‘s being called, was originally slated for release in 2019, but has yet to happen. Some are wondering if it ever will while others are holding onto hope that the new proposed date in 2022 (2nd quarter) will come to fruition.</p><p>So if this does happen, what happens to the other blockchains and Layer 2 solutions?</p><p><strong>My thoughts:</strong></p><p>It will happen this year. Ethereum’s conversion to PoS won’t solve everything, but Ethereum will grow like never before. Ethereum’s prices will at least double and use of the blockchain will soar. Layer 2 options will rise as there will always be a need for them. They will likely continue to have faster speeds and lower gas fees. Ultimately, they should take a similar trajectory to Ethereum. Other blockchain use will slow down but the tokens will still get a bump. Ultimately though, the rise of Ethereum is the rise of web3. Many of these blockchains will live on and continue to have utility in the future. The utility may be more specific than Ethereum’s, but they will be used.</p><p>To conclude, with this upgrade, Ethereum will cement its place as the leader in the world of web3. Additionally, I believe we will start to see a quicker adoption of web3 and Ethereum will soar over other cryptocurrency blockchains like Bitcoin causing a shift in trading volume.</p><p><strong>Price predictions end of 2022:</strong><br>Ethereum: $9,233</p><p>Polygon: $4.33</p><p>Solana: $380</p><p>Bitcoin: $82,000</p><p>Full disclosure: I own a variety of cryptocurrency including the ones mentioned here. Most of it is used for building dApps however, and interacting with the blockchain.</p><p>Hope you liked this article!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35adfd5c48bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CORS Error Solved — Deploy a Proxy on Vercel]]></title>
            <link>https://medium.com/@robertreinhart24/cors-error-solved-a5501b85262?source=rss-3b8590260f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5501b85262</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Robert Reinhart]]></dc:creator>
            <pubDate>Sun, 09 Jan 2022 14:29:10 GMT</pubDate>
            <atom:updated>2022-03-12T23:10:12.873Z</atom:updated>
            <content:encoded><![CDATA[<p>It was not that long ago when I was hit with my first CORS (Cross-Origin Resource Sharing) error. I sat there befuddled. I instantly searched for solutions, but slowly learned that there was not much I could do. I was building a new website at the time and needed this piece to make it work. What I really needed was access to fetch NFT (non-fungible token) data using token URIs. One easy-sounding option I found was to download an extension that bypasses this error. That’s exactly what I did. It worked. We’ll, sort of. The problem with a local solution like this is that it will work for you, but not for anyone else using your site. Everyone using your site would have to download this extension for it to work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*h_unJeOX5v8apDtKFl6e1w.jpeg" /><figcaption>Example CORS Error</figcaption></figure><p>Initially, my frustration led me to strongly dislike CORS. That’s until I realized the benefits. CORS essentially allows a server to specify which urls it wants to accept requests from. It’s a layer of security that protects a website and its users from bad actors. I’m not going to get into the details here, but if you would like to read more about CORS, there are many great resources out there. Just type “CORS” into your search engine and a bunch will come up.</p><p>The intention of this article is to share the fix that I developed that bypasses the CORS issue. A solution that works locally and in production. I say bypass, but it’s a proxy that accepts requests from any origin.</p><p>Here is a link to the repository I created for this proxy:</p><blockquote><a href="https://github.com/robertreinhart/cors-proxy-share">https://github.com/robertreinhart/cors-proxy-share</a></blockquote><p>To use it, start by cloning the repository. Next, run “npm install” in the command line. Then, deploy at <a href="https://www.vercel.com/">vercel.com</a>. Once deployed, you are ready to use. To run requests through your newly launched proxy, send fetch requests to the domain provided by Vercel (to use the body object you need to set the method to POST). Finally, include the a property in the body object named ‘my-url’ with the domain you are trying to reach and you are all set. You should have no more CORS errors.</p><p>Example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2fLqH8J1HEVpnCH3ZAkrw.png" /><figcaption>Example Request</figcaption></figure><p>I’ve also set this same proxy up on RapidAPI which you can test out before running through the steps. Access to that can be found here <a href="https://rapidapi.com/robertreinhart/api/cors-proxy3">https://rapidapi.com/robertreinhart/api/cors-proxy3</a>. Feel free to just use this one if it’s easier for you. You can send up to 100 requests a day on it. Since it’s on rapidAPI, you’ll need to include the appropriate headers on your requests.</p><p>Post comments below if you’re having any issues. Hope this helps solve your CORS problems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5501b85262" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploying to Polygon, Simplified]]></title>
            <link>https://medium.com/@robertreinhart24/deploying-to-polygon-simplified-a3e45e9c1531?source=rss-3b8590260f37------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3e45e9c1531</guid>
            <category><![CDATA[matic]]></category>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[deploy]]></category>
            <category><![CDATA[polygon]]></category>
            <dc:creator><![CDATA[Robert Reinhart]]></dc:creator>
            <pubDate>Fri, 12 Nov 2021 01:26:22 GMT</pubDate>
            <atom:updated>2021-11-12T01:40:06.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Did you create your first Solidity contract only to find out that deploying it will cost you hundreds of dollars in gas? Well, there’s another option and you’re not far from it. That option is deploying to another blockchain with low fees. One of those blockchains is Polygon.</p><p>There are many resources that provide details on the Polygon blockchain. However, this article will focus specifically on taking your Ethereum ready app and deploying it to the Polygon Mainnet.</p><p>The example in this article assumes that you are using ethers.js and Hardhat.</p><h4><strong>Deployment Configuration</strong></h4><p>Start first by editing your hardhat.config.js file.</p><p>Pop over to your Ethereum API. I used Alchemy but Infura works too. Open Alchemy and create a new app. In that app select Polygon Mainnet (Mumbai, if using testnet). Once created, click “view key” and copy the http url. Paste that url into the config file in place of “ALCHEMYURL”. Finally, copy your private key from your provider (i.e. Metamask) and paste in place of “PRIVATEKEY”. Accounts takes an array so remember to put your private key in an array. <strong>Caution: Do not commit your config file unless you’ve used environment variables as shown below.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*kv461w6LrXajgTEfLEP4EQ@2x.jpeg" /><figcaption>Hardhat.config.js file</figcaption></figure><p>Congrats, you’re ready to deploy. Wait! We need MATIC!</p><h4><strong>MATIC Supply</strong></h4><p>In order to get MATIC on the Polygon blockchain you need to bridge it from Ethereum. This can be done here: <a href="https://wallet.polygon.technology/">https://wallet.polygon.technology</a>. The problem with this is that you still need to pay gas fees to do it. We’re trying to avoid high gas fees!</p><p>Lucky for us, Polygon has a faucet that will send you enough MATIC to launch a simple contract. Before you start thinking, “free MATIC, I’m going to be rich”, know that it’s a small amount of MATIC and there’s a limit they’ll give each address. Regardless, it’s a big help and can be accessed here: <a href="https://matic.supply/">https://matic.supply</a>. Collect as much MATIC as you can for deployment. If using Mumbai (testnet), go to <a href="https://faucet.polygon.technology/">https://faucet.polygon.technology</a> to get test MATIC.</p><p>Now, you’re ready. Make sure your deploy script logs the contract address in the terminal. Use the command below to deploy.</p><figure><img alt="Command to deploy on Hardhat" src="https://cdn-images-1.medium.com/max/600/1*KXkh43Pq0rXwlsq-C1jYww@2x.jpeg" /><figcaption>Command to deploy on Hardhat</figcaption></figure><p>Success! Once deployed, copy the address and enter it at <a href="https://polygonscan.com/">https://polygonscan.com</a> to see contract. For Mumbai, use <a href="https://mumbai.polygonscan.com/">https://mumbai.polygonscan.com</a>.</p><h4>Contract Instance</h4><p>Here’s some great news, not much is needed to get your app to start working with your new contract. Ethers.js works with Polygon. The pieces you’ll need to change are the abi and contract address to create an instance of the contract.</p><h4>Networks</h4><p>Finally, you’ll need your provider to connect to your site. To do this you will have to set up a new RPC network in Metamask as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*2CT6D2vXsWuQRy2XVZTe8A@2x.jpeg" /><figcaption>Metamask — Add RPC Network</figcaption></figure><p>For RPC information on Mumbai and other networks, there is a great resource here: <a href="https://community.metamask.io/t/how-to-add-custom-networks-to-metamask-like-binance-and-polygon-matic/3634">https://community.metamask.io/t/how-to-add-custom-networks-to-metamask-like-binance-and-polygon-matic/3634</a></p><p>Hope you found this article helpful! Happy developing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3e45e9c1531" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>