<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Patrick Collins</title>
    <description>The latest articles on Forem by Patrick Collins (@patrickalphac).</description>
    <link>https://forem.com/patrickalphac</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F458272%2F3ef1e2bf-08f8-4f70-8bc0-de1d385707b0.png</url>
      <title>Forem: Patrick Collins</title>
      <link>https://forem.com/patrickalphac</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/patrickalphac"/>
    <language>en</language>
    <item>
      <title>Top 10 Smart Contract &amp; Solidity Developer Learning Resources</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Mon, 08 Nov 2021 01:04:39 +0000</pubDate>
      <link>https://forem.com/patrickalphac/top-10-smart-contract-solidity-developer-learning-resources-46db</link>
      <guid>https://forem.com/patrickalphac/top-10-smart-contract-solidity-developer-learning-resources-46db</guid>
      <description>&lt;p&gt;Learning to &lt;a href="https://betterprogramming.pub/how-to-become-a-blockchain-engineer-fa4386a0504f" rel="noopener noreferrer"&gt;become a Smart Contract and Blockchain Developer&lt;/a&gt; can seem like a daunting task, but it doesn't have to be!&lt;/p&gt;

&lt;p&gt;Just set aside some time each week, and get cracking on any of the tutorials and pieces of content below. Don't be afraid to ask a ton of questions, and don't feel imposter syndrome! Just by reading this article, you are already a welcomed member of the blockchain community. &lt;/p&gt;

&lt;p&gt;If anytime you get stuck, feel free to refer to &lt;a href="https://docs.chain.link/docs/getting-help/" rel="noopener noreferrer"&gt;this document&lt;/a&gt; on how to get unstuck in the blockchain space. It applies to everything in open source!&lt;/p&gt;

&lt;p&gt;In any case, let's go ahead and get started!&lt;/p&gt;

&lt;p&gt;Additionally, I have a video on &lt;a href="https://www.youtube.com/watch?v=e1N4aWIJMN0" rel="noopener noreferrer"&gt;how to become a blockchain engineer&lt;/a&gt; you can check out for more information!&lt;/p&gt;

&lt;h3&gt;
  
  
  Helpful Tools
&lt;/h3&gt;

&lt;p&gt;But BEFORE I give you the list, you need to know about these 3 resources.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://chat.openai.com/chat" rel="noopener noreferrer"&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethereum.stackexchange.com/" rel="noopener noreferrer"&gt;Ethereum Stack Exchange&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://peeranha.io/" rel="noopener noreferrer"&gt;Peeranha.io&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These are helpful Q&amp;amp;A sites that you can ask questions to, and will make your life much better when going through these resources. Anyways, here are the top 10!&lt;/p&gt;

&lt;h1&gt;
  
  
  Top 10 Smart Contract &amp;amp; Solidity Developer Learning Resources
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. &lt;a href="https://updraft.cyfrin.io/" rel="noopener noreferrer"&gt;Cyfrin Updraft&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3c6synvmrlirr3bd4jdt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3c6synvmrlirr3bd4jdt.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The #1 web3, Solidity, Vyper, smart contract auditing &amp;amp; security, all-encompassing developer and security-focused platform on earth. &lt;/p&gt;

&lt;p&gt;The content starts from "What is a blockchain" to "Solidity Basics" to "Advanced Deployment and Assembly" all the way down to "How to audit an AMM". This course is taught with love by some of the top people in the industry. This is a passion project data dump of everything you need to know to get started in web3, and know more than the average developer so you can make some amazing protocols. &lt;/p&gt;

&lt;h3&gt;
  
  
  Instructors
&lt;/h3&gt;

&lt;p&gt;Myself: I'm a bit biased, but with the lead instructor being myself, who has the #1 and #2 most watched web3 developer educational courses on YouTube, and have been doing security and development in web3 for over 4 years. &lt;/p&gt;

&lt;p&gt;Tincho: One of the top security researchers in web3, having found vulnerabilities in multi-billion dollar protocols like ENS, Lido, and Optimism. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;a href="https://www.youtube.com/watch?v=umepbfKp5rI" rel="noopener noreferrer"&gt;Learn Solidity, Blockchain Development, and Smart Contracts | Powered by AI - Foundry Edition&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/umepbfKp5rI"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;My latest invention. If you get through this videos, you will be a master, guaranteed. &lt;/p&gt;

&lt;p&gt;This course requires ZERO prior knowledge. None. It's in pure solidity, and will bring you from beginner to master. &lt;a href="https://book.getfoundry.sh/" rel="noopener noreferrer"&gt;Foundry&lt;/a&gt; is the fastest smart contract and solidity framework, and we teach you all the skills you need to be successful in web3. &lt;/p&gt;

&lt;p&gt;This is the most dense smart contract tutorial you will ever take. With the pinnacle project of &lt;a href="https://www.youtube.com/watch?v=8dRAd-Bzc_E" rel="noopener noreferrer"&gt;deploying your own stablecoin!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not sure what a stablecoin is? Well that's why you have to take this course!&lt;/p&gt;

&lt;p&gt;Anyone interested in becoming a security researcher in blockchain will need to take this course first, as this sets you up for your security journey as well.&lt;/p&gt;

&lt;p&gt;And not only that... but this course is powered by AI, and we teach you all the tips and tricks with artificial intelligence powered learning, getting you up to speed faster than ever before! &lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="https://www.youtube.com/watch?v=gyMwXuJrbJQ" rel="noopener noreferrer"&gt;Learn Blockchain, Solidity, and Full Stack Web3 Development with JavaScript – 32-Hour Course&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/gyMwXuJrbJQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;If you get through this videos, you will be full-stack a master, guaranteed. &lt;/p&gt;

&lt;p&gt;Ideally, this is for engineers who want every single drop of knowledge I have acquired about blockchain development over the past 3 years, and prefer javascript. It covers all the fundamentals of solidity, and uses the exact same cutting edge tools as billion dollar defi giants like &lt;a href="https://aave.com/" rel="noopener noreferrer"&gt;Aave&lt;/a&gt;, &lt;a href="https://synthetix.io/" rel="noopener noreferrer"&gt;Synthetix&lt;/a&gt;, and &lt;a href="https://uniswap.org/" rel="noopener noreferrer"&gt;Uniswap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ideally, this is for engineers with a little bit of javascript experience, but if you don't have any, we'll give you a ton of refreshers along the way. This course is for anyone with any level of coding experience, even none! &lt;/p&gt;

&lt;p&gt;Additionally, we have a ton of optional front end and full stack tutorials. These will teach you how to build powerful apps and websites that use the smart contracts and blockchain applications you've made for ANY user! &lt;/p&gt;

&lt;h2&gt;
  
  
  3. &lt;a href="https://cryptozombies.io/" rel="noopener noreferrer"&gt;Cryptozombies&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://cryptozombies.io/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyntxcg2yqgskf21bh10p.png" alt="Cryptozombies"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the longest time, Cryptozombies has been one of the go-to courses for learning blockchain &amp;amp; solidity. This gamified platform brings you step by step through solidity programming as you build your zombie army!&lt;/p&gt;

&lt;p&gt;This course has a wonderful user interface that's fun for people of any age, and is one of the most approachable content on this list. The Cryptozombies team does a tremendous job showing NFTs, inheritance, and everything you'd need in basic solidity. &lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;a href="https://solidity-by-example.org/" rel="noopener noreferrer"&gt;Solidity by Example&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwa2a935em1f9fv1ggvgd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwa2a935em1f9fv1ggvgd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A more minimal approach to learning web3, this is a site for people who already have some familiarity with software engineering. &lt;/p&gt;

&lt;p&gt;This site and YouTube channel have just the fundamental information, so you can jump right into coding! &lt;/p&gt;

&lt;h2&gt;
  
  
  5. &lt;a href="https://university.alchemy.com/" rel="noopener noreferrer"&gt;Alchemy University&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecem3izz18i3c36gzrp0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecem3izz18i3c36gzrp0.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Put on by the &lt;a href="https://www.alchemy.com/" rel="noopener noreferrer"&gt;Alchemy&lt;/a&gt; team, Alchemy University is a javascript focused education site, created in partnership with some of the best educators I've ever interacted with. &lt;/p&gt;

&lt;p&gt;I used to have a group called &lt;a href="https://www.chainshot.com/" rel="noopener noreferrer"&gt;Chainshot&lt;/a&gt; on my list, as they have always been underrated, but Alchemy recently aquired them to make this amazing site! &lt;/p&gt;

&lt;h2&gt;
  
  
  6. &lt;a href="https://consensys.net/academy/bootcamp/" rel="noopener noreferrer"&gt;Consensys Bootcamp&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://consensys.net/academy/bootcamp/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9q46322og0w2kcug6k67.png" alt="Consensys Bootcamp Webpage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is another bootcamp that just always knocks it out of the park. &lt;/p&gt;

&lt;p&gt;The Consensys team is one of the teams that has been around from basically the start of this whole thing. They consistently deliver on bringing in some of the best in the space to give guest lectures to the students, have top quality content, and are another bootcamp that I highly recommend to anyone looking to get into this space with a hands-on learning approach, and a team to guide them.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. &lt;a href="https://speedrunethereum.com/" rel="noopener noreferrer"&gt;Speed Run Ethereum&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy32bryw5gz8tvk599krx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy32bryw5gz8tvk599krx.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From creating your own NFTs to mastering decentralized staking apps, Speed Run Ethereum offers a comprehensive and enjoyable learning experience for blockchain enthusiasts and developers alike. It's created by my friend &lt;a href="https://austingriffith.com/" rel="noopener noreferrer"&gt;Austin Griffith&lt;/a&gt; who is one of the most respected Web3 developer educators on the planet. &lt;/p&gt;

&lt;p&gt;Join the &lt;a href="https://buidlguidl.com/" rel="noopener noreferrer"&gt;BuidlGuidl&lt;/a&gt; community, a vibrant hub of Ethereum builders focused on crafting innovative products, prototypes, and tutorials that enrich the web3 ecosystem. Showcase your achievements by submitting your DEX, Multisig, or SVG NFT builds, and collaborate with fellow builders to elevate your Web3 portfolio. Embark on an exciting journey of learning and building with Speed Run Ethereum, and become a proficient Ethereum developer ready to shape the future of decentralized technologies.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. &lt;a href="https://learnweb3.io/" rel="noopener noreferrer"&gt;LearnWeb3DAO&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wvvkll9rtk2xl68qxta.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1wvvkll9rtk2xl68qxta.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LearnWeb3DAO is like going to university for 4 years. They have a freshman, sophomore, junior, and senior track that will bring you end-to-end from start to finish. &lt;/p&gt;

&lt;p&gt;And this is another course that you can get started 100% for free! &lt;/p&gt;

&lt;h2&gt;
  
  
  9. &lt;a href="https://ethernaut.openzeppelin.com/" rel="noopener noreferrer"&gt;Ethernaut&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ethernaut.openzeppelin.com/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi9g2jscu08ooydg5f1or.png" alt="Ethernaut Home Page"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the harder pieces in this space is Ethernaut. You need a little bit of a javascript background, but trudging your way through this course will teach you a lot of the ins and outs and "gotchas" of solidity, and is one of the quickest ways to become "advanced" in the ways of solidity. &lt;/p&gt;

&lt;p&gt;This was created by the &lt;a href="https://openzeppelin.com/" rel="noopener noreferrer"&gt;Openzeppelin&lt;/a&gt; team, who are top auditors and security researchers in the blockchain space, and they make contracts for people to fork into their own projects. Anyone in the blockchain space worth their "salt" knows who Openzeppelin is and how to work with their tools!&lt;/p&gt;

&lt;h2&gt;
  
  
  10. &lt;a href="https://ethereum.org/en/developers/learning-tools/" rel="noopener noreferrer"&gt;The Ethereum Org List&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://ethereum.org/en/developers/learning-tools/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpandr9ci7fz3kkwdtmzq.png" alt="Ethereum Org Site"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What better way to learn about web3 and Ethereum than from the community itself! &lt;/p&gt;

&lt;p&gt;The Ethereum org website is JAM packed with content, tutorials, and submissions from around the globe, in exactly the manner you'd expect. You can find just about anything here to &lt;a href="https://ethereum.org/en/developers/tutorials/" rel="noopener noreferrer"&gt;learn and grow&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  11. &lt;a href="https://www.useweb3.xyz/" rel="noopener noreferrer"&gt;useWeb3&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.useweb3.xyz/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcqsioftnx9v1pt4ej77f.png" alt="useWeb3 Homepage"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;useWeb3, like the Ethereum org website, is dedicated to being a living document of updated courses and content to teach people how to build in the blockchain space. &lt;/p&gt;

&lt;p&gt;This open sourced project is constantly updated, and really any of the projects listed on their site is worthwhile for you to check and and put to the test!&lt;/p&gt;

&lt;h2&gt;
  
  
  12. There are so many!!
&lt;/h2&gt;

&lt;p&gt;Ok, so I fibbed, this article has way more than just 10!!! Here is a list of tons of different places you can get started learning solidity, smart contracts, and blockchain. It doesn't matter where you go, just pick one, and go!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://eattheblocks.com/" rel="noopener noreferrer"&gt;EatTheBlocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chain.link/bootcamp" rel="noopener noreferrer"&gt;Chainlink Bootcamp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA" rel="noopener noreferrer"&gt;Patrick Collins&lt;/a&gt; (That's me!)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/austingriffith" rel="noopener noreferrer"&gt;Austin Griffith&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/user/boyindasouth" rel="noopener noreferrer"&gt;Nader Dabit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://remix.ethereum.org/" rel="noopener noreferrer"&gt;Remix with Learn ETH Plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/@0xOwenThurm" rel="noopener noreferrer"&gt;Owen (Security)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And so much more.&lt;/p&gt;

&lt;p&gt;Well, as always, be sure to follow me on &lt;a href="https://twitter.com/PatrickAlphaC" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;, &lt;a href="https://medium.com/@patrick.collins_58673" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;, and &lt;a href="https://github.com/PatrickAlphaC" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, and I hope to see you in the community!&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>programming</category>
      <category>solidity</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Learn Solidity, Blockchain, and Smart Contracts with this Full Free Course</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Fri, 10 Sep 2021 03:40:10 +0000</pubDate>
      <link>https://forem.com/patrickalphac/learn-solidity-blockchain-and-smart-contracts-with-this-full-free-course-2bgn</link>
      <guid>https://forem.com/patrickalphac/learn-solidity-blockchain-and-smart-contracts-with-this-full-free-course-2bgn</guid>
      <description>&lt;p&gt;FreeCodeCamp has just released an entire &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ" rel="noopener noreferrer"&gt;Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial&lt;/a&gt; that goes over &lt;em&gt;everything&lt;/em&gt; a successful smart contract needs to learn, all jam packed into 1 free 16 hour course.&lt;/p&gt;

&lt;p&gt;Taught, by yours truly!&lt;/p&gt;

&lt;p&gt;Each section comes with either &lt;a href="https://github.com/smartcontractkit/full-blockchain-solidity-course-py" rel="noopener noreferrer"&gt;additional reading&lt;/a&gt; or &lt;a href="https://github.com/smartcontractkit/full-blockchain-solidity-course-py" rel="noopener noreferrer"&gt;code samples&lt;/a&gt; all available in the giant mega GitHub repo associated with the course: &lt;/p&gt;

&lt;p&gt;👩‍💻 GitHub Repo: &lt;a href="https://github.com/smartcontractkit/full-blockchain-solidity-course-py" rel="noopener noreferrer"&gt;https://github.com/smartcontractkit/full-blockchain-solidity-course-py&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The GitHub Repo has &lt;em&gt;everything&lt;/em&gt; you need to be successful in the tutorial and learn solidity. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg7daucnq5a8lpijqjcpj.jpeg" alt="Learn Solidity and Blockchain"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also watch the amazing trailer for the video here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=iGtioP5mrew" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4xviifnfisbygj7dsdy2.png" alt="Learn Solidity and Blockchain"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️&lt;/p&gt;

&lt;h2&gt;
  
  
  Who is this for?
&lt;/h2&gt;

&lt;p&gt;This course is for ANYONE looking to either get started being a smart contract engineer or get better. If you already have some knowledge, skip to the sections you like! That's why they are timestamped! If you know nothing, then start from the start. &lt;/p&gt;

&lt;p&gt;If you don't want to become a developer, even YOU can learn a ton from watching specific sections like the "Welcome to Blockchain" section. &lt;/p&gt;

&lt;h2&gt;
  
  
  Course Layout
&lt;/h2&gt;

&lt;p&gt;The course is divided into "lessons", which each teach foundational concepts for blockchain development. &lt;/p&gt;

&lt;p&gt;⭐️ Course Contents ⭐&lt;br&gt;
⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=0s" rel="noopener noreferrer"&gt;(00:00:00) Introduction&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We introduce the course, and what we are going to go over! We give some helpful resources on where to get help, how best to use the course, and how to pace yourself!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=393s" rel="noopener noreferrer"&gt;(00:06:33) Lesson 0: Welcome To Blockchain&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Foundational conceptual information about what &lt;a href="https://www.investopedia.com/terms/b/blockchain.asp" rel="noopener noreferrer"&gt;blockchains&lt;/a&gt; actually are, what makes smart contracts so special, and how hybrid smart contracts and &lt;a href="https://betterprogramming.pub/what-is-a-blockchain-oracle-f5ccab8dbd72" rel="noopener noreferrer"&gt;oracles&lt;/a&gt; make smart contracts even more impactful. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=5460s" rel="noopener noreferrer"&gt;(01:31:00) Lesson 1: Welcome to Remix! Simple Storage&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We finally start coding solidity! We learn about the Remix IDE, a powerful tool to deploy our smart contracts. We learn a lot of the basic syntax of solidity. We also learn how to deploy our smart contracts! We build a contract that can store very specific data. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=7772s" rel="noopener noreferrer"&gt;(02:09:32) Lesson 2: Storage Factory&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This shorter lesson we learn some advanced topics of solidity, like the factory pattern, where we can deploy smart contracts from other smart contracts. We build a contract that can deploy Simple Storage contracts!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=8795s" rel="noopener noreferrer"&gt;(02:26:35) Lesson 3: Fund Me&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We turn up the heat in this tutorial, where we learn how to deal with paying for things, getting pricing information, working with oracles, and importing code from outside our projects. We build a sample project that can be used to help fund future projects!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=12408s" rel="noopener noreferrer"&gt;(03:26:48) Lesson 4: Web3.py Simple Storage&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We level up our coding environments by moving from Remix to our own local text editors, and start using python and &lt;a href="https://web3py.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;web3.py&lt;/a&gt; to build and deploy our smart contracts. We use the same Simple Storage contract that we've been learning with, but with web3.py! Web3.py is a foundational technology to the main one we are going to be using...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=16075s" rel="noopener noreferrer"&gt;(04:27:55) Lesson 5: Brownie Simple Storage&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here is where we learn the most powerful tool that we are going to "live" in for the rest of the course, &lt;a href="https://eth-brownie.readthedocs.io/en/stable/" rel="noopener noreferrer"&gt;Brownie&lt;/a&gt;! This is a smart contract development framework for building, testing, and deploying smart contracts easily. We learn the basics of testing as well, and the layout of a brownie project, yummy!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=18394s" rel="noopener noreferrer"&gt;(05:06:34) Lesson 6: Brownie Fund Me&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We get even more familiar with brownie by going over our Fund Me project again, and learning things like verifying out contracts, importing dependencies, forking a blockchain, and more!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=22298s" rel="noopener noreferrer"&gt;(06:11:38) Lesson 7: SmartContract Lottery&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Boom! A whole lottery application that we build from scratch! We learn how to set an entrance fee for our lottery, get a random number for a winner, Openzeppelin contracts, events &amp;amp; logging, and more!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=30062s" rel="noopener noreferrer"&gt;(08:21:02) Lesson 8: Chainlink Mix&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This quick lesson shows the layout of the &lt;a href="https://github.com/smartcontractkit/chainlink-mix" rel="noopener noreferrer"&gt;chainlink-mix&lt;/a&gt; which is a &lt;a href="https://github.com/brownie-mix" rel="noopener noreferrer"&gt;brownie mix&lt;/a&gt; that allows us to start a hybrid smart contract project right from the get-go!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=30205s" rel="noopener noreferrer"&gt;(08:23:25) Lesson 9: ERC20s, EIPs, and Token Standards&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We learn how to create our own ERC20 blockchain token! We also learn about different versions of solidity, and more!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=30893s" rel="noopener noreferrer"&gt;(08:34:53) Lesson 10: Defi &amp;amp; Aave&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An incredible dive into the world of #DeFi and what makes it so special. We learn how to interact with the &lt;a href="https://aave.com/" rel="noopener noreferrer"&gt;Aave&lt;/a&gt; protocol and use it's composability for us to make incredibly powerful applications ourselves, even if it's 100% off-chain! We learn some advanced DeFi skills like short selling and depositing collateral. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=35420s" rel="noopener noreferrer"&gt;(09:50:20) Lesson 11: NFTs&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Art, art, art!! 🎨 We learn how to create art on the blockchain, but with unlimited customization, allowing us to make games, generative art, and more! We make a few adorable randomized dogs and deploy them to the blockchain and &lt;a href="https://opensea.io/" rel="noopener noreferrer"&gt;Opensea&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=42555s" rel="noopener noreferrer"&gt;(11:49:15) Lesson 12: Upgrades&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A very advanced tutorial on deploying contracts that can be upgraded using the &lt;a href="https://blog.openzeppelin.com/the-transparent-proxy-pattern/" rel="noopener noreferrer"&gt;transparent proxy pattern&lt;/a&gt;. This lesson goes a bit into Yul code, which is the low level code of solidity, and some of the dangers and advantages of &lt;code&gt;delegatecall&lt;/code&gt;.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=46086s" rel="noopener noreferrer"&gt;(12:48:06) Lesson 13: Full Stack Defi&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We now add a front-end! We don't go deep into how to create front-ends, so if you're a little new on typescript or javascript, you might want to watch &lt;a href="https://www.freecodecamp.org/news/learn-typescript-with-this-crash-course/" rel="noopener noreferrer"&gt;FreeCodeCamps Typescript crash course.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;⌨️ &lt;a href="https://www.youtube.com/watch?v=M576WGiDBdQ&amp;amp;t=58456s" rel="noopener noreferrer"&gt;(16:14:16) Closing and Summary&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;At long last, we end this tutorial, and you leave being an amazing smart contract engineer! We talk about joining the community, where to go next, and how to live with this newfound skill of yours!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can see a more detailed inventory in the &lt;a href="https://github.com/smartcontractkit/full-blockchain-solidity-course-py" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt;, it's &lt;em&gt;very&lt;/em&gt; thorough. &lt;/p&gt;

&lt;h2&gt;
  
  
  How to watch
&lt;/h2&gt;

&lt;p&gt;This is a course that is long, so don't go through the whole thing in 1 go! 30 minutes at a time is perfect, and will give your brain plenty of time of absorb all the information you're getting and make you a better smart contract engineer. &lt;/p&gt;

&lt;p&gt;Maybe even grab a buddy to keep each other accountable, by the end of the course, you'll have years of experience under your belt already! This course is an entire data dump of knowledge from years of working with smart contracts. &lt;/p&gt;

&lt;h2&gt;
  
  
  What should I be expected to use?
&lt;/h2&gt;

&lt;p&gt;You'll want a text editor like &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;Visual Studio Code&lt;/a&gt; and a number of dependencies installed. Don't worry, we go over everything!&lt;/p&gt;

&lt;p&gt;Be sure to @ me at &lt;a href="https://twitter.com/PatrickAlphaC" rel="noopener noreferrer"&gt;@patrickalphac&lt;/a&gt; if you enjoyed the content or learnt something. Joining the community is one of the best ways to continue learning, and put your skills to use!&lt;/p&gt;

&lt;h2&gt;
  
  
  Community
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Twitter - Just get on Twitter and say hi to someone!&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/9zk7snTfWe" rel="noopener noreferrer"&gt;Brownie Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethereum.org/en/" rel="noopener noreferrer"&gt;Ethereum Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://discord.gg/2YHSAey" rel="noopener noreferrer"&gt;Chainlink Discord&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.reddit.com/r/ethdev/" rel="noopener noreferrer"&gt;Reddit ethdev&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hackathons
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://chain.link/hackathon" rel="noopener noreferrer"&gt;CL Hackathon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethglobal.co/" rel="noopener noreferrer"&gt;ETH Global&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/ETHIndiaco" rel="noopener noreferrer"&gt;ETH India&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Learning More
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cryptozombies.io/" rel="noopener noreferrer"&gt;CryptoZombies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ" rel="noopener noreferrer"&gt;Dapp University&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.chainshot.com/courses" rel="noopener noreferrer"&gt;ChainShot&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://academy.ivanontech.com/" rel="noopener noreferrer"&gt;Ivan on Tech&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCZM8XQjNOyG2ElPpEUtNasA" rel="noopener noreferrer"&gt;Eat the Blocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCn-3f8tw_E1jZvhuHatROwA" rel="noopener noreferrer"&gt;Patrick Collins&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UC_HI2i2peo1A-STdG22GFsA" rel="noopener noreferrer"&gt;Austin Griffith&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/user/boyindasouth" rel="noopener noreferrer"&gt;Nader Dabit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ethereum.org/en/" rel="noopener noreferrer"&gt;Ethereum.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>solidity</category>
      <category>blockchain</category>
      <category>python</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>Using Brownie For To Deploy Smart Contracts</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Sat, 23 Jan 2021 18:09:35 +0000</pubDate>
      <link>https://forem.com/patrickalphac/using-brownie-for-to-deploy-smart-contracts-1kkp</link>
      <guid>https://forem.com/patrickalphac/using-brownie-for-to-deploy-smart-contracts-1kkp</guid>
      <description>&lt;p&gt;In this article, we are going to deploy smart contracts using Python. This means that, if you know some Python, this could be your transition into smart contract and blockchain development!&lt;/p&gt;

&lt;p&gt;You can see the original blog from &lt;a href="https://codeburst.io/deploy-a-smart-contract-using-python-how-to-b62de0124b?source=friends_link&amp;amp;sk=518545da7400ba3061f29185b479a417" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;. &lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;I love Python, it has such an amazing developer experience. There is something so sweet about being able to just write print("hi") and not having to do anything verbose like System.out.println("hi"). This sentiment is shared by many, including those in the fintech world. Many of the hedge funds I’ve worked with (and worked at) have used Python as their main language.&lt;/p&gt;

&lt;p&gt;I wish I could take Python with me everywhere. And even though &lt;a href="https://docs.soliditylang.org/en/v0.8.0/" rel="noopener noreferrer"&gt;Solidity&lt;/a&gt; (&lt;a href="https://ethereum.org/en/" rel="noopener noreferrer"&gt;Ethereum’s&lt;/a&gt; native smart contract language) isn’t Python, it has a lot of nice features, and can still be deployed with Python. When I first started working with Solidity, I used &lt;a href="https://remix.ethereum.org/" rel="noopener noreferrer"&gt;Remix&lt;/a&gt;, a strong web IDE that allows you to visualize your smart contracts. Remix is great and I still use it, but a lot of productivity can be accomplished outside of a single IDE. This was when I started to learn about &lt;a href="https://www.trufflesuite.com/" rel="noopener noreferrer"&gt;Truffle&lt;/a&gt; and &lt;a href="https://hardhat.org/guides/mainnet-forking.html" rel="noopener noreferrer"&gt;HardHat&lt;/a&gt;, which are Nodejs frameworks for deploying smart contracts.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;These are the dominant frameworks I’ve seen by far, and this is all great but we don’t like Javascript, we like Python.&lt;/em&gt; So I was excited to find &lt;a href="https://github.com/eth-brownie/brownie" rel="noopener noreferrer"&gt;Brownie&lt;/a&gt; and web3.py; a Python framework to deploy smart contracts and an open-sourced repo for working with blockchains. We will be looking at both Brownie and Web3.py in this article.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why Python?
&lt;/h1&gt;

&lt;p&gt;There is a reason why so many data scientists, academics, and fintech institutions use Python. It’s such a versatile language, has an easy developer experience, and is jam-packed with packages to make life easier. Top &lt;a href="https://defipulse.com/" rel="noopener noreferrer"&gt;defi&lt;/a&gt; projects are starting to realize this, with projects like yearn.finance using python to deploy all their production code. Yearn.finance is run by a group of really talented fintech engineers turned blockchain, and they took with them the tool that they know and love, Python. Also it doesn’t touch npm, but I’ll leave my distaste for javascript package managers for another article.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Brownie?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzpo9j4l1sj5rro7d3wyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzpo9j4l1sj5rro7d3wyh.png" alt="Brownie Python"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/eth-brownie/brownie" rel="noopener noreferrer"&gt;Brownie&lt;/a&gt; is an open-sourced Python smart contract framework created by &lt;a href="https://github.com/iamdefinitelyahuman" rel="noopener noreferrer"&gt;Ben Hauser&lt;/a&gt;, aka “iamdefinitelyahuman”, and is a work of art. This is the tool that yearn.finance uses this framework to deploy and maintain contracts. You can start a project with a simple command, and start working with the code right away. What a “sweet” project name.&lt;/p&gt;

&lt;h1&gt;
  
  
  Deploy your First Smart Contract with Python
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Install Brownie and bake
&lt;/h2&gt;

&lt;p&gt;Brownie has a “baking” feature that allows you to start your repos with some baseline code since most projects need a lot of the same pieces, similar to &lt;code&gt;create-eth-app&lt;/code&gt;.To get started, we just need to install Brownie the same way you install every other Python package.&lt;br&gt;
pip install eth-brownie&lt;br&gt;
We also need to install ganache-cli a package for deploying local blockchains. You’ll need to install &lt;a href="https://www.npmjs.com/get-npm" rel="noopener noreferrer"&gt;npm and nodejs&lt;/a&gt; for this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install -g ganache-cli&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And boom! We are ready to go!&lt;/p&gt;

&lt;p&gt;We are going to use the &lt;a href="https://github.com/smartcontractkit/chainlink-mix" rel="noopener noreferrer"&gt;chainlink-mix&lt;/a&gt; to get started, since many of these top defi projects use &lt;a href="https://chain.link/" rel="noopener noreferrer"&gt;Chainlink&lt;/a&gt; to get their asset data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brownie bake chainlink-mix
cd chainlink
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a quick &lt;code&gt;ls&lt;/code&gt; command will show us the layout of the project&lt;br&gt;
How to deploy a smart contract with python&lt;/p&gt;
&lt;h3&gt;
  
  
  Brownie project layout
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;build : This is where the project keeps track of your deployed smart contracts and compiled contracts
contracts : The source code of your contracts, typically written in solidity or vyper
interfaces : A layout of interfaces you’ll need to work with deployed contracts. Every interaction with a contract needs an ABI and an address. Interfaces are great ways to get a contract’s ABI
scripts : Scripts we create to automate processes of working with our contracts
tests : Tests
brownie-config.yaml : This is where we have all the information for brownie to understand how to work with our smart contract. What blockchain do we want to deploy to? Are there any special parameters we want to set? All these are set in the config file.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;requirements.txt , README.md , LICENSE , and .gitignore can be ignored, for now, you’ll find out what they are for as you practice.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Setup your environment variables
&lt;/h2&gt;

&lt;p&gt;If you’re familiar with blockchain development, you know that local blockchains, testnet blockchains, and mainnet blockchains are all different things. We will be deploying to a testnet so we can interact with a real live blockchain.&lt;br&gt;
You’ll need a &lt;code&gt;WEB3_INFURA_PROJECT_ID&lt;/code&gt; which can be retrieved by making an &lt;a href="https://infura.io/" rel="noopener noreferrer"&gt;Infura&lt;/a&gt; account. This will be what we use to connect to our testnetwork.&lt;br&gt;
You’ll also want to get a metamask or other web3 ethereum wallet and fund it with some ETH. For this demo, we want to use the Kovan testnetwork.&lt;/p&gt;

&lt;p&gt;If you’ve never used metamask, feel free to follow along in this video! You can skip the part about funding with LINK, we only need testnet ETH. We also will not be using Ropsten (as shown in the video) but Kovan. If you already have a wallet, grab some &lt;a href="https://gitter.im/kovan-testnet/faucet" rel="noopener noreferrer"&gt;Kovan Ether from the faucet&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=4ZgFijd02Jo" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.youtube.com%2Fvi%2F4ZgFijd02Jo%2F0.jpg" alt="Brownie Python"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Install, Configure, and Fund Metamask
&lt;/h3&gt;

&lt;p&gt;Once you have a metamask wallet, you can export your private key to your PRIVATE_KEY environment variable.&lt;br&gt;
&lt;a href="https://www.twilio.com/blog/2017/01/how-to-set-environment-variables.html" rel="noopener noreferrer"&gt;Read here on setting environment variables&lt;/a&gt;. If this still confuses you and this is just a test wallet, feel free to just replace PRIVATE_KEY in the code with your private key, and &lt;code&gt;WEB3_INFURA_PROJECT_ID&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Deploy your smart contract
&lt;/h2&gt;

&lt;p&gt;In our scripts folder, we have a script called &lt;code&gt;01_deploy_price_consumer_v3.py&lt;/code&gt; , this will deploy our Smart Contract that reads in the price of Ethereum in USD. If you want to see an easier walkthrough of what this contract does and how to deploy it, feel free to check out the Chainlink tutorial on &lt;a href="https://docs.chain.link/docs/beginners-tutorial" rel="noopener noreferrer"&gt;deploying a price feed contract&lt;/a&gt;.&lt;br&gt;
brownie run is the command we can use to run a script. If you run just brownie you can see a list of all commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brownie run scripts/price_feed_scripts/01_deploy_price_consumer_v3.py --network kovan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--network kovan&lt;/code&gt; allows us to set the network we want to work with. We are working with the kovan testnet for this demo. You’ll need Kovan ETH to do this! You’ll get a big output, but eventually will settle with something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Running 'scripts/price_feed_scripts/01_deploy_price_consumer_v3.py::main'...
Transaction sent: 0x23d1dfa3937e0cfbab58f8d5ecabe2bfffc28bbe2349527dabe9289e747bac56
Gas price: 20.0 gwei   Gas limit: 145600   Nonce: 1339
PriceFeed.constructor confirmed - Block: 22721813   Gas used: 132364 (90.91%)
PriceFeed deployed at: 0x6B2305935DbC77662811ff817cF3Aa54fc585816
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If this worked properly, we can go to kovan etherscan and find the contract we deployed. The link above shows the contract deployed in this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Read off your smart contract
&lt;/h2&gt;

&lt;p&gt;Now that we have deployed a smart contract, we can read the price of ETH from the contract we just deployed. We will be using another script that we have:&lt;br&gt;
brownie run scripts/price_feed_scripts/02_read_price_feed.py --network kovan&lt;/p&gt;

&lt;p&gt;And we will get an output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Brownie v1.12.2 - Python development framework for Ethereum
ChainlinkProject is the active project.
Running 'scripts/price_feed_scripts/read_price_feed.py::main'...
Reading data from 0x6B2305935DbC77662811ff817cF3Aa54fc585816
62322000000
Where 62322000000 is the current price of ETH in USD! Solidity doesn’t understand decimals, and we know that this example has 8 decimals, so the price is $623.22 .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you’ve just deployed your first smart contract using python with Brownie!&lt;/p&gt;

&lt;h1&gt;
  
  
  Using web3.py
&lt;/h1&gt;

&lt;p&gt;Brownie uses a tool called web3.py to make your life easier, but if you’re savvy you can always work with the contracts directly without a framework. Web3.py is a raw package that we can use to work more directly with contracts.&lt;br&gt;
For this, we will just need our Kovan infura project id as above.&lt;br&gt;
Remember, to interact with any smart contract, you need two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The contract ABI&lt;/li&gt;
&lt;li&gt;The contract address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Brownie takes care of a lot of these pieces behind the scenes, but we can do it manually as well. Here is what reading from that contract on-chain looks like with web3.py.&lt;br&gt;
First, we need to install web3.py.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install web3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we can run the following in a file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web3 = Web3(Web3.HTTPProvider('https://kovan.infura.io/v3/&amp;lt;infura_project_id&amp;gt;')) 
abi = '[{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]' 
addr = '0x9326BFA02ADD2366b30bacB125260Af641031331' 
contract = web3.eth.contract(address=addr, abi=abi) 
latestData = contract.functions.latestRoundData().call() print(latestData)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running the above will print the latest price of ETH in USD to our console. If you have an issue, be sure to check the Chainlink documentation to see if something is off.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;You can learn more about Web3.py and Brownie from their documentation. Both of these projects are open-sourced so anyone can contribute!&lt;br&gt;
Feel free to check out this video which explains it some more!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=QfFO22lwSw4" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.youtube.com%2Fvi%2FQfFO22lwSw4%2F0.jpg" alt="Brownie Python"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>blockchain</category>
      <category>ethereum</category>
    </item>
    <item>
      <title>This New Technology Is Changing Fintech</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Wed, 23 Dec 2020 04:16:10 +0000</pubDate>
      <link>https://forem.com/patrickalphac/this-new-technology-is-changing-fintech-58cc</link>
      <guid>https://forem.com/patrickalphac/this-new-technology-is-changing-fintech-58cc</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.investopedia.com/terms/f/fintech.asp"&gt;Fintech&lt;/a&gt; is a popular buzzword. Why? Because it powers our money. Our banks, our assets, our investments all run through the tools that engineers have been building for years to make our monetary systems easy and powerful.&lt;/p&gt;

&lt;p&gt;But what if I told you that fintech as you know it is in for a massive makeover? &lt;/p&gt;

&lt;p&gt;That fintech has already started handing over market share to a new technology. That the skills needed to run a successful hedge fund, asset manager, data vendor, are going through the spin cycle of reform. Many of these pieces you see today, like python, devops, and algorithmic modeling will persist, but on a totally different platform.&lt;/p&gt;

&lt;p&gt;We will go over what defi is, and how you can join. &lt;/p&gt;

&lt;p&gt;If you know some #python, you'll want to stick around. &lt;/p&gt;

&lt;h1&gt;
  
  
  What is DeFi
&lt;/h1&gt;

&lt;p&gt;Defi is proving to be the force that is going to be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More secure&lt;/li&gt;
&lt;li&gt;More transparent&lt;/li&gt;
&lt;li&gt;Faster&lt;/li&gt;
&lt;li&gt;Less corrupt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This year, we've seen an explosion from the defi scene, going from nearly nothing &lt;a href="https://defipulse.com/"&gt;to nearly $15b&lt;/a&gt; in assets under management be decentralized protocols.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what is defi?
&lt;/h2&gt;

&lt;p&gt;Defi stands for "Decentralized Finance", and is a concept where non-custodial &lt;a href="https://www.investopedia.com/terms/s/smart-contracts.asp"&gt;smart contracts&lt;/a&gt; hold your asset and automatically execute without a centralized intermediate. Meaning you don't have a banker who can freeze your assets anymore. You don't have an exchange where a trade takes 4 days to settle. You are finally truly in charge of your assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  How is that possible?
&lt;/h2&gt;

&lt;p&gt;Smart Contract platforms like Ethereum allow engineers to build applications that have no centralized authority and automatically execute. Everything is transparent on-chain and every can see the code. Imagine a commons that is &lt;a href="https://en.wikipedia.org/wiki/Tragedy_of_the_commons"&gt;tragedy resistant&lt;/a&gt; but instead of a plain or common, you have a computational system. This allows for people to truly own their asset. &lt;/p&gt;

&lt;p&gt;More and more protocols are running in defi, and for good reason. The value add that blockchain/smart contract platforms have around transparency and security is huge, but the other massive thing is the current yield. &lt;/p&gt;

&lt;p&gt;We are currently in a &lt;a href="https://www.investopedia.com/terms/l/low-interest-rate-environment.asp"&gt;low-interest rate environment&lt;/a&gt;, where banks give next to nothing for holding your money. A defi protocol can do the same thing, and for nearly the same security net you 5% - 10% APY. In a traditional finance world, this is insane. Professional hedge funds don't make anywhere near that even on a short term basis. &lt;/p&gt;

&lt;p&gt;Some of these platforms are doing revolutionary work. You can see the top projects at the moment on &lt;a href="https://defipulse.com/"&gt;Defipulse&lt;/a&gt;, a platform that tracks defi project growth. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://aave.com/"&gt;Aave&lt;/a&gt; is a decentralized borrowing and lending platforms, and has a tool called a "flash loan", which allows you to borrow as much as you want &lt;strong&gt;without any collateral&lt;/strong&gt;. This is only possible with blockchain, but it allows you to be a whale for a very short period of time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.synthetix.io/"&gt;Synthetix&lt;/a&gt; is a decentralized protocol that allows for tokenizing assets into synthetic tokens. Meaning you can have your TSLA shares be a cryptocurrency and be traded with ease. &lt;/p&gt;

&lt;p&gt;I've written a lot about Synthetix because the current stock market and securities buying world is fraught with corruption. The faster we can get these protocols to scale the better. If you want to read more about the power Synthetix will have, &lt;a href="https://medium.com/@patrick.collins_58673/actually-fair-stock-markets-why-you-need-to-be-bought-in-on-decentralized-exchanges-now-b98b325282d5?sk=1f973d9cf13fb488535cd7a2ca8ab97c"&gt;check this article out&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://yearn.finance/"&gt;yearn.finance&lt;/a&gt; is the best-decentralized algotrader out there. It finds the highest APY of the various protocols and moves everyone's money to them in a way that maximized yield. In the traditional fintech world, this is a bigger issue than insider trading. A hedge fund not practicing best execution is a way bigger threat than insider trading. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.setprotocol.com/?ref=cryptocurrencyjobs.co"&gt;Set Protocol&lt;/a&gt; build your own defi strategies and become an asset manager through just your public strategy on-chain. Anyone can set up a strategy. &lt;/p&gt;

&lt;h1&gt;
  
  
  How you can get involved
&lt;/h1&gt;

&lt;p&gt;I ended above with two projects that current fintech engineers love. Yearn.finance and Set Protocol. Both are the current best iterations of decentralized algoritmic trading.&lt;/p&gt;

&lt;p&gt;Imagine wanting to start a hedge fund with an amazing strategy but not having the capital to pay for a fancy lawyer to get all the paperwork started. You can get started without any of that with a strategy on one of these platforms. I love python, as does a lot of the algorithmic trading world and yearn.finance is a project run by ex-traditional fintech engineers, and they brought python with them.&lt;/p&gt;

&lt;p&gt;This will be your guide to get a boilerplate strategy going. &lt;/p&gt;

&lt;h1&gt;
  
  
  Getting started with Python
&lt;/h1&gt;

&lt;p&gt;Install the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.python.org/downloads/"&gt;python&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pip.pypa.io/en/stable/installing/"&gt;pip&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.npmjs.com/get-npm"&gt;npm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;brownie (see below)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install brownie
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g ganache-cli
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sign up for &lt;a href="https://infura.io/"&gt;Infura&lt;/a&gt; and generate an API key. Store it in the &lt;code&gt;WEB3_INFURA_PROJECT_ID&lt;/code&gt; environment variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export WEB3_INFURA_PROJECT_ID=YourProjectID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sign up for &lt;a href="https://etherscan.io/"&gt;Etherscan&lt;/a&gt; and generate an API key. This is required for fetching source codes of the mainnet contracts we will be interacting with. Store the API key in the &lt;code&gt;ETHERSCAN_TOKEN&lt;/code&gt; environment variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export ETHERSCAN_TOKEN=YourApiToken
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then download the mix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brownie bake yearn-strategy 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Working with contracts
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Open the Brownie console. This automatically launches Ganache on a forked mainnet. Ganache is a fake blockchain that will run locally on your computer. This will simulate working with the real Ethereum network.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brownie console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create variables for the Yearn Vault and Want Token addresses. These were obtained from the Yearn Registry. Also, loan the Yearn governance multisig.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; vault = Vault.at("0xBFa4D8AA6d8a379aBFe7793399D3DdaCC5bBECBB")  # yvDAI (v0.2.2)
&amp;gt;&amp;gt;&amp;gt; token = Token.at("0x6b175474e89094c44da98b954eedeac495271d0f")  # DAI
&amp;gt;&amp;gt;&amp;gt; gov = "ychad.eth"  # ENS for Yearn Governance Multisig
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Deploy the &lt;code&gt;Strategy.sol&lt;/code&gt; contract.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; strategy = Strategy.deploy(vault, {"from": accounts[0]})
Transaction sent: 0xc8a35b3ecbbed196a344ed6b5c7ee6f50faf9b7eee836044d1c7ffe10093ef45
  Gas price: 0.0 gwei   Gas limit: 6721975
  Flashloan.constructor confirmed - Block: 9995378   Gas used: 796934 (11.86%)
  Flashloan deployed at: 0x3194cBDC3dbcd3E11a07892e7bA5c3394048Cc87
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will be your first transaction on-chain, nice work!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Approve the strategy for the Vault. We must do this because we only approved Strategies can pull funding from the Vault.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 1000 DAI debt limit, no rate limit, 50 bps strategist fee
&amp;gt;&amp;gt;&amp;gt; vault.addStrategy(strategy, Wei("1000 ether"), 2 ** 256 - 1, 50, {"from": gov})
Transaction sent: 0xa70b90eb9a9899e8f6e709c53a436976315b4279c4b6797d0a293e169f94d5b4
  Gas price: 0.0 gwei   Gas limit: 6721975
  Transaction confirmed - Block: 9995379   Gas used: 21055 (0.31%)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Now we are ready to put our strategy into action!
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; harvest_tx = strategy.harvest({"from": accounts[0]})  # perform as many time as desired...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Strategy.sol&lt;/code&gt; is where you can implement your own strategy and get started working with decentralized "algotrading". &lt;/p&gt;

&lt;p&gt;Be sure to &lt;a href="https://github.com/iearn-finance/brownie-strategy-mix"&gt;check out the repo&lt;/a&gt; to learn more about how it works, the community around it. Once you build something awesome, be sure to make some noise! The community love meeting new people. &lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>python</category>
      <category>solidity</category>
      <category>algotrading</category>
    </item>
    <item>
      <title>Getting Gas Prices In Solidity</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Wed, 25 Nov 2020 17:54:18 +0000</pubDate>
      <link>https://forem.com/patrickalphac/getting-gas-prices-in-solidity-4ijf</link>
      <guid>https://forem.com/patrickalphac/getting-gas-prices-in-solidity-4ijf</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;When making transactions in the ethereum chain, you always have to set a gas price to do so. Generally, your wallet will have some sort of estimator to decide the gas price. This is great, but what happens if you NEED to get your transaction processed quickly? You'll need a way to estimate the &lt;a href="https://feeds.chain.link/fast-gas-gwei"&gt;fast gas price&lt;/a&gt; so your transaction can get through. &lt;/p&gt;

&lt;h1&gt;
  
  
  What is gas?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://blockgeeks.com/guides/ethereum-gas/#:~:text=As%20explained%20in%20the%20introduction,take%20to%20execute%20certain%20operations.&amp;amp;text=Each%20and%20every%20line%20of,of%20gas%20to%20be%20executed."&gt;Gas in solidity&lt;/a&gt; is a special unit of computational work and storage it costs to execute on-chain interactions and state changes. So if you do some addition, that will cost less gas than if you do addition, multiplication, and division.&lt;/p&gt;

&lt;p&gt;1 unit of gas costs ethereum. This is why you pay a fee whenever you make a transaction on-chain, you are asking the system to perform some computational work. However, the ETH that you need to pay to do that 1 unit of gas, changes depending on the congestion of the network.&lt;/p&gt;

&lt;p&gt;When a lot of people want their transactions processed, miners will prioritize the transactions that are offering more gas. This is known as the &lt;em&gt;gas price&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The fee you pay is going to be the amount of gas times the cost of gas. &lt;/p&gt;

&lt;h1&gt;
  
  
  Sending transactions
&lt;/h1&gt;

&lt;p&gt;When sending transactions, you need to estimate this price of gas so you'll have roughly a good idea when your transaction will get through. Maybe you have a massive transaction and you want it to settle quickly. When looking at your code, you can choose how much gas to send. &lt;/p&gt;

&lt;h2&gt;
  
  
  Sample code
&lt;/h2&gt;

&lt;p&gt;Let's look at some code that shows sending a transaction. We will be using &lt;a href="https://github.com/ethers-io/ethers.js/"&gt;ethers.js&lt;/a&gt; to send our transaction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const main = async () =&amp;gt; {
    let contract = new ethers.Contract(address, abi, wallet)
    let contractWithSigner = contract.connect(wallet)
    let tx = await contractWithSigner.executeThisFunctionQuick()
    console.log(tx.hash)
    await tx.wait()
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this function, we are calling &lt;code&gt;executeThisFunctionQuick&lt;/code&gt;, but we are not giving the transaction any input about how much gas it should use, and therefore, it has no idea how quickly it should send this information. This is really bad, since we need this to go through.&lt;/p&gt;

&lt;p&gt;Having your contract depend on a centralized data provider, can, can cause issues since now your application depends on them being up and honest. So the best solution for this is to the &lt;a href="https://feeds.chain.link/fast-gas-gwei"&gt;fast gas Chainlink price feed&lt;/a&gt;. You'll pull in the fast gas information, and then run your contract with it. You can find out more about Chainlink price feeds in the &lt;a href="https://docs.chain.link/docs/get-the-latest-price"&gt;Chainlink documentation.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, let's grab some default information to get going.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const aggregatorV3InterfaceABI = [{ "inputs": [], "name": "decimals", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "description", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "latestRoundData", "outputs": [{ "internalType": "uint80", "name": "roundId", "type": "uint80" }, { "internalType": "int256", "name": "answer", "type": "int256" }, { "internalType": "uint256", "name": "startedAt", "type": "uint256" }, { "internalType": "uint256", "name": "updatedAt", "type": "uint256" }, { "internalType": "uint80", "name": "answeredInRound", "type": "uint80" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "version", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }]
const priceFeedAddr = "0x562C092bEb3a6DF77aDf0BB604F52c018E4f2814" // swap this for the fast gas address
let priceFeed = new ethers.Contract(priceFeedAddr, aggregatorV3InterfaceABI, wallet)
let gasPrice = 30000000000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need the ABI and address of the fast gas aggregator contract so we can interact with the contract, then we can pop back into our main function. &lt;/p&gt;

&lt;p&gt;Before we go calling our &lt;code&gt;executeThisFunctionQuick&lt;/code&gt; we want to get the fast gas price into our contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;roundData = await priceFeed.latestRoundData()
    // gasPrice = roundData['1'] // this is what you'll use
    console.log("Gas Price is now " + gasPrice)
    let overrides = {
        // The price (in wei) per unit of gas
        gasPrice: gasPrice, // Set the price based on the fast gas here
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will tell us what a safe fast gas is to set. Then, all we have to do is add the &lt;code&gt;overrides&lt;/code&gt; object to our call. This will override the default of the &lt;code&gt;gasPrice&lt;/code&gt; value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let tx = await contractWithSigner.executeThisFunctionQuick(overrides)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it! Now we can be sure that our transactions in our code will be sent out in a fast secure manner. &lt;/p&gt;

&lt;p&gt;To see a full example, check out my &lt;a href="https://gist.github.com/PatrickAlphaC/aa03cefe153700967875a1837d29cbba"&gt;gist on making a simple contract call&lt;/a&gt; with gas cost estimation as well.&lt;/p&gt;

</description>
      <category>solidity</category>
      <category>chainlink</category>
      <category>ethereum</category>
      <category>blockchain</category>
    </item>
    <item>
      <title>Fetch Real-Time Price Data in Solidity</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Fri, 30 Oct 2020 00:56:03 +0000</pubDate>
      <link>https://forem.com/patrickalphac/fetch-real-time-price-data-in-solidity-2ji5</link>
      <guid>https://forem.com/patrickalphac/fetch-real-time-price-data-in-solidity-2ji5</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://blog.chain.link/fetch-current-crypto-price-data-solidity/" rel="noopener noreferrer"&gt;Fetching data&lt;/a&gt; from outside Ethereum or whatever blockchain platform is something that most smart contract engineers need to really empower their dApps. Fetching reliable real-time price data in solidity can be the difference between having a powerful DeFi protocol and a quick "Get poor quick" scheme. &lt;/p&gt;

&lt;p&gt;We've seen a number of incredibly successful defi projects already pull in real-world price data such as &lt;a href="https://aave.com/" rel="noopener noreferrer"&gt;Aave&lt;/a&gt;, &lt;a href="https://www.synthetix.io/" rel="noopener noreferrer"&gt;Synthetix&lt;/a&gt;, and &lt;a href="https://yearn.finance/" rel="noopener noreferrer"&gt;yearn.finance&lt;/a&gt;. These are protocols at the moment that are &lt;a href="https://defipulse.com/" rel="noopener noreferrer"&gt;securing billions of dollars in the defi space&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Having reliable price data means you can make protocols involving borrowing, lending, trading, synthetic assets, backing collateral, and so much more. Get the price data wrong, and you now have a chance to ruin millions of people's lives.&lt;/p&gt;

&lt;p&gt;And just in time for Halloween, a nice spooky platform. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frv8p48s9rbwbeq3ss7eq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Frv8p48s9rbwbeq3ss7eq.png" alt="Dex with bad data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm having too much fun in this post already.&lt;/p&gt;

&lt;h1&gt;
  
  
  Price Data Quality
&lt;/h1&gt;

&lt;p&gt;Whether you're fetching your data from a &lt;a href="https://medium.com/@patrick.collins_58673/stock-api-landscape-5c6e054ee631" rel="noopener noreferrer"&gt;Stock API&lt;/a&gt;, &lt;a href="https://www.coingecko.com/en" rel="noopener noreferrer"&gt;Crypto API&lt;/a&gt;, or your cousin Larry is uploading coin prices for you, you're going to want to know where your price data is coming from, and you'll want to have that &lt;a href="https://feeds.chain.link/" rel="noopener noreferrer"&gt;data decentralized&lt;/a&gt; if you're going to put it in a smart contract. &lt;/p&gt;

&lt;p&gt;So if Larry &lt;em&gt;really&lt;/em&gt; wants to be the price oracle for you, just make sure he isn't the only one to do it.&lt;/p&gt;

&lt;p&gt;In our smart contracts, we need the data to be decentralized, otherwise we might as well just not build the application in blockchain. Having a centralized data provider in a decentralized system defeats the purpose of building on a decentralized platform in the first place!&lt;/p&gt;

&lt;p&gt;So we want to pull from a network of Chainlink oracles to keep our data reliable and decentralized, and have the network pull data from multiple Cryptocurrency API and (if we want another asset class) Stock API providers. &lt;/p&gt;

&lt;p&gt;There are currently two approaches, each approach involves using a &lt;a href="https://medium.com/better-programming/what-is-a-blockchain-oracle-f5ccab8dbd72" rel="noopener noreferrer"&gt;blockchain oracle&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  1. Chainlink Price Feeds
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.chain.link/docs/get-the-latest-price" rel="noopener noreferrer"&gt;Chainlink Price Feeds&lt;/a&gt; are the easiest, most decentralized, and reliable way to fetch real-time price data in your solidity smart contracts. They pull data in from a &lt;a href="https://docs.chain.link/docs/architecture-decentralized-model" rel="noopener noreferrer"&gt;network of Chainlink nodes&lt;/a&gt; and update and aggregate an answer on chain. You can see the responses of all the nodes so you know if any is being malicious. &lt;/p&gt;

&lt;p&gt;The function to get the data is just a &lt;a href="https://www.tutorialspoint.com/solidity/solidity_view_functions.htm" rel="noopener noreferrer"&gt;simple &lt;code&gt;view&lt;/code&gt; function&lt;/a&gt; as well, so you don't even need to spend any gas to fetch the most recent price!&lt;/p&gt;

&lt;p&gt;Here is a sample of how to get the latest ETH/USD price on Kovan, you can try deploying it on &lt;a href="https://remix.ethereum.org/#version=soljson-v0.6.7+commit.b8d736ae.js&amp;amp;optimize=false&amp;amp;evmVersion=null&amp;amp;gist=0c5928a00094810d2ba01fd8d1083581" rel="noopener noreferrer"&gt;remix with this link&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;pragma&lt;/span&gt; &lt;span class="nx"&gt;solidity&lt;/span&gt; &lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="mf"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;contract&lt;/span&gt; &lt;span class="nx"&gt;PriceConsumerV3&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="nx"&gt;AggregatorV3Interface&lt;/span&gt; &lt;span class="nx"&gt;internal&lt;/span&gt; &lt;span class="nx"&gt;priceFeed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="cm"&gt;/**
     * Network: Kovan
     * Aggregator: ETH/USD
     * Address: 0x9326BFA02ADD2366b30bacB125260Af641031331
     */&lt;/span&gt;
    &lt;span class="nf"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;priceFeed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;AggregatorV3Interface&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mh"&gt;0x9326BFA02ADD2366b30bacB125260Af641031331&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="cm"&gt;/**
     * Returns the latest price
     */&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getLatestPrice&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kr"&gt;public&lt;/span&gt; &lt;span class="nx"&gt;view&lt;/span&gt; &lt;span class="nf"&gt;returns &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;int&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="nx"&gt;uint80&lt;/span&gt; &lt;span class="nx"&gt;roundID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
            &lt;span class="nx"&gt;int&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;uint&lt;/span&gt; &lt;span class="nx"&gt;startedAt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;uint&lt;/span&gt; &lt;span class="nx"&gt;timeStamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="nx"&gt;uint80&lt;/span&gt; &lt;span class="nx"&gt;answeredInRound&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;priceFeed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;latestRoundData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="c1"&gt;// If the round is not complete yet, timestamp is 0&lt;/span&gt;
        &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timeStamp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Round not complete&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you deploy the contract on kovan, you can just call the &lt;code&gt;getLatestPrice&lt;/code&gt; function, and boom, you've just fetched the price data!&lt;/p&gt;

&lt;p&gt;This works because we know the proxy contract of the currency pair. We can find a &lt;a href="https://docs.chain.link/docs/reference-contracts" rel="noopener noreferrer"&gt;list of supported pairs&lt;/a&gt; in the chainlink documentation. We can even get the fast gas price in solidity! Meaning, inside your smart contracts you can estimate how much it will cost in gas to make a certain execution. &lt;/p&gt;

&lt;p&gt;The &lt;a href="https://feeds.chain.link/eth-usd" rel="noopener noreferrer"&gt;feeds.chain.link&lt;/a&gt; page has a number of visualizations to show more information on the price pairs, included when it was last updated, what the nodes are responding with, gas costs, and more. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8y6q9asi56hp0sss72ku.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8y6q9asi56hp0sss72ku.png" alt="Fetch price data from Chainlink Price Feeds"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Chainlink API Calls
&lt;/h2&gt;

&lt;p&gt;If you've read my previous blog on getting &lt;a href="https://dev.to/patrickalphac/off-chain-data-in-ethereum-how-to-access-4395"&gt;off-chain data in ethereum&lt;/a&gt;, you know that with Chainlink you can access any API of data source.&lt;/p&gt;

&lt;p&gt;It's no different for fetching price data, you simply make several decentralized &lt;a href="https://docs.chain.link/docs/make-a-http-get-request" rel="noopener noreferrer"&gt;Chainlink API calls&lt;/a&gt;, and aggregate them on chain. If you haven't made a Chainlink API call before, I recommend either checking out my last blog or going through the &lt;a href="https://docs.chain.link/docs/example-walkthrough" rel="noopener noreferrer"&gt;example walkthrough&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&amp;amp;optimize=false&amp;amp;gist=51c6a80fd90b460aa9c1cd61bab78ea0" rel="noopener noreferrer"&gt;Click here for a demo on remix&lt;/a&gt; that shows you how to get stock price data from Alpha Vantage on Ropsten. &lt;/p&gt;

&lt;p&gt;You'd want to do this multiple times with multiple nodes and data providers to make sure that it's decentralized. If you do this, you'll basically have yourself a price feed. &lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;These are some of the tools a number of the defi giants use to get data into their protocols. Let's see what you build out there! Be sure to ping me at &lt;a class="mentioned-user" href="https://dev.to/patrickalphac"&gt;@patrickalphac&lt;/a&gt; on twitter once you do, we'd love to see what you've built!&lt;/p&gt;

&lt;p&gt;Also, join the &lt;a href="https://discord.gg/2YHSAey" rel="noopener noreferrer"&gt;Chainlink developers&lt;/a&gt; discord to join the community, learn, and grow!&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>solidity</category>
      <category>price</category>
      <category>stock</category>
    </item>
    <item>
      <title>Off-chain Data in Ethereum</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Wed, 28 Oct 2020 23:56:51 +0000</pubDate>
      <link>https://forem.com/patrickalphac/off-chain-data-in-ethereum-how-to-access-4395</link>
      <guid>https://forem.com/patrickalphac/off-chain-data-in-ethereum-how-to-access-4395</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;For my first article on Dev.to, I figured I'd speak a little about something I'm familiar with, data &amp;amp; blockchain! And in particular, accessing &lt;a href="https://blog.chain.link/apis-smart-contracts-and-how-to-connect-them/" rel="noopener noreferrer"&gt;off-chain data in ethereum&lt;/a&gt; and all blockchains.&lt;/p&gt;

&lt;p&gt;Getting off-chain data has been an issue for ethereum engineers for a long time. Smart contracts weren't able to do anything more interesting than token transfers. This is great, but it doesn't allow for ethereum to do what it was ultimately designed to do - create smart contracts. &lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ethereum.stackexchange.com/questions/301/why-cant-contracts-make-api-calls" rel="noopener noreferrer"&gt;Because off-chain data in ethereum doesn't work in a deterministic system!&lt;/a&gt;! &lt;/p&gt;

&lt;p&gt;If you clicked that link above, you'll see them talk about API calls in blockchain. Blockchains work because all nodes in the system can come to a &lt;a href="https://polkadot.network/tag/consensus/" rel="noopener noreferrer"&gt;consensus&lt;/a&gt;. Consensus is how all nodes agree upon a value. In a system such as blockchain, were all information is contained, this is really easy. &lt;/p&gt;

&lt;h1&gt;
  
  
  Verifying off-chain data and on-chain
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5 + 5 = 10 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This simple math problem is something that's easy for all nodes on the network to understand. All nodes can add 5 together, and if a node returns a result other than 10, they can easily exclude that node's blocks. &lt;/p&gt;

&lt;p&gt;However if we have something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;API call result from API Y + API call result from API Z &lt;span class="o"&gt;=&lt;/span&gt; 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then no node on the platform will ever come to a consensus! APIs are updated, changed, depreciated, and hacked, so depending on when a node goes to verify this sequence, each node will get wildly different results. This breaks the determinism of the blockchain and means that as part of the native system getting off-chain data doesn't work. &lt;/p&gt;

&lt;p&gt;But.... but we want smart contracts to empower the world right? How can we do that if a smart contract can't even tell me who is president right now?&lt;/p&gt;

&lt;p&gt;Enter oracles&lt;/p&gt;

&lt;h1&gt;
  
  
  Blockchain Oracle
&lt;/h1&gt;

&lt;p&gt;A &lt;a href="https://medium.com/better-programming/what-is-a-blockchain-oracle-f5ccab8dbd72" rel="noopener noreferrer"&gt;blockchain oracle&lt;/a&gt; is any entity that brings off-chain data on-chain, or sends on-chain data to the real world. They are the middleware between the real world and the blockchain. &lt;/p&gt;

&lt;p&gt;They make a transaction on-chain with the off-chain data, and boom! We now have a way to validate the data on-chain, all other nodes just validate the data of the transaction the same way they validate every other transaction. &lt;/p&gt;

&lt;p&gt;Cool! So we are all set right?&lt;/p&gt;

&lt;p&gt;Nope. You're forgetting about a big issue. &lt;/p&gt;

&lt;h1&gt;
  
  
  Decentralism
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fspkl9x0xhacb391ljqz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fspkl9x0xhacb391ljqz6.png" alt="Decentralized oracle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Smart contracts are meant to be decentralized. This means, they have no central point of failure, now if we pull our data from one node, guess what we are doing? &lt;em&gt;We are adding a centralized point of failure&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyl5u7mtgy5bsw39gebvc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyl5u7mtgy5bsw39gebvc.png" alt="Decentralized Oracle"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So how do we address this? &lt;/p&gt;

&lt;p&gt;We pull from a lot of nodes!&lt;/p&gt;

&lt;p&gt;The same principle that makes blockchain work with many nodes securing the system is the principle that powers the idea of decentralized oracles. We also want to pull from multiple off-chain data sources so our ethereum contracts can stay decentralized. &lt;/p&gt;

&lt;h1&gt;
  
  
  What this looks like
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://chain.link/" rel="noopener noreferrer"&gt;Chainlink&lt;/a&gt; is the standard for decentralized oracles on ethereum and blockchains in general. As a chain agnostic technology chainlink is compatible with any chain, but let's look at an ethereum example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make any API call
&lt;/h2&gt;

&lt;p&gt;For this, you'll need the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Metamask/a eth wallet&lt;/li&gt;
&lt;li&gt;Testnet LINK&lt;/li&gt;
&lt;li&gt;Testnet ETH&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://docs.chain.link/docs/install-metamask" rel="noopener noreferrer"&gt;You can follow the guide here to get all this setup.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This link also has a guide on how to do the rest as well!&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1. Decide what data you want
&lt;/h3&gt;

&lt;p&gt;This can be as easy as picking an out an API. For this, let's say we want to get the volume data of ETH/USD from &lt;a href="https://www.cryptocompare.com/" rel="noopener noreferrer"&gt;Cryptocompare&lt;/a&gt;. Here is the API we will be using. &lt;/p&gt;

&lt;p&gt;Note, that the return type is important, we will be writing this tutorial in solidity so we know we want to get the volume as a &lt;code&gt;uint256&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH&amp;amp;tsyms=USD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2. Pick your oracle
&lt;/h3&gt;

&lt;p&gt;First, let's pick an independent chainlink oracle/node to pull our data from. For this, we will just be showing you how to pull from a single node. This is just a centralized example! To decentralize it you just replicate this across multiple independent nodes and then aggregate the responses on-chain.&lt;/p&gt;

&lt;p&gt;You can choose your nodes on node listing services like &lt;a href="https://market.link/" rel="noopener noreferrer"&gt;market.link&lt;/a&gt;. You'll want to switch to a testnet like kovan since we will be testing this on kovan!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F77txbzvtx5yu4mg0bpvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F77txbzvtx5yu4mg0bpvp.png" alt="Chainlink Node Listing service"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can look up the data that you want to get, for example you can search for &lt;code&gt;get &amp;gt; uint256&lt;/code&gt; and see the oracles that return that data. You'll want to grab the oracle address, and then the &lt;code&gt;jobid&lt;/code&gt; of the job that returns the &lt;code&gt;uint256&lt;/code&gt; and makes an &lt;code&gt;httpget&lt;/code&gt; call. &lt;/p&gt;

&lt;p&gt;For our demo, we will use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;address oracle = 0x2f90A6D021db21e1B2A077c5a37B3C7E75D15b7e;
bytes32 jobId = "29fa9aa13bf1468788b7cc4a500a45b8";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this is on Kovan.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3. Setup your remix
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://remix.ethereum.org/#version=soljson-v0.6.7+commit.b8d736ae.js&amp;amp;optimize=false&amp;amp;evmVersion=null&amp;amp;gist=8a173a65099261582a652ba18b7d96c1" rel="noopener noreferrer"&gt;Hit this link!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will bring you directly to remix, where you can compile &amp;amp; deploy your contract! From here, you can follow the &lt;a href="https://docs.chain.link/docs/deploy-your-first-contract" rel="noopener noreferrer"&gt;Chainlink documentation&lt;/a&gt; to get the rest of it sent and your first Chainlink API call made!&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;I hope this gave you some insight into off-chain data and how Chainlink oracles power the web. These decentralized oracles are currently powering many of the top projects in &lt;a href="https://defipulse.com/" rel="noopener noreferrer"&gt;defi&lt;/a&gt;, and this technology is securing billions of dollars. &lt;/p&gt;

&lt;p&gt;More and more engineers are &lt;a href="https://hack.chain.link/" rel="noopener noreferrer"&gt;joining hackathons&lt;/a&gt; to build awesome projects, join the community, and become apart of something great.&lt;/p&gt;

&lt;p&gt;Hope to see you in the &lt;a href="https://discord.gg/2YHSAey" rel="noopener noreferrer"&gt;technical discord&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Main image above from phive2015 from Getty Images Pro&lt;/em&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>solidity</category>
      <category>chainlink</category>
      <category>offchaindata</category>
    </item>
    <item>
      <title>Chainlink Hackathon</title>
      <dc:creator>Patrick Collins</dc:creator>
      <pubDate>Tue, 25 Aug 2020 17:06:51 +0000</pubDate>
      <link>https://forem.com/patrickalphac/chainlink-hackathon-42jp</link>
      <guid>https://forem.com/patrickalphac/chainlink-hackathon-42jp</guid>
      <description>&lt;p&gt;The Chainlink project is proud to announce the Chainlink hackathon! Let's build the next generation of universally connected smart contracts. &lt;/p&gt;

&lt;p&gt;Totaling $40k+ in prizes, this is Chainlink's biggest hackathon of the year. Get the opportunity to learn and work with some of the best in the business and build something stellar. We've seen MAJOR adoption of blockchain in the past few months, with Defi rocketing up over $6B. This is your chance, to be apart of the history of the #4IR. This is the window of opportunity to be apart of something great!&lt;/p&gt;

&lt;p&gt;Truffle, Loopring, DappU, Aave, Tezos, Gelato, ENS, and more are joining as some of the esteemed sponsors - we're looking forward to seeing some awesome projects! &lt;/p&gt;

&lt;p&gt;Register here: &lt;a href="https://hack.chain.link/"&gt;https://hack.chain.link/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>react</category>
    </item>
  </channel>
</rss>
