<?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>DEV Community: Bartek Jakubowski</title>
    <description>The latest articles on DEV Community by Bartek Jakubowski (@bjakubowski).</description>
    <link>https://dev.to/bjakubowski</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%2F167755%2F882a6b3e-6755-4679-9d0d-ee0f3049f189.jpeg</url>
      <title>DEV Community: Bartek Jakubowski</title>
      <link>https://dev.to/bjakubowski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bjakubowski"/>
    <language>en</language>
    <item>
      <title>How to NFT</title>
      <dc:creator>Bartek Jakubowski</dc:creator>
      <pubDate>Tue, 14 Dec 2021 17:46:09 +0000</pubDate>
      <link>https://dev.to/bjakubowski/how-to-nft-3fi8</link>
      <guid>https://dev.to/bjakubowski/how-to-nft-3fi8</guid>
      <description>&lt;h2&gt;
  
  
  What is NFT
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;NFT stands for Non-fungible token&lt;/strong&gt;. Piece of any data (art, audio, video, document or even real object) with unique identifier stored in blockchain.&lt;br&gt;
It is a token assigned to the wallet address. Can be traded using cryptocurrency (ether, tezos, solana) on digital marketplaces (Rarible, OpenSea).&lt;/p&gt;

&lt;p&gt;The majority of NFTs are held on Ethereum blockchain, but there are other ecosystems that supports them (Polygon, Solana, Tezos etc.).&lt;/p&gt;

&lt;p&gt;The interesting part is that blockchain due to its decentralised nature is very immune to attacks or being shut down. That means the person who owns NFT, may be sure it is going to be assigned to its address for a very long time (until the blockchain ecosystem lives).&lt;br&gt;
 &lt;a href="https://ethereum.org/en/developers/docs/intro-to-ethereum/#what-is-a-blockchain"&gt;More about blockchain&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  Minting
&lt;/h2&gt;

&lt;p&gt;Minting is the process of including digital asset into the blockchain.&lt;/p&gt;

&lt;p&gt;The result is information about the asset (NFT) and the owner (wallet address).&lt;/p&gt;

&lt;p&gt;So by minting the NFT You add the information to the blockchain that Your wallet address owns this particular NFT.&lt;/p&gt;
&lt;h2&gt;
  
  
  NFT creator identity
&lt;/h2&gt;

&lt;p&gt;You can create NFT anonymously or by associating it with Your name. &lt;br&gt;
Creators of one of the most popular NFT collection Bored Ape Yacht Club are identified by their nicknames. &lt;/p&gt;

&lt;p&gt;But if You have some reputation as an artist and want NFT people to know You created it, there are some ways to do so:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If You are selling NFT directly, outside the marketplace (more on that later) - You should probably announce Your public wallet address. That way it will be easily identifed on smart contract.&lt;/li&gt;
&lt;li&gt;If You are using marketplace You can link to Your marketplace account or particular NFT collection. Take a look at Lana Denina twitter profile &lt;a href="https://twitter.com/lanadenina"&gt;https://twitter.com/lanadenina&lt;/a&gt;. In the account description she has linked her OpenSea profile proving she is the creator of the particular collection.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How to create NFT
&lt;/h2&gt;

&lt;p&gt;There are few ways to create NFT collection, here are 2 that makes most sense to me:&lt;/p&gt;
&lt;h3&gt;
  
  
  Easy way
&lt;/h3&gt;

&lt;p&gt;On the NFT marketplace (OpenSea, Rarible etc.) there is an option to directly create NFT or entire collection by uploading the asset (music, picture, video). You just have to link Your wallet address (using for example Metamask), upload art and add some info about it.&lt;br&gt;
Then You can choose whether the art should be open to bid or sold by fixed price. &lt;br&gt;
There are few details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have to pay one time initial fee to initialize account. More info on that &lt;a href="https://support.opensea.io/hc/en-us/articles/1500003246262-What-fees-do-I-pay-for-my-first-listing-"&gt;here&lt;/a&gt; .&lt;/li&gt;
&lt;li&gt;After setting the price, You still need to pay gas fee (more info on gas &lt;a href="https://ethereum.org/en/developers/docs/gas/"&gt;here&lt;/a&gt;), to set the ownership of the art You just published to Your wallet address.&lt;/li&gt;
&lt;li&gt;Marketplaces usually have commission fees and/or minting fees paid by buyers and/or sellers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For test purposes You can use &lt;a href="https://testnets.opensea.io/"&gt;OpenSea testnet&lt;/a&gt; to go through the entire process. It uses fake ETH which you should request from &lt;a href="https://ethereum.org/en/developers/docs/networks/#testnet-faucets"&gt;faucets&lt;/a&gt;, that way You will not use any real money and see how the process looks like.&lt;/p&gt;

&lt;p&gt;I used that way to publish photo of my cat (&lt;a href="https://testnets.opensea.io/assets/0x88b48f654c30e99bc2e4a1559b4dcf1ad93fa656/114843971092706458663467244611519273191415456962500201496962118017698079178753"&gt;LINK&lt;/a&gt;) as NFT and set the price to 0.1 ETH.&lt;/p&gt;

&lt;p&gt;More:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ethereum.org/en/developers/docs/networks/#testnets"&gt;More info on ethereum testnets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://decrypt.co/resources/beginners-guide-to-nfts-how-to-mint-a-non-fungible-token-on-ethereum"&gt;Step by step guide to create NFT on OpeSea marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt; &lt;a href="https://visionaryart.io/nft/marketplace-comparison/"&gt;https://visionaryart.io/nft/marketplace-comparison/&lt;/a&gt; - a nice comparison of major NFT marketplaces with fees.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  More difficult way
&lt;/h3&gt;

&lt;p&gt;Create smart contract, deploy it to the public blockchain and let people mint the NFT with price You set on the contract.&lt;br&gt;
It requires smart contract coding and creating user interface to allow people to see the art and mint it. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smart contract - the program that runs on the blockchain and has all the logic that describes collection name, how many NFTs will be minted, who is able to mint the NFT and what is the price of minting it.&lt;/li&gt;
&lt;li&gt;By creating the smart contract - You sign it with your own wallet address, proving that NFT was created by You.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found  &lt;a href="https://docs.alchemy.com/alchemy/tutorials/how-to-create-an-nft/nft-price"&gt;nice basic guide by Alchemy on how to set a price of NFT&lt;/a&gt; &lt;/p&gt;
&lt;h2&gt;
  
  
  How it looks
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The NFT standard is known as &lt;code&gt;ERC721&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;OpenZeppelin essentially implements the NFT standard for us and then lets us write our own logic on top of it to customize it&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NFT is actually a JSON file with the &lt;code&gt;metadata&lt;/code&gt; that looks something like this.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sleeping Cat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;description&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;He is liquid. He fits everywhere&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;link-to-the-image&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;




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

&lt;p&gt;Almost every &lt;strong&gt;NFT&lt;/strong&gt; has a name, description, and a link to something like a video, image, etc. Additionally we can add custom properties if we want to. This is all part of the &lt;code&gt;ERC721&lt;/code&gt; standards and it allows people to build websites on top of NFT data&lt;/p&gt;

&lt;h2&gt;
  
  
  Digital art format
&lt;/h2&gt;

&lt;p&gt;The main idea behind NFT is to store information about ownership of each piece on decentralised database (blockchain) forever (or until blockchain is alive). &lt;br&gt;
But knowing how the NFT looks like - we see that its just an object pointing to the values. So the asset itself also have to be stored in decentralised database to make sure it will not disappear one day. &lt;/p&gt;

&lt;p&gt;When creating the JSON object of NFT, make sure the link to the digital asset is not a link to uploaded image on sites like "imgur.com" or any other centralised data storage. &lt;br&gt;
Why? Because its using normal servers, so when the service will disappear one day - the NFT object will point to non existing asset.&lt;/p&gt;

&lt;p&gt;There are few ways to make sure Your NFT asset wont break:&lt;/p&gt;

&lt;h3&gt;
  
  
  SVG
&lt;/h3&gt;

&lt;p&gt;Scalable Vector Graphic - vector image format for two-dimensional graphics with support for interactivity and animation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.w3schools.com/graphics/svg_intro.asp"&gt;Here&lt;/a&gt; is a w3 schools tutorial on how to create SVG.&lt;/p&gt;

&lt;p&gt;How we use SVG to store simple images:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create SVG&lt;/li&gt;
&lt;li&gt;Encode SVG to Base64 format here &lt;a href="https://www.utilities-online.info/base64"&gt;https://www.utilities-online.info/base64&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Check if its working. Paste &lt;code&gt;data:image/svg+xml;base64&amp;lt;INSERT_YOUR_BASE64_ENCODED_SVG_HERE&amp;gt;&lt;/code&gt; into the browser and see if its showing the same art You encoded before.&lt;/li&gt;
&lt;li&gt;Store the link You just tested in NFT object&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  IPFS (larger assets)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;IPFS is a distributed system for storing and accessing files, websites, applications, and data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://www.pinata.cloud/"&gt;Pinata&lt;/a&gt; service to store NFT art on IPFS decetralized data storage system.&lt;/p&gt;

&lt;p&gt;It supports multiple file formats so You can upload audio, video, picture, doc etc.&lt;/p&gt;

&lt;p&gt;More info on IPFS &lt;a href="https://docs.ipfs.io/concepts/what-is-ipfs/"&gt;https://docs.ipfs.io/concepts/what-is-ipfs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please be aware that IPFS is a public network! This means anything uploaded through IPFS will be accessible by anybody on the network&lt;/p&gt;

&lt;h2&gt;
  
  
  This is it
&lt;/h2&gt;

&lt;p&gt;I guess this is it when it comes to my basic understanding of how to create NFT, how it looks like and what the fresh NFT artist should be aware of, while creating first collection.&lt;/p&gt;

</description>
      <category>nft</category>
      <category>blockchain</category>
      <category>ethereum</category>
      <category>solidity</category>
    </item>
    <item>
      <title>My First Two Weeks in web3</title>
      <dc:creator>Bartek Jakubowski</dc:creator>
      <pubDate>Mon, 01 Nov 2021 09:01:49 +0000</pubDate>
      <link>https://dev.to/bjakubowski/my-first-two-weeks-in-web3-5adl</link>
      <guid>https://dev.to/bjakubowski/my-first-two-weeks-in-web3-5adl</guid>
      <description>&lt;p&gt;Table of contents&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why web3?&lt;/li&gt;
&lt;li&gt;Few articles I started with&lt;/li&gt;
&lt;li&gt;First steps&lt;/li&gt;
&lt;li&gt;
First project

&lt;ul&gt;
&lt;li&gt;Notes&lt;/li&gt;
&lt;li&gt;Mining&lt;/li&gt;
&lt;li&gt;Deploy contract&lt;/li&gt;
&lt;li&gt;Gas limit&lt;/li&gt;
&lt;li&gt;Funding contract&lt;/li&gt;
&lt;li&gt;Random number problem&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
Tools

&lt;ul&gt;
&lt;li&gt;Final website&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;What's next?&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Like a lot of people I got interested in crypto after it already became famous, especially famous around Bitcoin prices. Around 2 years ago I started to read about it, invested some spare cash, make some small profit and dig deeper into the topic for a while.&lt;/p&gt;

&lt;p&gt;After that time I got more and more involved in following technical discussions and developers (mostly JavaScript/TypeScript) on Twitter. In the last months the discussion about decentralized internet was really taking over my twitter bubble dashboard, mostly thanks to Nader Dabit which I was following before he went full on web3.&lt;/p&gt;

&lt;p&gt;The concept of decentralized internet, alternative to big tech companies(Amazon, Google, Microsoft) oligopoly seemed very interesting. Then I started to read about Decentralized Finance (DeFi), smart contracts, NFTs - it all seem to be ideas that has real potential to change the internet as we know today.&lt;/p&gt;

&lt;p&gt;I like to learn about the subject on the real examples, by getting my hands dirty and making mistakes. So I decided to dedicate some of my free time to learn more about it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Few articles I started with
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dabit3.medium.com/how-to-get-into-ethereum-crypto-web3-as-a-developer-4723d8ddaa6b"&gt;How to Get Into Ethereum | Crypto | Web3 as a Developer by Nader Dabit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://camiinthisthang.hashnode.dev/wthisweb3"&gt;I created a Web3 app and here's what I learned, by Camila Ramos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vitto.cc/web3-and-solidity-smart-contracts-development-roadmap/"&gt;Complete Web3.0 And Solidity Development Roadmap 2021, by Vittorio Rivabella&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course there were more, I got suck by the rabbit hole of web3 discussions, threads and articles on twitter. Did not note all which I read but these 3 I can remember.&lt;/p&gt;

&lt;h1&gt;
  
  
  First steps
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://ethereum.org/en/developers/docs/"&gt;Ethereum docs&lt;/a&gt; - These i started to read immediately after I decided to learn more about web3. Its a great resource and frankly I was surprised its written so well. You will learn there about accounts, blocks, mining, minting, smart contracts, gas and more. Highly recommend it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Joined some great Discord channels - its easier to help each other and learn from others mistakes, few i can recommend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/CatMcGeeCode/status/1448282741288710155"&gt;BlockchainJS, created by Cat McGee&lt;/a&gt; - community created for JS developers that wants to learn more about web3&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://buildspace.so/"&gt;Buildspace&lt;/a&gt; - the text from their website says it all: "If you're a dev that's curious about web3 but not sure where to start -- this is the spot for you. Learn + start building cool stuff right now, earn NFTs, access secret work opportunities in crypto.".&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/developer_dao"&gt;Developer DAO&lt;/a&gt; - You have to mint a free token to join the community but its worth it. One of the creators is mentioned earlier Nader Dabit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  First project
&lt;/h1&gt;

&lt;p&gt;On BlockchainJS there was a discussion on how to start learning about web3 and which tutorial to watch. We all decided that buildspace is the best resource and started build our first app, sharing experience on the server.&lt;/p&gt;

&lt;p&gt;The app is &lt;strong&gt;Wave Portal:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use basic Solidity to develop smart contract&lt;/li&gt;
&lt;li&gt;Run and test contract locally&lt;/li&gt;
&lt;li&gt;Write and deploy smart contract on blockchain to track what user waved at us, from which wallet address.&lt;/li&gt;
&lt;li&gt;Deploy contract to Ethereum Rinkeby network - which is a test network where we use fake eth&lt;/li&gt;
&lt;li&gt;Connect wallet to the app&lt;/li&gt;
&lt;li&gt;Randomly rewarding useres that waved at us with fake rinkeby eth&lt;/li&gt;
&lt;li&gt;Build frontend in React and connect it with deployed contract&lt;/li&gt;
&lt;li&gt;Let users submit a message along with their wave. Have that data saved on the blockchain. Show that data on our site so anyone can come to see all the people who have waved at us and their messages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transaction&lt;/strong&gt; - its any action we want to perform on Ethereum blockchain. For example: deploy smart contract, send someone ETH, in our app it is adding waves from application&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://etherscan.io/"&gt;Etherscan&lt;/a&gt;&lt;/strong&gt; is &lt;strong&gt;a tool to help you view data regarding any pending or confirmed Ethereum blockchain transactions&lt;/strong&gt;. Since Ethereum is a public, open blockchain, whenever anyone interacts with it the action is recorded into the transaction history and it is open for anyone to see.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Mining
&lt;/h3&gt;

&lt;p&gt;Any transaction on blockchain needs to be mined by miners. It means they are picking it up, perform calculations to add them to the block using computer power and claim reward for it. Once the transaction is mined, it is then broadcasted to the blockchain as a legit transaction. From there, everyone updates their copy of the blockchain.&lt;/p&gt;

&lt;p&gt;The WavePortal is build on Ethereum Rinkeby test network so I did not have to use real ETH value. Testnets are run by actual miners and mimic real-world scenarios. So this is how the full transaction is being added to blockchain:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Broadcast the transaction (wave with message was done by the specific users wallet address)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wait for it to be picked up by actual miners&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wait for it to be mined&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Wait for it to be broadcasted back to the blockchain telling all the other miners to update their copies&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But how to test it locally to see if waving works? I would have to have ETH to pay for &lt;strong&gt;&lt;a href="https://ethereum.org/en/developers/docs/gas/"&gt;transactions gas&lt;/a&gt;&lt;/strong&gt; - in real world I would use real ETH*&lt;em&gt;.&lt;/em&gt;*&lt;br&gt;
In order to add fake ETH to my wallet address I needed to claim fake ETH from something which is called &lt;strong&gt;faucet.&lt;/strong&gt; There were few recommended by the buildspace team.&lt;/p&gt;
&lt;h3&gt;
  
  
  Deploy contract
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To &lt;strong&gt;deploy&lt;/strong&gt; a contract we need to login to network to authanticate as a user - thats where we need wallet public and private key.&lt;/li&gt;
&lt;li&gt;After deploy, I was receiving contract address - I could look it up on &lt;a href="https://etherscan.io/"&gt;https://etherscan.io/&lt;/a&gt; . In my case it was &lt;a href="https://rinkeby.etherscan.io/"&gt;https://rinkeby.etherscan.io/&lt;/a&gt; - etherscan for Rinkeby test network.&lt;/li&gt;
&lt;li&gt;When I was building the smart contract and some basic version was already deployed to the blockchain - every time i wanted to make a change i had to &lt;strong&gt;redeploy&lt;/strong&gt; the whole contract. Basically it was brand new, not the updated version of an old one.
Why? Because smart contract are &lt;strong&gt;immutable,&lt;/strong&gt; they ****cant change.
So if I waved few times on a previous version of contract I would have to forget about it - i wont be using it anymore. After redeploy i would link my app with shiny fresh contract.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Gas limit
&lt;/h3&gt;

&lt;p&gt;The next part of the building app was to send eth (from test network) to the person who waved at my portal randomly. The problem is: if the contract sends a prize then the waver need to pay &lt;strong&gt;more gas&lt;/strong&gt; since we're running &lt;strong&gt;more code&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Estimating gas is a hard problem and an easy workaround for this is to set a limit.&lt;/li&gt;
&lt;li&gt;on client side I added &lt;code&gt;wavePortalContract.wave(message, { gasLimit: 300000 })&lt;/code&gt; to make the user pay a set amount of gas of 300,000. And, if they don't use all of it in the transaction they'll automatically be refunded.&lt;/li&gt;
&lt;li&gt;So, if a transaction costs 250,000 gas then &lt;strong&gt;after&lt;/strong&gt; that transaction is finalized that 50,000 gas left over that the user didn't use will be refunded&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Funding contract
&lt;/h3&gt;

&lt;p&gt;Why? T*&lt;em&gt;o send ETH to someone, our contract needs to have ETH on it.&lt;/em&gt;* We are not sending the eth directly from our account. The contract itself has its own balance, provided by us :)&lt;/p&gt;

&lt;p&gt;How this works is when we first deploy the contract, we "fund" it.&lt;/p&gt;

&lt;p&gt;Setting constructor properly makes contract payable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="nx"&gt;payable&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;We have been constructed!&lt;/span&gt;&lt;span class="dl"&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;After we deployed funded contract - we can check it out on Etherscan to see the balance. In my case it looks like in below screen - i funded m contract with 0.01 fake ETH. Its missing 0.0002 eth because it was randomly given to some of the "wavers" on my app.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ecvjdMXo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://bjakubowski.com/static/11d51b014d1b1da676bd7000b044e0f4/ef9e5/funded-contract.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ecvjdMXo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://bjakubowski.com/static/11d51b014d1b1da676bd7000b044e0f4/ef9e5/funded-contract.png" alt="font types" width="607" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://rinkeby.etherscan.io/"&gt;Rinkeby Etherscan&lt;/a&gt; you can also validate the contract itself and view the transactions that have taken place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Random number problem
&lt;/h3&gt;

&lt;p&gt;Not mine, direct quote from buildspace. it is quite interesting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Normally when you generate a random normally in a program, &lt;strong&gt;it will take a bunch of different numbers from your computer as a source of randomness&lt;/strong&gt; like: the speed of the fans, the temperature of the CPU, the number of times you've pressed "L" at 3:52PM since you've bought the computer, your internet speed, and tons of other #s that are difficult for you to control. It takes &lt;strong&gt;all&lt;/strong&gt; these numbers that are "random" and puts them together into an algorithm that generates a number that it feels is the best attempt at a truly "random" number&lt;/li&gt;
&lt;li&gt;On the blockchain, there is &lt;strong&gt;nearly no source of randomness&lt;/strong&gt;. Everything the contract sees, the public sees. Because of that, someone could game the system by just looking at the smart contract, seeing what numbers it relies on for randomness, and then the person could give it the exact numbers they need to win.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Tools
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Ethereum development environment. Build local blockchain server and deploy contracts
&lt;a href="https://hardhat.org/"&gt;https://hardhat.org/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Client side done with React js&lt;/li&gt;
&lt;li&gt;Metamask - ETH wallet&lt;/li&gt;
&lt;li&gt;Alchemy - &lt;a href="https://www.alchemy.com/"&gt;https://www.alchemy.com/&lt;/a&gt; - blockchain layer - instead setting up AWS , Google Cloud or MS Azure.
Alchemy helps us broadcast our contract creation transaction so that it can be picked up by miners as quickly as possible&lt;/li&gt;
&lt;li&gt;Etherscan is a place that just shows us the state of the blockchain and helps us see where our transaction is at.
The etherscan for rinkeby testnet: &lt;a href="https://rinkeby.etherscan.io/"&gt;https://rinkeby.etherscan.io/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Faucets&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final website
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://b-jakubowski.github.io/waveportal-starter-project/"&gt;Project website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;You have to have installed and set up &lt;a href="https://metamask.io/"&gt;Metamask&lt;/a&gt; in your browser to play with it&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What's next?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Crypto zombies&lt;/li&gt;
&lt;li&gt;Web3 app to show my NFT collection built with Solidity&lt;/li&gt;
&lt;li&gt;Learn more about solidity&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dapps</category>
      <category>ethereum</category>
      <category>blockchain</category>
      <category>react</category>
    </item>
    <item>
      <title>My morning healthy habits. Or 6 ways to improve Your mood and productivity before writing any code.</title>
      <dc:creator>Bartek Jakubowski</dc:creator>
      <pubDate>Sun, 01 Aug 2021 14:43:57 +0000</pubDate>
      <link>https://dev.to/bjakubowski/my-morning-healthy-habits-or-6-ways-to-improve-your-mood-and-productivity-before-writing-any-code-52o2</link>
      <guid>https://dev.to/bjakubowski/my-morning-healthy-habits-or-6-ways-to-improve-your-mood-and-productivity-before-writing-any-code-52o2</guid>
      <description>&lt;h1&gt;
  
  
  Drink water
&lt;/h1&gt;

&lt;p&gt;After night your body is pretty dehydrated. To keep it well functioning and boost productivity - drink water (with a pinch of sea salt - magnesium, potasium, electrolytes) after You wake and and remember to keep drinking it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.hydrationforhealth.com/en/hydration-tools/hydration-calculator/"&gt;Water intake calculator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.healthline.com/health/hydration-top-iphone-android-apps-drinking-water"&gt;Few apps that help keeping track of water intake&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reduceinjuries.com/blog/adding-sea-salt-to-your-daily-routine/"&gt;Adding sea salt to your daily routine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Get morning sun exposure
&lt;/h1&gt;

&lt;p&gt;Right after You wake up (or 14-16 hours before You go to sleep) and drink some water (see above) go out and get sun exposure without any glasses on your nose.&lt;br&gt;
Depending on how cloudy it is outside and which place on Earth you live in You can keep it around 10 minutes or extend it to 30 minutes period.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=aXvDEmo6uS4&amp;amp;t=1020s"&gt;Details: Huberman Lab Podcast ep. 28&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Take a walk
&lt;/h1&gt;

&lt;p&gt;Go out for a 15-30 minutes walk/run/bicycle ride every morning. It perfectly combines with sun exposure. It has very positive influence on Your nervous system, helps lowering anxiety.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=aXvDEmo6uS4&amp;amp;t=727s"&gt;Details: Huberman Lab Podcast ep. 28&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  5 minute quick gymnastics
&lt;/h1&gt;

&lt;p&gt;Since we usually sit at least 8 hours a day during our workday, it may be a good idea to do a simple gymnastics and stretches in the morning.&lt;br&gt;
I use this set of exercises&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=BVPk4xw-Jw0&amp;amp;list=PLuILYsRx9zAt7U2o2GqJjkE9KtS3pfzzC"&gt;5 min gymnastics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Meditation
&lt;/h1&gt;

&lt;p&gt;You can combine it with taking a walk, there are few guides to take mindful walks.&lt;br&gt;
But if You want to take Your mind and focus to another level - Naval Ravikant suggests doing 60 minutes meditation at least 60 days.&lt;br&gt;
To me its a bit extreme to extend morning routine with additional 60 minutes meditation, but I am keeping in mind to include daily meditation practice.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/naval/status/1261481222359801856"&gt;Naval on Twitter on meditation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/naval/status/1159245225350406146"&gt;Naval replying about thoughts during meditaton&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a&gt;Naval on learning to enjoy being alone&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Delay caffeine
&lt;/h1&gt;

&lt;p&gt;The best time for coffee is 90-120 minutes after You wake up, to not disturb Your natural high cortysol level in the morning.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.healthline.com/nutrition/best-time-to-drink-coffee#cortisol-coffee"&gt;Best time to drink coffee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=aXvDEmo6uS4&amp;amp;t=1680s"&gt;Delay caffeine / Huberman Lab&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tim.blog/2021/07/06/andrew-huberman/"&gt;https://tim.blog/2021/07/06/andrew-huberman/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hubermanlab.com/maximizing-productivity-physical-and-mental-health-with-daily-tools/"&gt;https://hubermanlab.com/maximizing-productivity-physical-and-mental-health-with-daily-tools/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/fotografia.legal/"&gt;Photo by Joseph Redfield from Pexels&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>motivation</category>
      <category>devjournal</category>
      <category>tips</category>
    </item>
    <item>
      <title>Interview for frontend notes - behavioral questions</title>
      <dc:creator>Bartek Jakubowski</dc:creator>
      <pubDate>Sun, 07 Mar 2021 08:26:20 +0000</pubDate>
      <link>https://dev.to/bjakubowski/interview-for-frontend-notes-behavioral-questions-4dma</link>
      <guid>https://dev.to/bjakubowski/interview-for-frontend-notes-behavioral-questions-4dma</guid>
      <description>&lt;p&gt;This is it. You earn too little, project is too boring, technologies used in the company are old and there are no space left to grow. Its time to consider changing a job.&lt;br&gt;
Every now and then there is a time in software engineer career when such feelings occur.&lt;/p&gt;

&lt;p&gt;If you've had enough and you feel its time to change, be prepared to answer few behavioral questions I listed below. Your answers will give the interviewer some idea of what kind of person You are, whats Your motivations and will You be a good fit for their company.&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Whats Your employment situation?&lt;/li&gt;
&lt;li&gt;Why do You want to change job?&lt;/li&gt;
&lt;li&gt;What did You like about previous job?&lt;/li&gt;
&lt;li&gt;What are You looking for in the next job?&lt;/li&gt;
&lt;li&gt;What should the next company do better, that will be satisfying for You as their employee?&lt;/li&gt;
&lt;li&gt;What sort of companies do You see yourself in? Small software house ? Startup? A product company, or a body-lending company ?&lt;/li&gt;
&lt;li&gt;Why do you want to work for us?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What are Your responsibilities in current role?&lt;/li&gt;
&lt;li&gt;What tech stack were You working in?&lt;/li&gt;
&lt;li&gt;What technologies are You most comfortable with?&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What technologies, programming languages would You want to work with in the future?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What types of projects did You participate in?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Did You work in Agile methodologies? Are You familiar with Scrum?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How big were the teams You were working in?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Are You more comfortable working in small or big teams?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Learning attitude
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What are You learning in free time? What do You do to expand Your knowledge ?&lt;/li&gt;
&lt;li&gt;Do You have a side project?&lt;/li&gt;
&lt;li&gt;Do You contribute to OSS?&lt;/li&gt;
&lt;li&gt;What was the last good course You watched/took ?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Soft skills
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;What do You do when you are facing a problem, You had never faced before ?&lt;/li&gt;
&lt;li&gt;What is your greatest professional accomplishment?&lt;/li&gt;
&lt;li&gt;What is your biggest professional failure?&lt;/li&gt;
&lt;li&gt;Did You work with difficult people? How was it? Are You able to work with such people?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Formalities
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;When are You available?&lt;/li&gt;
&lt;li&gt;What are Your salary expectations?&lt;/li&gt;
&lt;li&gt;What type of contract are You interested in? Employment or B2B?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Your questions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;How many stages of the recruitment process You have?&lt;/li&gt;
&lt;li&gt;How big are the development teams?&lt;/li&gt;
&lt;li&gt;Are You working in Agile methodologies? Scrum? Kanban?&lt;/li&gt;
&lt;li&gt;To which team i am being recruited to?&lt;/li&gt;
&lt;li&gt;What kind of projects am I going to work in?&lt;/li&gt;
&lt;li&gt;Whats the coulture of the company?&lt;/li&gt;
&lt;li&gt;Is there a clear career path, development opportunities ?&lt;/li&gt;
&lt;li&gt;Is there a clear process of pay raise in the company ?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are some example questions You may face during early recruitment process. Of course, its unlikely that You will have to answer to all of them, but preparing for most will be benefitial and give You confidence.&lt;/p&gt;

</description>
      <category>career</category>
    </item>
  </channel>
</rss>
