<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aikdanai Sidhikosol on Medium]]></title>
        <description><![CDATA[Stories by Aikdanai Sidhikosol on Medium]]></description>
        <link>https://medium.com/@aikdanai.s?source=rss-f78c3c8faf63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UdjNKw5BIn1lWaO2KfbaMg.jpeg</url>
            <title>Stories by Aikdanai Sidhikosol on Medium</title>
            <link>https://medium.com/@aikdanai.s?source=rss-f78c3c8faf63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 21:58:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aikdanai.s/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Solidity Made Easy with Hardhat]]></title>
            <link>https://medium.com/cleverse/solidity-made-easy-with-hardhat-91a6972362bb?source=rss-f78c3c8faf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/91a6972362bb</guid>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <dc:creator><![CDATA[Aikdanai Sidhikosol]]></dc:creator>
            <pubDate>Tue, 27 Sep 2022 06:44:46 GMT</pubDate>
            <atom:updated>2022-11-23T13:54:12.937Z</atom:updated>
            <content:encoded><![CDATA[<h3>Solidity Made Easy with Hardhat | Cleverse Web3 Series</h3><p>As a Solidity Developer who started with Remix, I wondered if there was a better way to create a smart contract.</p><p>And I believe I’ve found the solution with <strong>Hardhat</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjXXQpJb26ALoUXQ7_jPEw.png" /><figcaption>A beautiful thumbnail by our designer at Cleverse</figcaption></figure><p>In my <a href="https://medium.com/@aikdanai.s/welcome-to-the-world-of-web-3-0-d16b61235dc4">Web 3.0 article</a>, I mentioned Smart Contracts as one of the most powerful tools for achieving Web 3.0 and as one of the factors that have led to Ethereum’s current success.</p><blockquote><strong>Disclaimer:</strong> This article will not go into the nitty-gritty technical details of Solidity. The goal is to show how to use Hardhat as the Solidity development environment.</blockquote><h3>Before Hardhat, there was Remix</h3><p>Let’s talk a bit about Remix first.</p><p>What exactly is Remix? <a href="http://remix.ethereum.org/">Remix</a> is a smart contract development IDE. It’s likely the first thing you learn when learning smart contract development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdSp17RGzEypd4YrYN5vkw@2x.png" /><figcaption><a href="https://remix.ethereum.org/">remix.ethereum.org</a></figcaption></figure><p>It has served its purpose admirably, whether for learning, prototyping, or development. Even though it is adequate, I want to look for something that better suits my needs.</p><h3>Hardhat!</h3><p>Hardhat is a development environment that streamlines compiling, deploying, debugging, and, my personal favorite, testing smart contracts.</p><p>This article will walk you through the steps of creating, compiling, testing, deploying, and verifying smart contract projects using Hardhat.</p><h3>Article Outline</h3><ol><li>Creating Project with Hardhat</li><li>Implementing Smart Contract</li><li>Automated Test with Hardhat</li><li>Deploying with Hardhat Script</li><li>Verifying Code on Blockchain Explorer (withHardhat Script)</li></ol><h3>1. Creating the project</h3><p>Let’s start with an npm project, then install hardhat and create a TypeScript project with it.</p><pre>npm init</pre><pre>npm install --save-dev hardhat</pre><pre>npx hardhat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*X8rgsMV3O6forwadMfuxPQ@2x.png" /><figcaption>Select TypeScript when creating a sample project</figcaption></figure><p>Then the project structure should be like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*avYsfUunZNnQF8z3AonQMg@2x.png" /><figcaption>Project Structure</figcaption></figure><p><strong>The meaning of each important files</strong></p><ul><li>hardhat.config.ts Configuration file (<a href="https://hardhat.org/hardhat-runner/docs/config#configuration">Learn more here</a>)</li><li>contracts/ Directory for Smart Contract source code</li><li>scripts/ Directory for scripts, e.g., deploy scripts</li><li>test/ Directory for automated test files</li></ul><p>Change the test command in package.json to this:</p><pre>&quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;hardhat test&quot;<br>}</pre><h4>Environment file</h4><p>Create .env by duplicate .env.example</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*GKdxwCBvHMxPppx8hQNkvA@2x.png" /><figcaption>The real .env</figcaption></figure><p>Configure .env to the real values. I’ll be using Ethereum Ropsten as the network for this article. (For the ROPSTEN_URL using this site: <a href="https://rpc.info/">rpc.info</a> is a good way to find one)</p><blockquote>This article was written when Ropsten was still alive. But it will be deprecated and shut down soon (Q4 2022), so you might need to use another network.<br><a href="https://blog.ethereum.org/2022/06/21/testnet-deprecation/">Read more</a></blockquote><h4>🏁 Checkpoint #1: Project created</h4><p>At this point, there should be a directory containing sample code, which you can test by running the following command:</p><pre>npm run test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*MzV9_0yF5yX8enxaNPnTtw@2x.png" /><figcaption>Test results</figcaption></figure><h3>2. Implementing the contract</h3><p>For this article, I’ll make a LoveLetter contract to send a lovely message (with money attached) to a recipient.</p><p>Create LoveLetter.sol in contracts/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*qbKqflW2wWJOZX-PMBJTLg@2x.png" /><figcaption>LoveLetter.sol in contracts</figcaption></figure><h4>The requirements:</h4><ul><li>Send letters containing Ether.</li><li>Receive letters with Ether. It should only be callable by the receiver.</li><li>Read the message contained within a letter. (We won’t be preventing others from reading the message.)</li></ul><blockquote>⚠️ <strong>Challenge1</strong>: Before reading the code below, try implementing it with the help from contracts/Greeter.sol.</blockquote><h4>🏁 Checkpoint #2: Contract implemented</h4><p>At this point, the LoveLetter.sol is finished. Here are my implementations:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4d5ba0ea7ffb357090294d0b1ccabce/href">https://medium.com/media/f4d5ba0ea7ffb357090294d0b1ccabce/href</a></iframe><p>Check the contract by running this command:</p><pre>npx hardhat compile</pre><p>The result should be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*hWltDWzHbb2vf9BtvvIufQ@2x.png" /></figure><p>Next, let’s use my favorite features of Hardhat. Automated Test!</p><h3>3. Testing the contract</h3><p>Create the test file loveletter.ts in test/.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*6iTBQGfsbKw6oJzbulvBXA@2x.png" /><figcaption>loveletter.ts in test/</figcaption></figure><h4>Implement tests for these use cases:</h4><ul><li>The contract can be deployed successfully.</li><li>Send the letter successfully, then read the correct values from it.</li><li>The letter can’t be opened by someone that’s not the receiver.</li><li>The receiver opens the letter successfully, receiving the Ether within.</li></ul><blockquote>⚠️ <strong>Challenge2</strong>: Before reading the code below, try implementing it with the help from test/index.ts.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f82280107853683b212e870d98349473/href">https://medium.com/media/f82280107853683b212e870d98349473/href</a></iframe><h4>Running tests</h4><p>Use the command:</p><pre>npm run test</pre><p>The result will be something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*alcxJ5Ca1ab70XZjBFkqkA@2x.png" /><figcaption>The result</figcaption></figure><blockquote>[send] 0 1000000000000000000 ...What is this?</blockquote><p>And that would beconsole.log() for solidity!</p><p>This console.log is inside send function in my implementation of the contract. <a href="https://hardhat.org/hardhat-network/docs/reference#console-log">Read more about console.log</a></p><h4>🏁 Checkpoint #3: Contract tested</h4><p>At this point, the contract has been tested. Next, let’s deploy it onto the network!</p><blockquote>⚠️<strong> Challenge3:</strong> Add two test cases:<br>1. Revert the transaction if the receiver tries to open an opened letter.<br>2. Send a letter (which would has an id of 1) successfully.<br>My implementation will be in the GitHub repository at the end of this article.</blockquote><h3>4. Deploying the contract</h3><blockquote>⚠️ <strong>Challenge4</strong>: Try deploying the contract on Remix first!</blockquote><h4>Deploy with Hardhat script</h4><p>Create the script atscripts/deploy-loveletter.ts</p><blockquote>⚠️ <strong>Challenge5</strong>: Try implementing the script with <em>scripts/deploy.ts</em> as an example.</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f29c2cdd851738b37cd12fda5e283368/href">https://medium.com/media/f29c2cdd851738b37cd12fda5e283368/href</a></iframe><p>Then run the command below for deploying:</p><pre>npx hardhat run scripts/deploy-loveletter.ts --network ropsten</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ij48mSllrtDsyJOb44GJJg@2x.png" /><figcaption>Result of the deployment</figcaption></figure><h4>🏁 Checkpoint #4: Contract deployed</h4><p>At this point, the smart contract is deployed on the blockchain.</p><p>You can see your deployed contract on <a href="https://ropsten.etherscan.io/">https://ropsten.etherscan.io/</a> (or whatever blockchain explorer for the network of your choice)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VuN4afXIwP3BPykIpGCo7g@2x.png" /><figcaption>Contract is on <a href="https://ropsten.etherscan.io/">ropsten.etherscan.io</a> !</figcaption></figure><p>A thing might be a little different for you, namely the Contract tab without the green checkmark.</p><p>The checkmark indicates that the contract has been verified with readable source code. So let’s go and do that!</p><h3>5: Verifying the source code</h3><p>Even though anyone can deploy smart contracts on the blockchain (<a href="https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-thai-version-6c8c24da3ca1">Permissionless</a>) and see the code of all smart contracts. There’s a catch.</p><p>The code is a bytecode, which is not human-readable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdgPCpL8Q_C5jQgF6E4PeA@2x.png" /><figcaption>Bytecode of the contract</figcaption></figure><p>If contract developers want others to be able to read the source code, they will have to verify the contract with the original source code first.</p><p>And with hardhat, doing so is easier than ever!</p><pre>npx hardhat verify --network ropsten {{contractAddress}}</pre><p>Now, anyone will be able to read the code!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDti5MONsLpfxVt5_G9DDA@2x.png" /><figcaption>Verified source code</figcaption></figure><blockquote>⚠️ <strong>Challenge6</strong>: Try verify the code on blockchain explorer itself.</blockquote><h4>🏁 Checkpoint #5: Contract code verified</h4><p>At this point, we have a tested, deployed, and verified contract on the network!</p><blockquote>⚠️ <strong>Challenge7</strong>: Try <a href="https://hardhat.org/tutorial/deploying-to-a-live-network">Deploy</a> &amp; Verify on mainnet. The process is exactly the same, just changing things in .env and sometinkering with hardhat.config.ts</blockquote><h3>🏁 Done! 🏁</h3><p>To recap, here are the things we’ve done in this article:</p><ol><li>Creating Project with Hardhat</li><li>Implementing Smart Contract</li><li>Automated Test with Hardhat</li><li>Deploying with Hardhat Script</li><li>Verifying Code on Blockchain Explorer (with Hardhat Script)</li></ol><p>Thank you for reading, see you later in the next article!</p><p>Resources</p><ul><li><a href="https://github.com/aikdanai/solidity-hardhat-101">GitHub - aikdanai/solidity-hardhat-101</a></li><li><a href="https://hardhat.org/tutorial">Hardhat&#39;s tutorial for beginners | Ethereum development environment for professionals by Nomic Foundation</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91a6972362bb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cleverse/solidity-made-easy-with-hardhat-91a6972362bb">Solidity Made Easy with Hardhat</a> was originally published in <a href="https://medium.com/cleverse">Cleverse, a Web3 Focused Venture Builder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เขียน Solidity ..ชีวิตดีได้ด้วย Hardhat!]]></title>
            <link>https://medium.com/cleverse/solidity-hardhat-101-6ccbfa493b11?source=rss-f78c3c8faf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ccbfa493b11</guid>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[smart-contract-blockchain]]></category>
            <dc:creator><![CDATA[Aikdanai Sidhikosol]]></dc:creator>
            <pubDate>Fri, 05 Aug 2022 09:27:14 GMT</pubDate>
            <atom:updated>2022-08-05T09:27:14.669Z</atom:updated>
            <content:encoded><![CDATA[<h3>เขียน Solidity ..ชีวิตดีได้ด้วย Hardhat!</h3><p>ชีวิตของ Solidity Developer ที่อยู่ได้ด้วย Remix นั้น ถึงจุด ๆ หนึ่งอาจจะนึกขึ้นมาว่า <em>มันมีสิ่งที่ดีกว่านี้รอเราอยู่ไหมนะ?</em> …บทความนี้จะมาตอบเลยว่า มี!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjXXQpJb26ALoUXQ7_jPEw.png" /><figcaption>รูปปกเสกโดยดีไซเนอร์มือฉมังแห่ง Cleverse</figcaption></figure><p>จาก<a href="https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-thai-version-6c8c24da3ca1">บทความ Web 3.0</a> นั้น ผมได้มีการพูดถึง Smart Contract ไว้ว่าเป็นหนึ่งในอาวุธสำคัญที่จะทำให้เราเข้าใกล้โลก Web 3.0 เข้าไปอีกก้าว และเป็นฟีเจอร์หลักของ Ethereum เลยก็ว่าได้ ซึ่งสามารถเขียนโดยภาษา Solidity ผ่าน Tools ต่าง ๆ เช่น Remix หรือ Hardhat</p><blockquote>Disclaimer: บทความนี้จะขอข้ามรายละเอียดทางเทคนิคหลายอย่างนะครับ โดยจะพยายามใส่ลิ้งก์ที่เกี่ยวข้องเผื่อศึกษาเพิ่มเติมให้ครบ<br>แล้วก็รวมถึง Technical Details ของ Solidity ที่ขอละไว้ ซึ่งตรงนี้คิดว่าหากอยากลงลึก ลองค้นหา<a href="https://www.udemy.com/course/ethereum-and-solidity-the-complete-developers-guide/">คอร์สเรียน</a> หรือถาม<a href="https://www.youtube.com/watch?v=EhPeHeoKF88">อาจารย์ YouTube</a> ดู น่าจะได้ความรู้ครบถ้วนกว่าเป็นบทความครับผม 🥰</blockquote><h3>ก่อนจะ Hardhat รู้จัก Remix สักนิด</h3><p><a href="https://hardhat.org/getting-started#overview">Hardhat</a> นั้นทำให้การสร้าง Smart Contract นั้น Developer ทำได้อย่างสะดวกสบายมากขึ้น</p><p><em>“สบายขึ้นนี่ คุณน้องเทียบกับอะไรฮะ?” — คำถามในใจผู้อ่าน</em></p><p>จริง ๆ แล้ว Ethereum.org เองเนี่ย ก็มี IDE สำหรับเขียน Solidity อยู่แล้วนะครับ ซึ่งก็คือ <a href="https://remix.ethereum.org/">Remix</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qdSp17RGzEypd4YrYN5vkw@2x.png" /><figcaption><a href="https://remix.ethereum.org/">remix.ethereum.org</a></figcaption></figure><p>หากสนใจ Remix ลองเล่นดูโดยอ่าน Guide ละเอียดๆได้<a href="https://remix-ide.readthedocs.io/en/latest/">ที่นี่</a> แต่สำหรับบทความนี้ขอมูฟออนไปยัง Hardhat ดีกว่า</p><p>ทำไมถึงดีกว่า? ขอเล่าในหัวข้อถัดไปครับ</p><h3>Hardhat!?</h3><p>เป็น Development Environment ที่ทำให้เราสามารถ Compile, Deploy, Test, Debug ตัว Smart Contract ได้ ซึ่งมาพร้อมกับ Local Ethereum Network ทำให้เราสามารถทดสอบกับ Blockchain จริง ๆ ได้เลย</p><p>ข้อดีหลัก ๆ ของ Hardhat มีดังนี้:</p><ul><li>Debug ได้ง่าย Error Message ชัดเจน</li><li>Fork Network ของจริงมาทดสอบได้ ทำให้ Test ได้แบบสมจริง</li><li>ดู Stack Trace ได้</li><li>สำหรับเหล่า JS Dev ทั้งหลาย; มี console.log()ด้วย! 😳</li><li>เป็น JS Ecosystem ทำให้หลายๆคนอาจจะรู้สึกคุ้นเคยเหมือนคนเคยคุย</li><li>มี Plugins ให้เลือกมาเสริมมากมาย</li></ul><h3>Outline บทความ</h3><ol><li>ขึ้น Project Hardhat</li><li>เขียน Smart Contract</li><li>Automated Test ผ่าน Hardhat</li><li>Deploy ด้วย Hardhat Script</li><li>Verify Code บน Blockchain Explorer (ด้วย Hardhat Script)</li></ol><h3>1. ขึ้นของแบบไม่ของขึ้น</h3><blockquote>ไม่ของขึ้นเพราะง่ายมาก?<br>เปล่า เพราะงง! ผ่าม!</blockquote><p>มาลุยขึ้นโปรเจ็กต์กันครับ!</p><p>เริ่มด้วยการขึ้น npm มาก่อน</p><pre>npm init</pre><p>จากนั้นลง hardhat</p><pre>npm install --save-dev hardhat</pre><p>แล้วสร้างโปรเจ็กต์ด้วย Hardhat — เลือกเป็น TypeScript ครับ (ผม TypeScript FC ❣️)</p><pre>npx hardhat</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*X8rgsMV3O6forwadMfuxPQ@2x.png" /><figcaption>เลือกอันนี้ๆๆ</figcaption></figure><p>จากนั้นจะได้โครงสร้าง Project มาประมาณนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/244/1*avYsfUunZNnQF8z3AonQMg@2x.png" /><figcaption>Project Structure</figcaption></figure><p><strong>อธิบายความหมายไฟล์สำคัญๆ</strong></p><ul><li>hardhat.config.ts Configuration สำหรับ hardhat ทั้งหมด <a href="https://hardhat.org/config#configuration">อ่านเพิ่ม</a></li><li>contracts/ Directory รวมโค้ด Smart Contract</li><li>scripts/ Directory รวมไฟล์ Scripts ต่างๆ เช่น Script สำหรับ Deploy</li><li>test/ Directory รวมไฟล์ Automated Test</li></ul><p>แก้คำสั่ง test ใน scripts ของ package.json ให้เป็นตามนี้</p><pre>&quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;hardhat test&quot;<br>}</pre><h4>กำหนด Environment</h4><p>ก๊อปปี้ไฟล์​ .env.example ออกมา เป็น .env</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*GKdxwCBvHMxPppx8hQNkvA@2x.png" /><figcaption>.env คนจริง</figcaption></figure><p>แก้ค่าใน .env ให้เป็นค่าจริง ซึ่งสำหรับบทความนี้จะทำอยู่บน Ethereum Ropsten Testnet นะครับ</p><p>โดยแต่ละค่าก็คือ:</p><ul><li>ETHERSCAN_API_KEY API Key ของ <a href="https://docs.etherscan.io/getting-started/viewing-api-usage-statistics">etherscan.io</a> (อันนี้ใช้ใน Step 5: Verify Contract เพื่อ Verify Code ผ่าน Script เท่านั้นครับ ข้ามไปแล้ว Verify แบบ Manual เอาก็ได้เหมือนกัน)</li><li>ROPSTEN_URL RPC URL ของ Ropsten ซึ่งเจ้า Hardhat generate ตัวอย่างมาให้เป็นของ <a href="https://www.alchemy.com/">Alchemy</a> แต่ใช้ของ public ใน <a href="https://rpc.info/">rpc.info</a> ก็ได้ (เช่น ตอนที่ผมดูจะเป็น <a href="https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161">https://ropsten.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161</a>)</li><li>PRIVATE_KEY Private Key ของ Wallet ที่จะใช้ Deploy Contract (กดดูใน <a href="https://metamask.io/">Metamask</a> ได้ — 🚨อย่าทำ Key หลุดนะครับบบ🚨)</li></ul><blockquote>บทความนี้เขียนตอน Ropsten ยังมีชีวิตอยู่ แต่มันกำลังจะ Deprecated ในอนาคตอันใกล้นี้นะครับ หากตอนอ่านบทความนี้มันสิ้นชีพไปแล้ว ลอง Testnet อื่นดูครับ<br><a href="https://blog.ethereum.org/2022/06/21/testnet-deprecation/">อ่านเพิ่มเติม</a></blockquote><h4>🕵🏻‍♂️ Checkpoint 1: Project Structure</h4><p>ถึงจังหวะนี้จะได้ Directory พร้อมโค้ดตัวอย่างมาแล้วครับ ลองทดสอบดูได้โดยการ</p><pre>npm run test</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*MzV9_0yF5yX8enxaNPnTtw@2x.png" /><figcaption>ผลลัพธ์เวลารันเทสกับ Project ตัวอย่าง</figcaption></figure><h3>2. เขียน Contract กัน!</h3><p>โจทย์เป็น Contract ที่จะทำหน้าที่ง่าย ๆ คือ ให้เราสามารถส่งจดหมายรัก (พร้อมเงินเปย์) ให้คนปลายทางสามารถรับไปได้</p><p>โดยในจดหมายจะมีข้อความเป็น String ติดไปด้วย — ซึ่งสำหรับ Scope งานนี้ จะเป็นใครก็อ่านได้ไปก่อน ยังไม่ต้องทำระบบกันไม่ให้คนอื่นอ่าน</p><p><em>แชร์ความสวยงามของความรักให้แก่ชาวโลกกันเถอะ </em>🌝</p><blockquote>ย้ำว่าไม่ลง Technical Details นะครับ และโค้ดนี้ยังไม่ได้ผ่านการ Optimize Gas ใดๆ เน้นความอ่านง่ายเป็นหลัก</blockquote><h4>วางตำแหน่งกล่องจดหมาย</h4><p>สร้างไฟล์ LoveLetter.sol ไว้ใน Directory contracts/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*qbKqflW2wWJOZX-PMBJTLg@2x.png" /><figcaption>LoveLetter.sol ใน contracts</figcaption></figure><blockquote>⚠️ <strong>Challenge1</strong>: ก่อนอ่านโค้ดด้านล่าง ดูตัวอย่างจาก <em>contracts/Greeter.sol</em> อ่านโจทย์ แล้วเขียนเองดูครับ</blockquote><h4>ขึ้นโครงกล่องจดหมาย</h4><p>ขึ้นโค้ด Contract มาพร้อมกับประกาศ​ Data Structure ที่ต้องใช้ให้ครบ</p><ul><li>totalLetters บอกว่าตอนนี้มีจดหมายอยู่กี่อัน</li><li>mapping(uint256 =&gt; address) public senders เก็บว่า Letter ID นี้ ใครเป็นคนส่ง</li><li>mapping(uint256 =&gt; address) public receiversเก็บว่า Letter ID นี้ ใครเป็นคนรับ</li><li>mapping(uint256 =&gt; Letter) public letters เก็บข้อมูลภายใน Letter ซึ่งประกอบไปด้วย: ข้อความ, ปริมาณเงินเปย์, สถานะว่าถูกเปิดหรือยัง</li><li>struct Letter คือ Data Structure ของจดหมาย</li><li>constructor คือฟังก์ชั่นที่จะทำงานตอนเรา Deploy Contract ครั้งแรก อันนี้มีหน้าที่เพียงเซ็ตค่า totalLetters ให้เริ่มต้นที่ 0 เท่านั้น</li><li>event คืออีเว้นต์ที่เราสามารถดักจับออกมาดูได้ ถ้า Transaction นั้นผ่าน ซึ่งจะมี 2 อีเว้นต์ที่เราต้องการ คือเมื่อมีคนส่งจดหมาย (Send ) กับเปิดจดหมาย (Open)</li></ul><blockquote>Solidity มี Default Value อยู่แล้ว ซึ่งสำหรับ <em>uint256</em> ก็เป็น <em>0</em> นั่นแหละ ดังนั้นจริงๆไม่ต้องเซ็ตก็ได้ แต่เขียนไว้เพื่อความชัดเจน</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae7f0323cd5c63be0b1af0e969d65f1e/href">https://medium.com/media/ae7f0323cd5c63be0b1af0e969d65f1e/href</a></iframe><h4>ช่องส่งจดหมาย</h4><p>พอมีกล่องจดหมายเปล่า ๆ มาแล้ว ขั้นต่อไปก็คือฟังก์ชั่นสำหรับส่งจดหมาย</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d832cbe6d94e798569a08a176cdd8015/href">https://medium.com/media/d832cbe6d94e798569a08a176cdd8015/href</a></iframe><h4>ช่องรับจดหมาย</h4><p>มีคนส่งก็ต้องมีคนรับ ต่อไปคือฟังก์ชั่นรับจดหมาย ที่เรียกได้เฉพาะคนเป็น Receiver ของจดหมายนั้นๆ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b2228e8aed369c2df130646b9e9b052/href">https://medium.com/media/5b2228e8aed369c2df130646b9e9b052/href</a></iframe><h4>ช่องแอบส่อง</h4><p>ส่งได้รับได้ แต่เรายังไม่มีช่องเอาไว้ส่องของข้างในเลย ดังนั้นมาทำฟังก์ชั่นดูค่าต่าง ๆ ในจดหมายกันต่อ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/534a5dc4621ad0b5139b94065675de4b/href">https://medium.com/media/534a5dc4621ad0b5139b94065675de4b/href</a></iframe><h4>🕵🏻‍♂️ Checkpoint 2: LoveLetter.sol</h4><p>ถึงจังหวะนี้ จะได้ Contract LoveLetter มาแล้วครับ อยู่ใน Directory contracts</p><p>โดยโค้ดทั้งหมดของ LoveLetter เป็นดังนี้</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4d5ba0ea7ffb357090294d0b1ccabce/href">https://medium.com/media/f4d5ba0ea7ffb357090294d0b1ccabce/href</a></iframe><p>เช็คความถูกต้องได้โดยรันคำสั่ง</p><pre>npx hardhat compile</pre><p>ซึ่งผลลัพธ์ควรจะต้องออกมาประมาณนี้ครับ ไม่มี Errors</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*hWltDWzHbb2vf9BtvvIufQ@2x.png" /></figure><p>ขั้นถัดไป มาใช้ความสามารถสุดเทพอย่างหนึ่งของ Hardhat กัน! นั่นก็คือ Automated Test</p><h3>3. เทสแรกไม่เป็นไร เทสถัดไป.. แตก!</h3><p>เขียนโค้ดเสร็จแล้ว มานั่งเทสมือมันเหนื่อย เรามองลองเขียน Automated Test ครอบกันดีกว่า</p><h4>สร้างไฟล์ Test</h4><p>สร้างไฟล์ loveletter.ts ไว้ใน Directory test/</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*6iTBQGfsbKw6oJzbulvBXA@2x.png" /><figcaption>loveletter.ts ใน test/</figcaption></figure><h4>เทสอะไรบ้างดี</h4><p>ลองเขียนเทสกันเบื้องต้นใน Usecase สำคัญ ๆ</p><ul><li>ทดสอบว่า Deploy สำเร็จ และ Initiate ค่าได้ถูกต้อง</li><li>ทดสอบว่าสามารถส่งจดหมาย ผ่านฟังก์ชั่น send ได้สำเร็จ และ มีค่าในจดหมายที่ถูกต้อง</li><li>ทดสอบว่าจดหมายต้องถูกเปิดโดยคนที่ไม่ใช่ผู้รับไม่ได้</li><li>ทดสอบว่าจดหมายถูกเปิดโดยฟังก์ชั่น openได้โดยคนที่เป็นผู้รับ และได้เงินเปย์ปริมาณที่ถูกต้อง</li></ul><blockquote>⚠️ <strong>Challenge2</strong>: ก่อนอ่านโค้ดด้านล่าง อยากให้ลองเขียนเทสดูเองก่อน โดยดูตัวอย่างจากไฟล์​ <em>test/index.ts</em> ครับ</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f82280107853683b212e870d98349473/href">https://medium.com/media/f82280107853683b212e870d98349473/href</a></iframe><h4>ฮัลโหล เทส เทส</h4><p>รันคำสั่งเทสได้โดย</p><pre>npm run test</pre><p>ซึ่งผลลัพธ์ก็จะออกมาหน้าตาประมาณนี้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*alcxJ5Ca1ab70XZjBFkqkA@2x.png" /><figcaption>ผลลัพธ์เทส</figcaption></figure><blockquote>[send] 0 1000000000000000000 คืออะไร๊!?</blockquote><p>สิ่งนั้นก็คือออออ…</p><p>console.log() ภายใน Solidity ครับ!</p><p>log ตัวนี้ อยู่ภายในในฟังก์ชั่น send ครับ ลองเล่น log นู่นนี่นั่นออกมาดูได้ <a href="https://hardhat.org/hardhat-network/reference#console-log">อ่าน docs กดที่นี่</a></p><h4>🕵🏻‍♂️ Checkpoint 3: ทดสอบความรัก</h4><p>จังหวะนี้ก็จะได้ไฟล์​ Automated Test เพื่อเสริมสร้างความมั่นใจก่อนเอา Contract ขึ้น Blockchain จริง ๆ แล้วนะครับ</p><blockquote>⚠️<strong> Challenge3:</strong> อยากให้ลองเพิ่ม Test Case เองครับ โดยเป็นสองเคสต่อไปนี้:</blockquote><blockquote>ทดสอบว่า หากเปิดจดหมายเดิมซ้ำ Transaction ควรจะถูก Revert</blockquote><blockquote>ทดสอบว่า ส่งจดหมายถัดไป จะเป็นจดหมาย ID <em>1</em> และเปิดได้โดยผู้รับเหมือนปกติ</blockquote><p>เทสของโจทย์สองข้อนี้ที่ผมเขียน จะอยู่ใน GitHub Repository ที่ผมแปะไว้ท้ายบทความนะครับ — <em>แอบดูตีมือ ☝️</em></p><h3>4. -3–2–1 Blast off! Deploy!</h3><p>โค้ดก็เสร็จแล้ว เทสก็ทำแล้ว คงไม่เหลืออะไรให้ทำอีกนอกจากเอาโค้ดขึ้นละ</p><p>ก่อนจะไปท่า Hardhat ขอกลับไปใช้ <a href="https://remix.ethereum.org/">Remix</a> กันก่อนนะครับ ถือเป็นการ Deploy แบบ Manual โดยไม่ต้องเขียน Script อะไรกันก่อน <em>แบบว่าลำบากก่อนสบายทีหลัง 🌝</em></p><h4>Remix สาย(ฉบับ)ย่อ</h4><p>เริ่มจากสร้างไฟล์ใหม่ใน Remix ตั้งชื่อว่า LoveLetter.sol แล้วก๊อปโค้ดจากไฟล์ contracts/LoveLetter.sol ใน Project เราไปวางครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NwKevMyLZ8Rsyh_xy22VQg@2x.png" /><figcaption>แปะโค้ดออกมาหน้าตาประมาณนี้</figcaption></figure><p>จากนั้นเลือกไปที่หัวข้อ Compile แล้ว Config ตามนี้ครับ</p><ul><li>Compiler เลือกเป็นอะไรก็ได้ใน 0.8.* (ง่าย ๆ ก็เอาตัวที่ใหม่สุดไป) เพราะจะเห็นว่าในโค้ดเราเขียนไว้ว่าเป็น pragma solidity ^0.8.0</li><li>ติ๊ก Auto compile เพื่อชีวิตที่ดีกว่า (มันจะ Compile ทุกครั้งที่เราแก้โค้ด ทำให้เห็นได้เลยว่ามี Compilation Error อะไรหรือเปล่า)</li><li>เลือก Contract เป็น LoveLetter.sol</li><li>กด Compile!</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*zqRlUPULP7z5er73t5Kb2Q@2x.png" /><figcaption>Config ของ Compiler</figcaption></figure><p>สุดท้าย ก็คือไปที่หัวข้อ Deploy ครับ ซึ่ง Config ตามนี้</p><blockquote>จะข้ามวิธีใช้ <a href="https://metamask.io/">Metamask</a> ไปนะครับ</blockquote><ul><li>เลือก Environment เป็น Injected Web3 ซึ่งจะทำให้มัน Deploy ไปยัง Network ที่ Metamask นั้นเลือกอยู่ ดังนั้นให้ชัวร์ว่า Metamask เลือกเป็น Ropsten อยู่</li><li>Account จะเป็นกระเป๋าที่ใช้ Deploy ให้ชัวร์ว่ามี Gas อยู่ใน Ropsten — ถ้าไม่มีไปกดจาก <a href="https://faucet.metamask.io/">Faucet</a> ได้ (ตอนผมกดต้องรออยู่สิบกว่านาทีถึงจะเข้า)</li><li>เลือก Contract ให้เป็น LoveLetter.sol</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*u7BOLrFHAqb7X5EPJdFIRA@2x.png" /><figcaption>Config ของ Deployer</figcaption></figure><p>จากนั้น กด Deploy เลย!</p><p>หลังจาก Confirm ใน Metamask เสร็จก็นั่งจิบชารอ Transaction เสร็จซักแป๊ปครับ</p><p>ซึ่งหากเรียบร้อยจะขึ้นมาอยู่ใน Deployed Contracts แบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*Xd03Uno_OTZ42ORVWSfAFA@2x.png" /><figcaption>Blasted off!</figcaption></figure><p>ถ้าลองก๊อปปี้ Address ไปดูใน <a href="https://ropsten.etherscan.io/">ropsten.etherscan.io</a> ได้ จะเห็น Transaction ที่ Deploy อยู่ครับ เยยยย้</p><blockquote>⚠️ <strong>Challenge4</strong>: ลองเล่นใน Remix ทั้ง <em>send</em> ,<em>open</em> และฟังก์ชั่นอื่น ๆ ดูครับ แบบให้ receiver เป็นกระเป๋าอื่น แล้ว open ให้ได้</blockquote><blockquote>Deploy ยุ่งยาก ไม่ทำและ เลิกอ่านละบทความ</blockquote><p>หยุดก่อนเถิดท่านผู้ใจร้อนรุ่ม</p><p>ถัดไปมาลองทำท่าที่ง่ายกว่ากัน!</p><h4>Deploy ด้วย Script Hardhat</h4><p>สร้างไฟล์ Script ไว้ที่ scripts/deploy-loveletter.ts ได้เลยครับ (ก๊อปปี้มาจาก scripts/deploy.ts เลยก็ได้)</p><blockquote>⚠️ <strong>Challenge5</strong>: ลองเอา <em>scripts/deploy.ts</em> มาแก้เองดูครับ (แก้น้อยมากกก)</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f29c2cdd851738b37cd12fda5e283368/href">https://medium.com/media/f29c2cdd851738b37cd12fda5e283368/href</a></iframe><p>จากนั้นรัน Command ด้านล่างนี้เพื่อ Deploy ครับ</p><pre>npx hardhat run scripts/deploy-loveletter.ts --network ropsten</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ij48mSllrtDsyJOb44GJJg@2x.png" /><figcaption>ผลลัพธ์หลังจากรัน Command</figcaption></figure><h4>🕵🏻‍♂️ Checkpoint 4: ปลดปล่อยความรักสู่โลก</h4><p>ถึงจุดนี้ก็จะได้ Smart Contract ขึ้นไปอยู่บน Blockchain แล้วนะครับ</p><p>ลองก๊อปปี้ Address จากผลลัพธ์ใน Terminal ไปดูที่ <a href="https://ropsten.etherscan.io/">https://ropsten.etherscan.io/</a> ได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VuN4afXIwP3BPykIpGCo7g@2x.png" /><figcaption>Contract เราใน <a href="https://ropsten.etherscan.io/">ropsten.etherscan.io</a> !</figcaption></figure><p>ใครลองทำตามแล้วเทียบผลลัพธ์ใน Etherscan ดู อาจจะพบว่า ตรง Contract ของคุณไม่มีติ๊กสีเขียวอยู่</p><p>ซึ่งสิ่งนั้นจะเกิดขึ้นได้ เราต้อง <strong>“Verify”</strong> โค้ด Smart Contract เราก่อน เพราะปกติแล้วเราจะอ่านโค้ดของ Contract ที่ยังไม่ Verify ไม่ได้ จะเห็นเป็น Bytecode ยาว ๆ</p><p>Verify ยังไง? ตามมาดูกัน! หัวข้อสุดท้ายแล้ววว</p><h3>5: ยืนยันว่ารักยังยั่งยืนอยู่ยั้งยืนยง</h3><p>เนื่องจาก Blockchain นั้น ใคร ๆ ก็สามารถ Deploy Contract ขึ้นไปได้ (<a href="https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-thai-version-6c8c24da3ca1">Permissionless</a>) และใครก็สามารถดูโค้ดได้ด้วย</p><p>…แต่โค้ดที่เห็นนั้นก็จะเป็น ByteCode ที่มนุษย์เรา ๆ อ่านไม่รู้เรื่อง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdgPCpL8Q_C5jQgF6E4PeA@2x.png" /><figcaption>Bytecode ของ Contract ที่ยังไม่ Verify</figcaption></figure><p>ดังนั้น ถ้านักพัฒนาอยากให้ผู้ใช้สามารถมาตรวจสอบโค้ด(แบบที่มนุษย์อ่านออก)ด้วยตัวเอง ก็ต้องยืนยัน(Verify)โค้ดกันเสียก่อน ว่าโค้ดต้นฉบับก่อนที่จะกลายเป็น ByteCode นั้น หน้าตาเป็นยังไง</p><p>ซึ่งด้วยพลังแห่ง Hardhat นั้น ก็ทำได้ง่ายมาก โดยรันแค่นี้เลย! (ต้อง Config .env ตัว ETHERSCAN_API_KEY ก่อนนะครับ)</p><pre>npx hardhat verify --network ropsten 0x8b53e7A4aBa76b8e2cdA11b0A3d7cBf5847C5aB6</pre><p>ทีนี้ไม่ว่าใคร ก็<a href="https://ropsten.etherscan.io/address/0x8b53e7A4aBa76b8e2cdA11b0A3d7cBf5847C5aB6#code">สามารถดูโค้ดของเรา และตรวจสอบด้วยตัวเองได้แล้ว</a>ครับ!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UDti5MONsLpfxVt5_G9DDA@2x.png" /><figcaption>อ่านโค้ดได้เลย!</figcaption></figure><blockquote>⚠️ <strong>Challenge6</strong>: ลอง Verify ในเว็บ Etherscan ดู ได้เหมือนกันครับ</blockquote><blockquote>ซึ่งถ้า Deploy โค้ดเดิมเป๊ะไป มันจะมองว่าเราเคย Verify ไปแล้ว ทำให้เราลอง Verify ใหม่ไม่ได้ เลยขอ Challenge ให้แก้โค้ด โดยการเอา <em>console.log</em> ออกครับ เพราะอย่างไร <em>console.log</em>ใช้ได้เฉพาะในตอนเราเทสด้วย Hardhat เท่านั้นอยู่แล้ว ขึ้น Blockchain ไปไม่มีประโยชน์อะไร รังแต่ทำให้ Contract เราใหญ่ขึ้น</blockquote><h4>🕵🏻‍♂️ Checkpoint 5: ความรักจะยั่งยืนตลอดไป</h4><p>ถึงจุดนี้ เราก็จะได้ Smart Contract ที่ผ่านการทดสอบอย่างหนักหน่วง(?) ขึ้นไปอยู่บน Blockchain จริง ๆ แล้วนะครับ</p><p>แถมการ Deploy &amp; Verify ก็ยังง่ายดาย เพียงแค่รัน Command บรรทัดเดียวเท่านั้นเอง!</p><blockquote>⚠️ <strong>Challenge7</strong>: <a href="https://hardhat.org/tutorial/deploying-to-a-live-network">Deploy</a> &amp; Verify บน Mainnet ดูครับ (ถ้า Ethereum แก๊สอาจจะแพงกระเป๋าตังขาดกระจุย ลองดู​ Chain อื่น ๆ เช่น Binance Smart Chain, Polygon ดูได้ครับ)</blockquote><p>หากอยากลองยิง Smart Contract ส่งจดหมายรักบน Blockchain จริงดู ขอแนะนำให้รู้จักกับ<a href="https://medium.com/cleverse/web3-developer-journey-ethers-js-d7c2fdf141b">บทความสุดเทพ by Earth</a> ชาว Cleverse อีกคนนึงครับ จะได้ลองใช้ JavaScript ในการ Interact กับ Smart Contract ผ่าน <a href="https://docs.ethers.io/v5/">Ethers.js</a> ซึ่งง่ายมากกก</p><h3>🏁 Goal! ถึงจุดหมายแล้ว</h3><p>ยินดีกับทุกท่านด้วย ที่มาถึงจุดนี้ได้ครับ ขอปรบมือให้สองที 👏</p><blockquote>แปะ แปะ</blockquote><p>ขอ Recap อีกสักทีว่าเราได้ทำอะไรไปบ้างในบทความนี้นะครับ</p><ol><li>ขึ้น Project Hardhat</li><li>เขียน Smart Contract</li><li>Automated Test ผ่าน Hardhat</li><li>Deploy ด้วย Hardhat Script</li><li>Verify Code บน Blockchain Explorer (ด้วย Hardhat Script)</li></ol><blockquote>ใช่ครับ ผมก๊อปข้างบนมา <em>🌝</em></blockquote><p>ทั้งนี้ทั้งนั้น หนทางสู่การเป็นเซียน Solidity นั้นยังอีกยาวไกล เรายังเพิ่งเริ่มก้าวแรกไปด้วยกันเท่านั้น ยังมีเส้นทางสูงชันกว่าจะไปถึงยอดเขาครับ</p><p>ดังนั้นติดตามรอดูบทความ Advanced ยิ่งขึ้นจาก Cleverse ได้เลยครับ (เขียนเมื่อไหร่อีกเรื่อง 🎅🏼)</p><h4>Resources</h4><ul><li><a href="https://github.com/aikdanai/solidity-hardhat-101">GitHub - aikdanai/solidity-hardhat-101</a></li><li><a href="https://hardhat.org/tutorial">Hardhat&#39;s tutorial for beginners | Ethereum development environment for professionals by Nomic Foundation</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FEhPeHeoKF88%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DEhPeHeoKF88&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FEhPeHeoKF88%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/1eba04b1cd8d19b0aff7c366393e748c/href">https://medium.com/media/1eba04b1cd8d19b0aff7c366393e748c/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ccbfa493b11" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cleverse/solidity-hardhat-101-6ccbfa493b11">เขียน Solidity ..ชีวิตดีได้ด้วย Hardhat!</a> was originally published in <a href="https://medium.com/cleverse">Cleverse, a Web3 Focused Venture Builder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Welcome to the world of Web 3.0]]></title>
            <link>https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-d16b61235dc4?source=rss-f78c3c8faf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/d16b61235dc4</guid>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Aikdanai Sidhikosol]]></dc:creator>
            <pubDate>Tue, 26 Apr 2022 08:39:05 GMT</pubDate>
            <atom:updated>2022-09-27T07:20:15.830Z</atom:updated>
            <content:encoded><![CDATA[<p>Web 3.0, dubbed the next state for the internet, is being talked about more and more as the days go by. So what is it exactly?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYS-_BjZv_fLXoXquIPwig.png" /></figure><p>To fully understand the term, we have to look at the evolution of the internet itself.</p><h3>Evolution of Web</h3><h4>Web 1.0: Read-only Internet</h4><p>The first iteration of the Web. In the Web1 ecosystem, almost all of its users are consumers of information provided by creators that developed the websites.</p><p>Mostly read-only static sites, there is almost no interaction between its users and no way for average users to provide any information back to the internet for other users. Instead, Web1 serves only as a way for site creators to put their information out there for users to consume. Nowadays, many sites still fall under this category of Web1, including our beautiful <a href="https://cleverse.com/">Cleverse Landing Page</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*cHVI0OHiXRiJb9_ijiUfXg.png" /><figcaption>The one-way street of Web 1.0</figcaption></figure><p>Checking the validity of the information is not possible; you have to take the site’s words for it, making the information manipulable by its creators. Although there might be mechanisms outside the Web1 internet to control the information, be it law or societal pressure, the point stands.</p><h4>Web 2.0: Read-and-write Internet</h4><p>The second iteration of the Web. Its main difference from Web1 is that users generate the content instead of the owner.</p><p>Now users can provide their content or interact with the internet. Giving feedback to other information becomes possible, mitigating the issues about information manipulation since the users can provide their correct information or at least point out the incorrectness, e.g., commenting on social media — though whether others believe said users is another thing.</p><p>Interacting with other systems becomes possible, such as online payment instead of paying with good ol’ cold hard cash.</p><p>Here’s an example of Web2: <a href="https://www.linkedin.com/company/cleverse">Cleverse on LinkedIn</a>, with us as the user generating the content and <a href="https://www.linkedin.com/">LinkedIn</a> as the platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*UxYmWAISX2HXpmuaDBOJVA.png" /><figcaption>The controlled two-way street of Web 2.0</figcaption></figure><p>But the problem of information manipulation still exists. Users’ comments can be censored — or getting their accounts banned. Payment service might get paused.</p><p>Also, platform owners own your registered personal information data and every transaction you have ever made in their database. And one can’t use their service without giving up said information.</p><p>With all that being said, it doesn’t mean that any of that will happen for sure; it just means it is <em>technically</em> possible<em>.</em></p><h4>Web 3.0: Read-and-write-and-own Internet</h4><p>Enter the Web3, the next iteration of the Web.</p><p>There’s no definitive meaning to the term “Web3” presented since everyone has their implications associated with it. So, I will be giving you my understanding of Web3.</p><p>Web3 is the internet where no one entity truly owns the information and the system. The information is distributed among the users, publicly available, and verifiable by anyone. In other words, it’s a decentralized, permissionless, and trustless network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*IdXWA9sGDR-8nlKkE2sCgg.png" /><figcaption>The distributed internet of Web 3.0</figcaption></figure><p>To further explain these three terms, let’s go back to a Web2 example; the payment service, or more specifically, the bank.</p><p><strong>Decentralized</strong> means that a network of computers holds the data instead of the bank holding them along with the only means to interact with your assets. You can interact with any of them to access the service. That brings us to another point: when a centralized banking service went down, got attacked, or got hacked, it rendered its entire userbase unable to do anything since it’s a single point of failure. But with decentralization, if one service provider goes down or is compromised, there are others to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*BqJuZGnUlPeAtB0GxiUtSA.png" /><figcaption>The benefit of being decentralized</figcaption></figure><p><strong>Permissionless</strong> means that instead of the bank requiring personal information and being able to choose who or when to provide the service, everyone can use the service without giving up their personal information, and no one can decide on their own to stop providing the service to anyone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*MeqcGuJl3f3y5gEyzFGAcw.png" /><figcaption>The benefit of being permissionless</figcaption></figure><p><strong>Trustless</strong> means that instead of you needing to trust the bank to be your intermediary that when you transfer funds, the recipient will receive the correct amount, and the transaction will show up on their end. Although, to be fair, Web3’s trustless doesn’t mean we can trust no one entirely. It means that we can distribute our trust that everyone participating in the network — which is governed by code — will maintain the system’s integrity instead of harming it since the network was designed so that doing so won’t benefit them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSV5kvsksTDzGEzArN5SsQ.png" /><figcaption>The benefit of being trustless</figcaption></figure><p>To summarize, the comparison between payment service on Web2 and Web3 are as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*dAY_3ACpOJD58VUlxbJKvg.png" /><figcaption>Difference between payment services in Web 2.0 and Web 3.0</figcaption></figure><p>The idea about Web3 doesn’t end here; however, concepts such as AI/Machine Learning infusion and many other things are being explored as we speak.</p><p>While it is exciting to talk about the future, for this article, I’d like to talk more about the current state of Web3. Specifically about the technology being used to make Web3 possible: blockchain.</p><h3>Blockchain</h3><p>What’s blockchain? I find this statement from Ethereum documentation most fitting to describe a blockchain:</p><blockquote>A blockchain is a public database that is updated and shared across many computers in a network. — <a href="https://ethereum.org/en/developers/docs/intro-to-ethereum/#what-is-a-blockchain">Ethereum.org</a></blockquote><p>Now, let’s break the word blockchain down further, shall we?</p><h4>What is a “Block”?</h4><p>Block is a collection of transactions stored consecutively to each other. New transactions have to be added to a new block, and only until the network confirms the block and committed to the chain that the transaction is considered completed.</p><h4>What is a “Chain”?</h4><p>A chain is an idea that each block that supposedly should be stored consecutively is immutable. Every block will cryptographically refer to its ancestor until the first “Block 0” AKA “Genesis block.” Thus blocks are <em>chained</em> together, creating a blockchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MyM4yZRH3jPpCSiat6u2pQ.png" /><figcaption>Simplified blockchain visualization</figcaption></figure><p>Computers — AKA nodes — in the network have to agree when a new block comes in that the transactions inside the block are legit and the block itself cryptographically refers to the latest block, and also that the chain as a whole is still correct. Only then that the new block be committed to the blockchain, thus becoming the latest block for the following block to refer to as its ancestor. (For a more elaborate explanation, please refer to <a href="https://ethereum.org/en/developers/docs/blocks/">this</a>.)</p><p>Now, you might have a question: what is <em>cryptographically refer to</em> even <em>mean</em>? Good question. Let’s dive a little deeper into how blockchain works.</p><h4>How does blockchain work?</h4><blockquote>This section might get too technical even though I did try to simplified it. Feel free to skip to the Ethereum section.</blockquote><p>Again, our old friend payment service will take place as an example.</p><p>Now, let’s start with a blank slate—the genesis block. No one has any balance in the system, and no committed transaction.</p><p>Then, Alice deposits 100 USD, and Bob deposits 50 USD. The node which Alice and Bob interacted with then added the transaction into a block.</p><p>When the node wants to commit a block, it will first have to combine the following data to generate a “hash”: the previous block’s hash, all the data within this block. You can think of this hash as each block’s identity; in a way, it’s similar to our fingerprints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*z-cTYrmR6WLuzbSlyL6a_A@2x.png" /></figure><p>The node then commits the block to the network for every other node to verify the validity of this block, and when the consensus of the network agrees that this block is valid, this block then becomes the latest block of the chain.</p><p>Then, Alice creates a transaction to transfer 20 USD to Bob. The node then creates Block 2 and commits to the blockchain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*U1q942gB3KF6SHevso32IQ@2x.png" /></figure><p>Now, to know the current state of the blockchain, we can “replay” all the transactions ever since the genesis block to find out everyone’s balance.</p><p>What if someone wants to act maliciously by tampering with the data in the blockchain? Say, change Alice’s deposit in Block 1 from 100 USD to 110 USD.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*MopfaEzAKOe9eICi0-e64Q@2x.png" /><figcaption>Tampering with the committed data.</figcaption></figure><p>This mechanism means that certain someone(Alice, I’m looking at you) would need to change every block’s hashes ever since the tampered block. Since Block 1’s data changed, Block 1’s hash has to change, and with Block 1’s hash changed, Block 2’s hash also has to change, so on and so forth.</p><p>And even after changing all the hashes accordingly, there’s still a problem the malicious actor has to overcome: how to present to the nodes in the network so that they accept this new blockchain as the correct one — it’s virtually impossible.</p><p>That’s just a <em>glimpse</em> into what an amazing technology Blockchain is.</p><blockquote>Disclaimer: This is just a <strong><em>very</em></strong> brief explanation of Blockchain. If you want to see an article going deep and technical, <a href="https://www.facebook.com/cleverse.team/">let us know</a>!</blockquote><p>Next, let’s briefly talk about Ethereum. The platform, which, I’d say, popularized and utilized blockchain technology to serve a way wider audience than <a href="https://www.investopedia.com/terms/b/bitcoin.asp">Bitcoin</a>.</p><h3>Ethereum</h3><p>Ethereum is a platform that uses blockchain as its core idea and pushes the utilization further.</p><p>There’s a single Ethereum blockchain whose state every node in the network agrees on. Each node then keeps a copy of this state on its machine.</p><p>Any node can request the network to perform any arbitrary computation (e.g., Alice sending messages to Bob, monthly paying the salary). Every node then verifies and executes such a request.</p><p>With that being said, I want to talk more about the most prominent feature of Ethereum, in my opinion: The Smart Contract.</p><h4>What is Smart Contract?</h4><p>A smart contract is a snippet of code on the Ethereum blockchain that developers can create to provide varying services like a marketplace, banking, lending, and many more.</p><p>Any user can interact with any smart contract, provided the parameters and the conditions are correct.</p><p>For example, a piggy bank smart contract that allows users to deposit Ether, withdrawable by them alone after a specific time.</p><p>Here’s an example of a series of instructions a smart contract could be doing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*J53xWCjEzkwx96lTNyiKXA.png" /><figcaption>Smart Contract implementation visualized</figcaption></figure><p>Utilizing smart contracts on Ethereum allows developers to create complex applications that satisfy the users’ needs. Thus expanding the use of blockchain to solve a wider and wider array of problems as more contracts are being developed every day.</p><h3>Let’s wrap it up</h3><p>Web 3.0 is the direction the internet is evolving toward. The main goal is the distribution of ownership from a few large organizations to many small individuals(yes — <a href="https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/">you can be one of them!</a>), moving the trust in the organization to the consensus of people, letting the internet be accessible to everyone.</p><p>The blockchain is the most prominent technology utilized for Web 3.0 to reach those goals. Being a public database shared by a network of nodes governed by computer code, blockchain made “Decentralized”, “Permissionless”, and “Trustless” possible.</p><p>And to be able to make Web 3.0 available and valuable to people, more blockchain use cases other than cryptocurrencies need to be developed. So that’s where Ethereum came in. Being a powerful platform superpowered with Smart Contract opens up endless opportunities eagerly waiting to be created and shared!</p><blockquote>Personally, I don’t believe Web3 to be the sole future of the internet. I think it will coexist with Web1 and Web2 as they currently do. Each generation of web serve its different purposes. Also, not every application is meant to be decentralized, permissionless and trustless anyway.</blockquote><blockquote>This article’s purpose is about explaining the meaning of Web3 and its associated technology. Not to blindly suggest that Blockchain (along with Ethereum) is the silver bullet meant to solve every goal of Web3, just that it’s currently the most popular one. And who knows what technologies might be born in the future to better serve the vision of Web3.</blockquote><blockquote>I find discussing the real-world practicality of Web3/Blockchain to be interesting. So feel free to reach out to talk about it!</blockquote><p>And that about wraps it up for this article!</p><p>There are many more exciting things left to talk about. The consensus algorithms, The pros/cons of blockchain and how it’s being solved, Ethereum 2.0, the list goes on.</p><p>If you are interested in any Web3-related topics and want to see more articles from us or give feedback about this article, <a href="https://www.facebook.com/cleverse.team/">feel free to reach out to us!</a></p><p>Stay tuned for upcoming articles! Spoiler: it’s for <em>developers</em> ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d16b61235dc4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-d16b61235dc4">Welcome to the world of Web 3.0</a> was originally published in <a href="https://medium.com/cleverse">Cleverse, a Web3 Focused Venture Builder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เช็คความพร้อมแพ็คความรู้เตรียมเข้าสู่โลกแห่ง Web 3.0 กัน]]></title>
            <link>https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-thai-version-6c8c24da3ca1?source=rss-f78c3c8faf63------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c8c24da3ca1</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[web3]]></category>
            <dc:creator><![CDATA[Aikdanai Sidhikosol]]></dc:creator>
            <pubDate>Fri, 08 Apr 2022 11:50:25 GMT</pubDate>
            <atom:updated>2022-04-08T11:50:25.852Z</atom:updated>
            <content:encoded><![CDATA[<p>คำว่า Web 3.0 กำลังมาแรงและถูกพูดถึงมากขึ้นเรื่อยๆ บางคนเรียกว่ามันจะเป็นยุคสมัยใหม่ที่จะเปลี่ยนโลกอินเทอร์เน็ตจากที่เรารู้จักกันดีไปตลอดกาล</p><p>ว่าแต่… Web 3.0 นี่มันคืออะไรนะ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYS-_BjZv_fLXoXquIPwig.png" /></figure><p>หนทางในการบรรลุถึงตัวตนของมันอาจยาวไกล เรามาที่จุดสตาร์ท เริ่มด้วยการเล่าถึงวิวัฒนาการของอินเทอร์เน็ตกัน</p><h3>ยุคสมัยทั้งสามของอินเทอร์เน็ต</h3><h4>Web 1.0: อ่านได้เขียนไม่ได้</h4><p>ในยุคที่หนึ่งนี้ ผู้ใช้งานอินเทอร์เน็ตเกือบทั้งหมดเป็นเพียงคนเสพข้อมูลที่ผู้สร้างเว็บกำหนดไว้ให้เท่านั้น ไม่ได้มีช่องทางให้คนทั่วไปแบบเราๆเอาของขึ้นไปให้ผู้ใช้คนอื่นๆดู</p><p>หน้าที่ของเว็บไซต์ในยุค Web1 หลักๆแล้ว คือการให้ผู้สร้างเว็บสามารถเผยแพร่ข้อมูลไปให้คนเข้ามาดูได้ โดยเว็บในยุคนี้ที่อาจเห็นกันอยู่บ่อยๆคือ เว็บข่าว หรือเว็บ landing page ต่างๆ</p><p>เพื่อให้เห็นภาพ ขอยกตัวอย่างเว็บ <a href="https://cleverse.com/">Cleverse Landing Page</a> นะฮะ(เว็บสวยมากอยากให้ลองไปเยี่ยมดู 🥰) ซึ่งจะเห็นได้ว่ามันเป็นเว็บที่ทาง Cleverse ใส่ข้อมูลให้คนที่เข้ามาดูได้สัมผัสเท่านั้น แต่ไม่ได้มีช่องทางอะไรให้คนดูส่งข้อมูลกลับมา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*cHVI0OHiXRiJb9_ijiUfXg.png" /><figcaption>ถนนวันเวย์แห่งข้อมูลของ Web 1.0</figcaption></figure><p>ประเด็นหนึ่งของ Web1 ที่น่าพูดถึงคือ เราที่เป็นผู้ใช้ทั่วไปไม่สามารถรู้ได้เลย ว่าข้อมูลบนเว็บที่เราอ่านอยู่เนี่ย มันถูกต้องหรือเปล่า? ข่าวบนเว็บนี้มันจริงไหม? หรือเจ้าของเว็บแอบปล่อย fake news มาไหมนะ? เพราะถึงมีคนรู้ว่าข้อมูลบนเว็บนี้มันผิด เค้าก็ไม่สามารถบอกคนอื่นได้เลย — ทั้งนี้อาจจะมองได้ว่า เว็บเฟคนิวส์เดี๋ยวก็โดนรัฐบาลแบน แต่สิ่งที่ต้องการสื่อคือถ้าอาศัยแค่เพียงความสามารถของ Web1 นั้น ผู้ใช้แบบเราๆไม่สามารถทำอะไรบนอินเทอร์เน็ตได้นอกจากเสพข้อมูล</p><h4>Web 2.0: อ่านก็ได้เขียนก็ได้</h4><p>ในยุคที่สองนี้ สิ่งที่แตกต่างจากยุคแรกก็คือข้อมูลและ content ต่างๆนั้นจะเกิดจากผู้ใช้งานทั่วไปแทนที่ผู้สร้างเว็บจะเป็นคนใส่เองทั้งหมด</p><p>Web2 นี้ผู้ใช้จะสามารถสร้าง content ของตัวเองขึ้นมาเพื่อให้ผู้ใช้คนอื่นๆสามารถดูได้แล้ว ไม่ว่าจะเป็นในรูปแบบ โพสต์รูปลงโซเชี่ยล เขียนบทความ(แบบที่ผมเขียนมานี่) คอมเม้นต์ในโพสต์ของสำนักข่าว และอื่นๆอีกมากมาย ข้อมูลที่ผู้ใช้สามารถเสพได้จะเกิดจากผู้ใช้ด้วยกันเองซะส่วนใหญ่ ไม่ใช่ผู้สร้างเว็บยื่นมาให้อย่างเดียว</p><p>ซึ่งการที่ผู้ใช้สามารถคอมเม้นต์หรือโพสต์บนโซเชี่ยลได้นี่ ก็ถือเป็นตัวอย่างหนึ่งที่แสดงให้เห็นว่า Web2 สามารถลดปัญหาเรื่องการเสพข้อมูลแบบทางเดียวใน Web1 ลงได้ เพราะถ้าหากเราเห็นว่าเว็บไหนมีข้อมูลที่ไม่ถูกต้อง เราก็สามารถคอมเม้นต์หรือโพสต์เตือนผู้ใช้คนอื่นๆได้เลย <em>…แต่คนอื่นๆเชื่อเรามั้ยก็อีกเรื่องนะ</em></p><p>อีกสิ่งที่เกิดขึ้นในยุคของ Web2 ก็คือ ผู้พัฒนาเว็บนั้นสามารถทำเว็บที่เปิดให้ผู้ใช้อินเทอร์เน็ตสามารถใช้งานระบบอื่นๆที่อยู่นอกอินเทอร์เน็ตได้ด้วย ตัวอย่างเช่น ระบบ Online Banking ที่ผู้ใช้โอนเงินให้กันและกันผ่านหน้าเว็บได้เลยแทนที่จะต้องไปธนาคาร — โดยสิ่งนี้เป็นเรื่องที่ยุค Web1 ไม่สามารถทำได้ เพราะเว็บในยุคนั้นยังไม่มีความสามารถให้ผู้ใช้ส่งข้อมูลความต้องการโอนเงินขึ้นอินเทอร์เน็ตได้</p><p>เพื่อความเห็นภาพ ขอยกตัวอย่าง <a href="https://www.linkedin.com/company/cleverse">หน้าบริษัท Cleverse</a> บน <a href="https://www.linkedin.com/">LinkedIn</a> ซึ่งในกรณีนี้ LinkedIn ถือเป็นผู้สร้างเว็บ ที่เปิดให้ผู้ใช้งานอย่าง Cleverse สร้างคอนเท้นต์ แล้วผู้ใช้คนอื่นๆก็เข้ามาอ่านได้</p><blockquote>อะไรนะ? โฆษณาไม่เนียน? …มาทำเป็นรู้ทัน <em>👁👄👁</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*UxYmWAISX2HXpmuaDBOJVA.png" /><figcaption>ถนนทูเวย์ทั้งอ่านทั้งเขียนของ Web 2.0</figcaption></figure><p>แต่ทั้งนี้ทั้งนั้น ก็ยังมีประเด็นเรื่องการปรับเปลี่ยนโยกย้ายปลอมแปลงข้อมูลของผู้สร้างเว็บได้อยู่ คอมเม้นต์เราอาจถูกลบหรือแบนทิ้งได้ หรือวันดีคืนดีระบบ Online Banking อาจจะหยุดให้บริการไปดื้อๆ ซึ่งผู้ใช้อย่างเราๆก็คงได้แต่นั่งหน้าตึงแล้วมูฟออน</p><p>อีกประเด็นสำคัญก็คือ: มีผู้สร้างเว็บปริมาณไม่น้อยที่ต้องการข้อมูลส่วนตัวของเรา ก่อนที่เราจะเข้าไปใช้บริการได้ หลังจากนั้นจะโดนเก็บข้อมูลอะไรอีกบ้างก็ตอบได้ยาก แถมข้อมูลเหล่านั้นจะถูกเอาไปใช้อะไรบ้างก็สุดเราจะรู้ได้</p><blockquote>จะไม่ยอมให้ข้อมูลก็ลำบากเพราะโอนเงินผ่านอินเทอร์เน็ตมันสะดวกเกินห้ามใจ</blockquote><p>ที่พูดถึงนี่ไม่ได้แปลว่าผู้สร้างเว็บจะทำอะไรนอกลู่นอกทางกันไปทุกรายนะครับ (ถึงแม้ปัจจุบันจะมีเคสเกี่ยวกับข้อมูลและความเป็นส่วนตัวไม่น้อย) แต่อะไรที่<em>ทางเทคนิค</em>แล้วสามารถเกิดขึ้นได้ มันก็มักจะเกิดขึ้นอยู่เสมอไปจริงๆ</p><h4>Web 3.0: อ่านเขียนได้ แถมอำนาจอยู่ในมือเรา</h4><p>และแล้วเราก็มาถึงยุคที่สาม</p><p>ซึ่งคำว่า “Web3” นี่ ผมคิดว่ามันยังไม่มีคำนิยามและขอบเขตที่ชัดเจนนัก ต่างคนต่างมีนิยามที่ให้กับมันที่ใกล้เคียงกัน แต่ก็มีจุดเล็กๆน้อยๆที่แตกต่างกันบ้าง</p><p>สำหรับบทความนี้ผมขอเล่าถึงนิยามของ Web3 สำหรับผมเองให้ฟัง</p><p><strong>Web3</strong> คือโลกอินเทอร์เน็ตที่ไม่มีใครเป็นเจ้าของมันอย่างแท้จริง ข้อมูลทั้งหมดนั้นไม่มีใครคนใดคนหนึ่งถือแต่เพียงผู้เดียว ไม่มีความลับและข้อมูลทุกอย่างสามารถถูกตรวจสอบความถูกต้องได้โดยทุกๆคน <strong>ทุกคน</strong>สามารถเข้าถึงอินเทอร์เน็ตและระบบทั้งหมดโดยไม่มีใครสามารถห้ามได้</p><p>ถ้าขอสามคำ ผมก็คงต้องขอยกคำยอดฮิตที่ใช้อธิบาย Web3 ขึ้นมา ซึ่งก็คือ: Decentralized, Permissionless กับ Trustless</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/567/1*IdXWA9sGDR-8nlKkE2sCgg.png" /><figcaption>โลกใหม่</figcaption></figure><p>มาลองขยายความกันดูครับ ทีนี้เพื่อความเห็นภาพขอยกตัวอย่างเทียบกับระบบ Online Banking ใน Web2</p><p><strong>Decentralized</strong> หมายความว่า แทนที่ธนาคารจะเป็นผู้สร้างระบบที่ถือข้อมูลทั้งหมดและเป็นผู้มีอำนาจอนุญาตให้เราสามารถใช้ระบบได้นั้น จะกลายเป็นเครือข่ายคอมพิวเตอร์(ที่เราก็เอาคอมพิวเตอร์เราไปเป็นหนึ่งในนั้นได้ถ้าต้องการ)เป็นคนถือข้อมูลแทน</p><p>ซึ่งในโลกของ Web2 นั้น เมื่อธนาคารเป็นคนเดียวที่เปิดระบบให้สามารถใช้งานบริการของเค้าได้ ถ้าหากระบบธนาคารเซิฟเวอร์ล่มหรือโดนแฮคไป ผู้ใช้บริการทุกคนก็จะได้แต่นั่งมองตาปริบๆ เพราะไม่มีหนทางอื่นให้เราสามารถโอนเงินของธนาคารนั้นๆได้เลย</p><p>แต่ในโลกของ Web3 นั้น หากเครื่องคอมพิวเตอร์เจ้าประจำที่เราใช้บริการเกิดอาการล่มไป เราก็สามารถไปเลือกใช้คอมพิวเตอร์เครื่องอื่นๆในเครือข่ายได้เลย เพราะทุกเครื่องก็มีข้อมูลเดียวกันอยู่และให้บริการได้เหมือนเครื่องประจำของเรา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*BqJuZGnUlPeAtB0GxiUtSA.png" /><figcaption>Decentralized แล้วระบบเจ้านึงล่มก็ไม่หวั่น</figcaption></figure><p><strong>Permissionless </strong>หมายความว่า แทนที่ธนาคารจะเป็นผู้กุมอำนาจหนึ่งเดียวในการเลือกให้บริการเราตามแต่เงื่อนไขที่ธนาคารกำหนด เราจะสามารถเข้าใช้งานบริการกับคอมพิวเตอร์ในเครือข่ายเจ้าไหนก็ได้ โดยที่ไม่มีใครมีอำนาจมาขวางเราได้เลย เพราะถ้าเจ้านึงเลือกไม่ยอมให้บริการเรา เราก็ไปหาคนอื่นที่ยอมให้บริการแทนได้เสมอ(หรือเราจะไปเป็นหนึ่งในสมาชิกเครือข่ายเองเลยก็ยังได้)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*MeqcGuJl3f3y5gEyzFGAcw.png" /><figcaption>Permissionless แล้วไม่มีใครขวางได้</figcaption></figure><p><strong>Trustless</strong> หมายความว่า แทนที่จะเช่ือใจธนาคารผู้สร้างระบบที่ผู้จัดการเบื้องหลังเป็นมนุษย์ที่มีโอกาสผิดพลาด และผู้มีอำนาจในธนาคารมีอำนาจปรับเปลี่ยนปลอมแปลงทำอะไรกับระบบก็ได้</p><p>เราเปลี่ยนมาเชื่อใจโค้ดคอมพิวเตอร์และกลไกการตกลงระหว่างคอมพิวเตอร์ ในเครือข่าย— เรียกว่า Consensus —ว่าจะให้ผลประโยชน์กับคนที่ทำงานถูกต้อง และลงโทษคนที่ทำงานผิดหรือปลอมแปลงข้อมูล</p><p>กล่าวได้อีกอย่างว่า จริงๆคำว่า Trustless ไม่ได้หมายถึงเราไม่ต้องเชื่อใจใครเลย แต่เราสามารถแบ่งความเชื่อใจให้คนในเครือข่ายคนละนิดละหน่อยได้ ไม่ต้องเชื่อใครคนใดคนหนึ่งหมดใจแบบ Web2</p><p>หากสนใจเกี่ยวกับ Trustless และ Consensus แนะนำให้อ่าน<a href="https://academy.binance.com/en/glossary/trustless">บทความ</a>เพิ่มเติมครับ เนื่องจากจะอธิบายเรื่อง consensus ลงรายละเอียดในบทความนี้เกรงว่าจะยาวกันเกินไป</p><blockquote>นี่ก็ยาวแล้ว? อันนี้พยายามย่อแล้วจริงๆนะฮะ <em>🥲</em> ถ้าอยากอ่านบทความยาวของจริงเกี่ยวกับ Consensus ทักมาใน<a href="https://www.facebook.com/cleverse.team/">เพจ Cleverse</a> ดูได้(เขียนจริงเมื่อไหร่อีกเรื่อง)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSV5kvsksTDzGEzArN5SsQ.png" /><figcaption>Trustless แล้วไม่ต้องเชื่อใครหมดใจ</figcaption></figure><p>สรุปเทียบระหว่างระบบใน Web2 vs Web3 จะออกมาตามภาพด้านล่างนี้ครับ:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*dAY_3ACpOJD58VUlxbJKvg.png" /><figcaption>จับ Web 2.0 ชนกับ Web 3.0</figcaption></figure><p>จริงๆแล้ว ไอเดียและสิ่งที่ Web3 จะเป็นไม่ได้สุดแค่สามสิ่งนี้ แต่ยังมีเรื่องอีกเยอะแยะมากมายที่ผู้คนกำลังวาดภาพเกี่ยวกับอนาคตของอินเทอร์เน็ตด้วย เช่น การนำ AI หรือ Machine Learning มาต้มยำกับเว็บไซต์เพื่อทำให้ประสบการณ์ใช้งานดีขึ้น</p><p>…ก่อนที่จะออกทะเลต้มยำ ขอพาไหลไปสู่หัวข้อถัดไปสำหรับบทความนี้ครับ</p><blockquote>Web3 ไอเดียก็ดูเหมือนจะดีนะ แต่สามข้อนั้นมันทำได้จริงเรอะ?</blockquote><p>ทำได้จริงครับ ด้วยสิ่งที่เรียกว่า Blockchain</p><h3>Blockchain</h3><p>Blockhain คืออะไร? สำหรับนิยามสั้นๆขอยกคำพูดจากเว็บ Ethereum.org มาเลยแล้วกันครับ:</p><blockquote>A blockchain is a public database that is updated and shared across many computers in a network. — <a href="https://ethereum.org/en/developers/docs/intro-to-ethereum/#what-is-a-blockchain">Ethereum.org</a></blockquote><blockquote><strong>แปลไทย:</strong> Blockchain คือฐานข้อมูลที่เปิดสาธารณะให้ทุกคนสามารถเข้ามาดูได้ โดยที่มีเครือข่ายคอมพิวเตอร์เป็นคนถือข้อมูลและจัดการการเปลี่ยนแปลงของข้อมูล</blockquote><p>ทีนี้มาลองแกะคำว่า Block + chain แยกกันออกมาดูทีละอันกัน</p><h4>“Block” คือ?</h4><p>Block ก็คือกลุ่มข้อมูลธุรกรรมที่เกิดขึ้นต่อเนื่องกัน โดยธุรกรรมแต่ละอันจะบอกว่าสถานะของฐานข้อมูลจะต้องถูกเปลี่ยนไปอย่างไรบ้าง เวลามีธุรกรรมใหม่เกิดขึ้น(เช่นผู้ใช้โอนเงิน)ก็จะถูกนำไปใส่ Block ซึ่งการที่ธุรกรรมนั้นจะเปลี่ยนแปลงฐานข้อมูลจริงๆ ต้องรอให้ทั้งเครือข่ายยอมรับก่อนว่า Block นี้ถูกต้องไม่มีการปลอมแปลงข้อมูล</p><p>ตัวอย่างธุรกรรมเช่น บัญชี A โอนเงินให้ บัญชี B 10 USD <strong>ทำให้ในฐานข้อมูล บัญชี A เงินต้องลดลง 10 USD และ บัญชี B เงินต้องเพิ่มขึ้น 10 USD</strong></p><h4>“Chain” ล่ะ?</h4><p>Chain เป็นกลไกที่บอกว่า Block ควรต้องถูกเก็บเชื่อมต่อกันเป็นเส้นๆและข้อมูลธุรกรรมภายในไม่สามารถถูกแก้ไขได้ โดยที่ทุกๆ Block จะมีวิธีการเข้ารหัสเพื่อเชื่อมไปยัง Block ก่อนหน้า เชื่อมย้อนไปเรื่อยๆจนถึง Block แรก — เรียกอีกชื่อว่า Genesis Block — ซึ่งการที่ Block ถูกเชื่อมต่อๆกันเป็นโซ่หนึ่งเส้นแบบนี้เลยมีชื่อเรียกว่า Blockchain นั่นเอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MyM4yZRH3jPpCSiat6u2pQ.png" /><figcaption>หน้าตาง่ายๆของ Blockchain</figcaption></figure><p>เวลามี Block ใหม่พยายามขอต่อที่ท้ายเชน คอมพิวเตอร์ — เรียกว่า Node — ในเครือข่าย ต้องยอมรับก่อนว่าธุรกรรมภายในถูกต้อง และ Block นั้นเข้ารหัสชี้ไปยัง Block สุดท้ายได้ถูกต้อง หลังจากเครือข่ายยอมรับ Block ใหม่นี้แล้วก็จะนำเอา Block มาต่อท้ายสุดของเชน เพื่อให้ Block ใหม่ในอนาคตมาต่อกับ Block นี้สืบเนื่องไป ​​(อ่านละเอียดได้<a href="https://ethereum.org/en/developers/docs/blocks/">ที่นี่</a>)</p><p>ทีนี้อาจจะมีคำถามผุดขึ้นในใจว่า <em>เข้ารหัส</em> นี่มันคืออะไรฉันงงใจจัง</p><p>มาดำดิ่งดูการทำงานของ Blockchain กัน</p><h4>Blockchain ทำงานยังไงของมัน?</h4><blockquote>หัวข้อนี้อาจจะลงลึกเกินไปบ้าง สามารถข้ามไปหัวข้อ Ethereum ได้เลยถ้าต้องการครับ <em>🥺</em></blockquote><p>เพื่อการอธิบายขอใช้ตัวอย่างระบบ Banking เหมือนเดิมครับ</p><p>เริ่มด้วย Blockchain โล่งๆเลย ฐานข้อมูลว่างเปล่า ไม่มีธุรกรรมใดๆ</p><p>จากนั้นมี 2 ธุรกรรมเกิดขึ้น:</p><ul><li>Alice ฝากเงิน 100 USD</li><li>Bob ฝากเงิน 50 USD</li></ul><p>จากนั้น Node ที่ Alice กับ Bob ใช้ ก็จะจัดการมัดธุรกรรมให้กลายเป็น Block แล้วสร้างสิ่งที่เรียกว่า <strong>“Hash”</strong> ขึ้นมาโดยการเข้ารหัสด้วยข้อมูลเหล่านี้: Hash ของ block ก่อนหน้า กับธุรกรรมทั้งหมดใน Block นี้</p><p>สามารถมองว่า Hash เป็นลายนิ้วมือของแต่ละ Block เลยก็ได้ — เหมือนเป็นผลลัพธ์จากการปั่นรวม DNA ของ Block ออกมา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*z-cTYrmR6WLuzbSlyL6a_A@2x.png" /></figure><p>จากนั้น Node ก็จะส่ง Block นี้ไปให้เครือข่ายตรวจสอบความถูกต้องของ Block นี้ ซึ่งถ้าเครือข่ายยอมรับแล้วว่าถูกต้อง Block นี้ก็จะถูกนำไปต่อท้ายเชน แล้วคอมพิวเตอร์ทุกเครื่องในเครือข่ายก็อัปเดตเชนใหม่ให้เหมือนกัน</p><p>หลังจากนั้นแล้ว Alice ก็ทำธุรกรรมโอนเงิน 20 USD ให้ Bob</p><p>ซึ่ง Node ก็จะนำธุรกรรมดังกล่าวมาสร้าง Block 2 เพื่อเอาเข้าเชน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*U1q942gB3KF6SHevso32IQ@2x.png" /></figure><blockquote>ถ้าอยากรู้ว่าตอนนี้ Alice กับ Bob มีเงินอยู่เท่าไหร่บ้าง เราจะรู้ได้จากการไล่ทำธุรกรรมทีละอันตั้งแต่ Block 0 มาเลย</blockquote><p>ทีนี้ สมมติว่ามี Node หนึ่งพยายามโกง โดยการเปลี่ยนธุรกรรมอันแรกสุดเลย เพิ่มเงินที่ Alice ฝากจาก 100 USD เป็น 110 USD ล่ะ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*MopfaEzAKOe9eICi0-e64Q@2x.png" /><figcaption>โตไปไม่โกง</figcaption></figure><p>จากภาพจะเห็นได้ว่า คนที่พยายามเปลี่ยนแปลงข้อมูลใน Blockchain ไม่สามารถแค่เปลี่ยนธุรกรรมตรงๆแล้วจบ แต่ต้องไล่เข้ารหัส Block หลังจากนั้นใหม่<strong>ทุก Block </strong>— เพราะการเข้ารหัสนั้น ถ้าข้อมูลเปลี่ยนไปแม้แต่นิดเดียว ผลลัพธ์จะเปลี่ยนไปทันที — ซึ่งในทางเทคนิคแล้วการเข้ารหัสหนึ่งครั้งกินทรัพยากรเครื่องคอมพิวเตอร์ค่อนข้างมาก ยิ่งถ้า Blockchain ยาวมากๆแล้วต้องเข้ารหัสใหม่เยอะๆ จะกินทรัพยากรเยอะถึงขั้นที่ไม่คุ้มทำแต่อย่างใด</p><p>ทำไมไม่คุ้มทำ? เพราะว่าถึงแม้จะปั้นน้ำให้เป็นเชนใหม่ได้สำเร็จ การจะนำเชนที่ถูกปลอมแปลงนี้ไปไล่บอกทุกคนในเครือข่ายให้ยอมรับว่าเชนนี้ถูกต้องนั้นเป็นไปไม่ได้เลย โดยเฉพาะถ้าคนส่วนใหญ่รู้ว่าเชนที่ถูกต้องคืออะไรและไม่ได้อยากร่วมมือโกงด้วย (ซึ่งโดยกลไกผลประโยชน์แล้ว คนส่วนใหญ่ย่อมไม่อยากทำ ด้วยเหตุผลที่อธิบายไปใน Trustless)</p><p>การทำงานดังนี้ของ Blockchain จึงทำให้การทำฐานข้อมูลที่ทั้ง Decentralized, Permissionless และ Trustless เป็นไปได้จริงนั่นเอง</p><blockquote>ออกตัวก่อนเลยว่าอันนี้คือการอธิบายการทำงานของ Blockchain แบบพยายามย่อหนักมาก ถ้าอยากให้ดำดิ่งจริงๆ<a href="https://www.facebook.com/cleverse.team/">ทักมาได้ครับ</a></blockquote><p>ถัดไป อยากพูดถึง Ethereum แบบเร็วๆซักนิดครับ</p><p>ซึ่งเป็น Platform เจ้าที่ผมคิดว่าทำให้ Blockchain โด่งดังขึ้นและมีของให้ใช้มากมาย ไม่ใช่เป็นเพียงสกุลเงินแบบ <a href="https://www.investopedia.com/terms/b/bitcoin.asp">Bitcoin</a> ทำให้เราเข้าใกล้อินเทอร์เน็ตแบบ Web3 ที่แท้จริงขึ้นไปอีกก้าวนึง</p><h3>Ethereum</h3><p>เจ้า Ethereum เป็น Platform ที่ใช้ blockchain เป็นไอเดียหลัก เพื่อให้นักพัฒนาสามารถเข้ามาสร้างนวัตกรรมบน Blockchain ได้</p><p>ในโลกของ Ethereum นั้น จะมี Blockchain อยู่เส้นเดียวที่ทุก Node ในเครือข่ายยอมรับว่าเป็นเชนที่ถูกต้อง ซึ่งทุก Node ก็จะมีเชนที่หน้าตาเหมือนกันนี้คัดลอกเก็บไว้บนเครื่องตัวเอง</p><p>Node ใดๆก็ตามใน Ethereum สามารถขอให้ทั้งเครือข่าย คำนวณหรือทำธุรกรรมใดๆก็ตามได้ เช่น Alice ส่งข้อความให้ Bob หรือ Bob ขอกู้เงินจาก Alice — ซึ่งสังเกตว่าธุรกรรมไม่ได้สุดอยู่แค่การโอนเงินอีกแล้ว</p><p>ซึ่งการส่งข้อความหรือทำธุรกรรมอื่นใดที่ซับซ้อนนี้ โดยปกติแล้วผู้ใช้แบบ Alice ก็จะไม่ใช่คนนั่งคำนวณเอง ว่าธุรกรรมนี้จะเปลี่ยนแปลง Blockchain ไปยังไงบ้าง แต่มักจะเป็นชุดคำสั่งที่มีนักพัฒนาสร้างขึ้นมาให้ผู้ใช้สามารถเรียกใช้ได้ ชุดคำสั่งนี้เรียกว่า <strong>Smart Contract</strong></p><h4>Smart Contract? ชื่อดูจะเท่ ว่าแต่มันคืออะไร</h4><p>แบบที่กล่าวไปด้านบน มันคือชุดคำสั่งที่นักพัฒนาสามารถสร้างขึ้น และนำไปวางบน Blockchain เพื่อให้ทุกคนเรียกใช้ได้ โดยนักพัฒนาสามารถสร้าง Smart Contract ได้หลากหลาย ตั้งแต่ทำระบบธนาคาร ระบบกู้ยืมเงิน ระบบซื้อขายของ และอื่นๆอีกนับไม่ถ้วน</p><p>ซึ่ง Smart Contract จะเป็นโค้ด(โดยมากเขียนด้วยภาษา <a href="https://docs.soliditylang.org/">Solidity</a>) ทำให้การทำธุรกรรมใดๆผ่าน Contract นี้ จะเป็นไปตามโค้ดที่เขียนไว้เป๊ะๆ โดยที่ทุกคนสามารถดูได้ว่าชุดคำสั่งนี้ถูกเขียนไว้ยังไง จะเกิดอะไรขึ้นบ้างหากเราไปเรียกใช้ด้วย Input แบบนี้</p><p>สิ่งนี้ทำให้ผู้ใช้สามารถทำธุรกรรมที่ซับซ้อนได้ โดยไม่ต้องหลุดออกจากโลกของ Blockchain เลยทำให้การทำธุรกรรมใดๆบน Ethereum จะยังคงคอนเซ็ปต์ Decentralized, Permissionless, Trustless อยู่</p><p>ตัวอย่างคร่าวๆของชุดคำสั่งที่ Smart Contract ที่ทำงานแบบกระปุกน้องหมู — ฝากเงินเข้าไปแล้วจะถอนได้เฉพาะหลังจาก Deadline ที่กำหนด:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*J53xWCjEzkwx96lTNyiKXA.png" /><figcaption>ตัวอย่างชุดคำสั่งของ Smart Contract (ไม่ใช่โค้ดจริง 👀)</figcaption></figure><p>Smart Contract นี้ ถือได้ว่าเป็นอาวุธสำคัญที่สุดทำให้การสร้าง Application ที่ซับซ้อนบนโลกของ Web3 เกิดขึ้นได้จริงเลยก็ว่าได้</p><p>ซึ่งการที่ Ethereum เป็น Platform เจ้าแรกที่ทำให้ Blockchain สามารถถูกนำไปใช้ในเคสที่หลากหลายมากมายได้ โดยเฉพาะเมื่อเรามี Smart Contract ถูกพัฒนาขึ้นเพื่อตอบโจทย์ใหม่ๆอยู่อย่างไม่หยุดยั้ง ก็เรียกได้ว่ายิ่งผลักดันให้เราเข้าใกล้วันที่ยุคใหม่ของอินเทอร์เน็ตจะมาถึงเข้าไปทุกที</p><h3>ม้วนเสื่อเก็บหมอน</h3><p>Web 3.0 เป็นทิศทางที่อินเทอร์เน็ตกำลังพุ่งไปเพื่อเล็งจะคืนอำนาจแก่ผู้คน ส่งอำนาจจากกลุ่มเล็กๆของตัวตนใหญ่ๆสู่มือของผู้ใช้ทุกคน ขยับความเชื่อใจที่ต้องมอบทั้งหมดให้กับผู้สร้างเว็บไซต์ไปสู่เครือข่ายของคนที่เป็นผู้ใช้อินเทอร์เน็ตคนนึงเช่นเดียวกับเรา</p><p>เทคโนโลยี Blockchain ถือเป็นชิ้นส่วนหลักที่ทำให้เป้าหมายนั้นเป็นจริงได้ นำมาโดย Ethereum ที่แบก Smart Contract เป็นอาวุธสำคัญในการตอบโจทย์ที่มีคุณค่า เพื่อนำอินเทอร์เน็ตเข้าสู่ยุคใหม่ …<strong>Web 3.0</strong> ครับ</p><blockquote>ส่วนตัวแล้ว ผมเชื่อว่าบริการทุกอย่างบนอินเทอร์เน็ตไม่ได้จะกลายเป็น Web3 หรอกนะครับ เพราะ Application หลายอย่าง มันก็ไม่ได้ควรเป็น Decentralized, Permissionless, Trustless ขนาดนั้น คิดว่าจะเป็นการอยู่ร่วมกันของ Web1, Web2, Web3 ตามความเหมาะสมเสียมากกว่า</blockquote><blockquote>เป้าหมายของบทความนี้แท้จริงแล้วเพียงอยากอธิบายความหมายของ Web3 กับเทคโนโลยี Blockchain แค่นั้นครับ เพราะผมเชื่อว่า Blockchain ยังไม่ใช่ปลายทางของ Web3 แต่อย่างใด วันพรุ่งนี้อาจจะมีเทคโนโลยีเปลี่ยนโลกใหม่ๆผุดขึ้นมา ที่สามารถตอบโจทย์ของ Web3 ได้ดียิ่งกว่า Blockchain ก็เป็นได้</blockquote><p>จบแล้วฮะ สำหรับบทความนี้</p><p>จริงๆแล้วยังมีอีกหลายเรื่องมากที่น่าพูดถึง ทั้งเรื่อง Consensus, ข้อดีข้อเสียของ Blockchain แล้วมันกำลังถูกแก้ยังไงบ้าง, Ethereum 2.0… ไล่หัวข้อได้อีกสามหน้ากระดาษ</p><p>ถ้าอยากฟีดแบคบทความนี้ หรืออยากเห็นบทความเรื่องไหนเพิ่ม ย้ำอีกครั้งครับ; <a href="https://www.facebook.com/cleverse.team/">ทักมาได้</a></p><p>รอติดตามบทความถัดไปจาก Cleverse ได้เลยครับ</p><p><em>สปอยล์: เป็นบทความสำหรับ Developer แหละ</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c8c24da3ca1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cleverse/welcome-to-the-world-of-web-3-0-thai-version-6c8c24da3ca1">เช็คความพร้อมแพ็คความรู้เตรียมเข้าสู่โลกแห่ง Web 3.0 กัน</a> was originally published in <a href="https://medium.com/cleverse">Cleverse, a Web3 Focused Venture Builder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>