<?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 Wichita Serchuit on Medium]]></title>
        <description><![CDATA[Stories by Wichita Serchuit on Medium]]></description>
        <link>https://medium.com/@wichita.s?source=rss-ff6273e61be7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QwH8TbPDYwoUI6amOFUXoQ.jpeg</url>
            <title>Stories by Wichita Serchuit on Medium</title>
            <link>https://medium.com/@wichita.s?source=rss-ff6273e61be7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:40:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wichita.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[Javascript Modules คืออะไร มีอะไรบ้าง? — CJS, AMD, UMD, ESM]]></title>
            <link>https://medium.com/under-ledger/javascript-modules-system-cjs-amd-umd-esm-87e968271411?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/87e968271411</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-modules]]></category>
            <category><![CDATA[js-module]]></category>
            <category><![CDATA[modules]]></category>
            <category><![CDATA[js]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 03:38:19 GMT</pubDate>
            <atom:updated>2023-03-31T08:58:30.675Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NJuLH1FAZ9gZ_j55dCuA9Q.png" /></figure><h4>Javascript Module</h4><ul><li>module ในที่นี้เปรียบเทียบเหมือน building block of code เป็นบล็อคไม้ที่นำมาต่อรวมกันได้ แล้วแต่วัตถุประสงค์ที่เราต้องการ</li><li>ปกติจะจัดการ module โดย 1 module เป็น 1 file</li><li>มักประกอบด้วย function, object หรือ class ที่เกี่ยวข้องกัน มีวัตถุประสงค์เฉพาะของแต่ละ module</li><li>ใช้จัดระเบียบโค้ด เพื่อเลี่ยงไม่ให้มีชื่อซ้ำและเก็บไว้ในพื้นที่แยกต่างหาก</li><li>ใช้ import และ export ทำให้แชร์โค้ดร่วมกันได้ภายใน application ได้</li><li>สามารถแชร์โค้ดหรือ reuse code ได้ เช่น npm ที่ไว้ให้เราสามารถ access ทั้ง 700,000 packages ได้</li></ul><blockquote>“Modules give the code structure and boundaries”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bbRvi0kcp2R05id43-crgA.png" /><figcaption>credit: <a href="https://medium.com/frontend-development-with-js/javascript-modules-50eaca82df89">JS Module (IIFE →CJS→AMD →ES6)</a></figcaption></figure><p>เริ่มจากตอนแรกที่ Javascript ถูกพัฒนาขึ้นมานั้นยังไม่มี module syntax (ไม่มี import/export) เป็นเพียงแค่ inline script หรือใช้แค่ script tag เท่านั้น ปัญหาของการไม่ได้ใช้ module เช่น</p><ul><li><strong>Lack of code usability:</strong> reuse โค้ดไม่ได้เพราะไม่มี import/export ต้อง copy ไปวางที่ต้องการเอง</li><li><strong>Dependency management issue:</strong> เช่น การวางตำแหน่งของ script tag, dependency ไม่ครบ หรือถ้าต้องการลบอันไหนก็ต้องตามไปลบทุกที่ที่เอาไปวางไว้</li><li><strong>Maintainability challenges:</strong> จัดการโค้ดได้ยาก เช่น ถ้าต้องการแก้ไข function ที่ถูก copy ไปวางไว้หลายหน้า ก็อาจจะพลาดแก้ไม่ครบ เป็นต้น</li></ul><p>นักพัฒนาจึงเริ่มสร้างสิ่งที่เรียกว่า Modules ขึ้นมาเพื่อพยายามแก้ไขปัญหาที่เกิดขึ้น โดยต่างคนต่างพัฒนา module ของตนเอง เช่น Yahoo</p><blockquote>Yahoo มี JS module ของตัวเอง สร้างขึ้นเพื่อช่วยให้นักพัฒนาเว็บไซต์สามารถทำงานกับข้อมูลจาก Yahoo APIs ได้อย่างง่ายดายและมีประสิทธิภาพมากขึ้น โดยใช้ jQuery ajax method ในการเรียกข้อมูลจาก API แต่ปัจจุบันได้ยกเลิกการให้บริการแล้ว</blockquote><p>ต่อมา JavaScript community จึงได้ร่วมกันพัฒนา Javascript modules ประเภทอื่นอีกตามมาเพื่อเป็น standard ในการใช้งาน โดยสามารถแบ่งประเภทหลักๆ ได้แก่ CJS, AMD, UMD, และ ESM</p><h3>CJS</h3><ul><li>ย่อมาจาก CommonJS</li><li>ใช้ใน server-side เป็นหลัก เช่น Node.js เนื่องจากตอนพัฒนานั้น NodeJS กำลังบูมๆ (เพราะฉะนั้น NodeJS จึงใช้ CJS module format เรื่อยมา)</li><li>เป็นการ import module แบบ Synchornous</li><li>ไม่สามารถทำงานบน browser ได้</li><li>สามารถแชร์โค้ดระหว่างกันได้</li><li>ถ้าจะ import ใช้ <strong>require()</strong> method เป็นการ <strong>copy</strong> imported object ของ library นั้นๆ มาใช้งาน</li><li>ถ้าจะ export ใช้ <strong>module</strong> object (assign to <strong>module.exports</strong>)</li></ul><pre>//main.js<br>const AwesomePerson = require(&#39;./awesome&#39;); // import from other module<br>//awesome.js<br>function AwesomePerson(name) {<br> this.name = name;<br>}<br>AwesomePerson.prototype.speakTruth = function() {<br> console.log(`${this.name} is awesome!`);<br>}<br>module.exports = AwesomePerson; // export to other module</pre><h3>AMD</h3><ul><li>ย่อมาจาก Asynchronous Module Definition</li><li>ตรงตัวตามชื่อ import module แบบ Asynchronous</li><li>เน้นใช้กับ client-side (browser) ใช้เมื่อต้องการโหลด module แบบ dynamic</li></ul><blockquote><em>การโหลด module แบบ dynamic คือโหลดและใช้โมดูลในขณะที่ program กำลังรันขึ้นมา และ module จะถูกโหลดเมื่อต้องการใช้งานเท่านั้น ทำให้สามารถลดเวลาในการโหลดหน้า browser ได้</em></blockquote><pre>define([&#39;jquery&#39;], function ($) {       // array of dependency <br>    // methods<br>    function myFunc() {};<br>    <br>    // exposed public methods<br>    return myFunc;<br>});</pre><p>หรือเขียนแบบ CommonJS wrapping ก็ได้ (ใช้ require ในการ import module)</p><pre>define(function (require) {<br>    var dep1 = require(&#39;dep1&#39;),<br>        dep2 = require(&#39;dep2&#39;);<br>    return function () {};<br>});</pre><h3>UMD</h3><ul><li>ย่อมาจาก Universal Module Definition</li><li>ถูกสร้างขึ้นมาเพื่อให้สามารถทำงานได้ทั้ง server-side และ client-side</li><li>เป็น pattern ที่ทำให้สามารถใช้งาน module หลายๆ แบบด้วยกันได้</li></ul><p>UMD ช่วยให้ module สามารถใช้งานได้ใน environment ต่างๆ ไม่ว่าจะเป็น AMD, CJS หรือ Browser globals โดยที่ไม่ต้องเปลี่ยนโค้ดของ module เองตามแต่ละ enviroment ที่จะไปรัน</p><pre>(function (root, factory) {<br>  if (typeof define === &#39;function&#39; &amp;&amp; define.amd) {<br>    //AMD<br>    define([&#39;jquery&#39;], factory)<br>  } else if (typeof exports === &#39;object&#39;) {<br>    // Node, CommonJS-like<br>    module.exports = factory(require(&#39;jquery&#39;));<br>  } else {<br>    // Browser globals (root is window)<br>    root.returnExports = factory(root.jquery);<br>  }<br>  }(this, function ($) {<br>  // methods<br>  function myFunction() {};<br>  <br>  // exposed public method<br>  return myFunct;<br>}));</pre><p>ในตัวอย่างนี้ มีการสร้างฟังก์ชั่นแบบ self-executing ที่รับพารามิเตอร์สองตัว คือ root และ factory</p><p>จากโค้ดจะเห็นได้ว่า UMD pattern มีการใช้ condition เช็ค execution environment ก่อนและจะเลือกใช้วิธีการ import module ให้เหมาะสมมากที่สุด</p><p>เช่น</p><pre>if (typeof define === &#39;function&#39; &amp;&amp; define.amd) {<br>  //AMD<br>  define([&#39;jquery&#39;], factory)<br>} </pre><p>if นี้เป็นการเช็คว่าโค้ดชุดนี้ได้ execute ผ่าน AMD module loader หรือไม่ ถ้าใช่ module จะถูก import โดยการเรียก define function (โดยระบุ jquery เป็น dependencies)</p><pre>else if (typeof exports === &#39;object&#39;) {<br> // Node, CJS<br>  module.exports = factory(require(&#39;jquery&#39;));<br>} </pre><p>else if นี้เช็คว่าโค้ดชุดนี้ถูกโหลดผ่าน Node.js หรือระบบ CJS หรือไม่</p><pre>else {<br> // Browser globals (root is window)<br>  root.returnExports = factory(root.jquery);<br>}</pre><p>และ else จะทำการ import module โดยใช้ <strong>factory() </strong>และการส่ง <strong>jQuery</strong> เข้าไปใน parameter</p><h3>ESM</h3><ul><li>ESM มาจาก ECMAScript Module</li><li>ใช้คำสั่ง import / export</li><li>เป็น standard ที่ออกแบบมาเพื่อให้แน่ใจว่า javascript code ชุดเดียวกันสามารถทำงานบน browser ที่แตกต่างกันได้ (เช่น โค้ดเว็บเดียวกัน สามารถเปิดได้ทั้งบน Firefox, Chrome และ Safari)</li><li>ปัจจุบันถูก support โดย browsers ทั้งหมดแล้ว</li><li>ESM สามารถใช้ได้ทั้ง server-side และ client-side</li><li>ช่วยให้ bundler เช่น Webpack สามารถลบโค้ดที่ไม่จำเป็นออกได้ ทำให้เว็บไซต์สามารถส่งโค้ดน้อยลงเพื่อให้โหลดเร็วขึ้นได้</li></ul><blockquote><em>Module bundler: การทำให้ javascript รวมกันเป็นก้อนเดียวเพื่อให้ html อ่านได้</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*34JmRcs5pcu1RGICYLJ8aA.png" /><figcaption>credit: <a href="https://medium.com/@Mnosuk/create-react-app-%E0%B8%AB%E0%B8%A5%E0%B8%9A%E0%B9%84%E0%B8%9B-%E0%B8%A1%E0%B8%B2%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-module-bundler-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-parceljs-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-eeb98de9dabd">create-react-app หลบไป! มาสร้าง module bundler ด้วย Parcel กันเถอะ</a></figcaption></figure><pre>Export                                        <br>// msg.js                                                    <br>export default const msg = &#39;Yay ES6!&#39;;        <br><br>// lib.js<br>export const sum = (a, b) =&gt; a + b;           <br>export const product = (a, b) =&gt; a * b;       <br>export const quotient = (a, b) =&gt; a / b;<br><br>Import<br>import msg from &#39;./msg.js&#39;;<br>import * as lib from &#39;./lib.js&#39;;<br>import { sum, product } from &#39;./lib.js&#39;;</pre><p>ESM สามารถรันใน script tag ได้ด้วย</p><pre>// Add a module script<br>&lt;script type=&quot;module&quot; src=&quot;main.js&quot;&gt;&lt;/script&gt;   // specified for module type<br><br>// Fallback for older browser<br>&lt;script nomodule src=&quot;bundle.js&quot;&gt;&lt;/script&gt;</pre><h4><strong>สรุป</strong></h4><ul><li>ESM — ปัจจุบันใช้ดีที่สุด เพราะ syntax เขียนง่าย, รองรับการโหลดแบบ asynchronous, ใช้งานได้ทั้งบน client, server เป็น recommended format สำหรับ front-end applications ในปัจจุบัน</li><li>UMD — ทำงานได้ทั้งบนฝั่ง client และ server, ปกติใช้เป็น fallback ในกรณีที่ ESM ทำงานไม่ได้</li><li>CJS — โหลด module แบบ synchronous เหมาะกับ server-side</li><li>AMD — โหลด module แบบ asynchronous เหมาะกับ client-side</li></ul><p>reference:</p><ul><li><a href="https://www.youtube.com/watch?v=GQ96b_u7rGc">JavaScript Modules Past &amp; Present</a></li><li><a href="https://www.freecodecamp.org/news/anatomy-of-js-module-systems-and-building-libraries-fadcd8dbd0e">Learn the basics of the JavaScript module system and build your own library</a></li><li><a href="https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm">What the heck are CJS, AMD, UMD, and ESM in Javascript?</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87e968271411" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/javascript-modules-system-cjs-amd-umd-esm-87e968271411">Javascript Modules คืออะไร มีอะไรบ้าง? — CJS, AMD, UMD, ESM</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[มาสร้าง NFT Marketplace Smart Contract อย่างง่ายด้วย Solidity, Remix กันเถอะ]]></title>
            <link>https://medium.com/under-ledger/%E0%B8%A1%E0%B8%B2%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-nft-marketplace-smart-contract-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-solidity-remix-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-c69219aad4b5?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c69219aad4b5</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[marketplaces]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Tue, 14 Jun 2022 03:32:50 GMT</pubDate>
            <atom:updated>2022-06-14T04:03:52.281Z</atom:updated>
            <content:encoded><![CDATA[<p>เราสามารถเขียน smart contract สำหรับ NFT marketplace ได้อย่างง่ายๆ โดยที่เราจะใช้ Solidity และstandard พื้นฐานอย่าง ERC721</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*5RNA0SWAGd-WYHSf4wOUlg.png" /><figcaption>Marketplace workflow ที่เรากำลังจะทำ</figcaption></figure><p>โดยก่อนที่เราจะสร้าง Marketplace ได้นั้น เราก็ควรจะมีเจ้าตัว NFT ไว้ก่อนเพื่อใช้ในการทดลองใช้กับ contract ของเรา</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFXLAFpOS_kQ%3Fstart%3D8%26feature%3Doembed%26start%3D8&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFXLAFpOS_kQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFXLAFpOS_kQ%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/b6abbbe6bf6a4c1bcf80fb384b1c4ebc/href">https://medium.com/media/b6abbbe6bf6a4c1bcf80fb384b1c4ebc/href</a></iframe><p>📂 <a href="https://github.com/davidrazmadzeExtra/ERC721_NFT">Git repository สำหรับ ERC-721 NFT Tutorial ด้วย Solidity และ Remix ID</a>E</p><p>หลังจากที่ deploy NFT และได้ contract address มาแล้ว ก็เปิด <a href="https://remix.ethereum.org/">Remix IDE</a> มาลองเขียน contract กันได้เลย</p><p>📋 โดย function การทำงานหลักๆ ประกอบด้วย:</p><ol><li>List item — สามารถตั้งขาย item ใน marketplace ได้ โดยจะได้รับค่า item เมื่อมีคนมากด “Buy” item ตัวนั้นๆ</li><li>Buy item — สามารถซื้อ item ใน marketplace ได้ตาม Token ID ที่ระบุ</li><li>Get item by owner&#39;s address — เรียกดู item ทั้งหมดที่เป็นเจ้าของ</li><li>Get all items — เรียกดู item ทั้งหมดใน marketplace</li></ol><p>เริ่มจากการประกาศ contract ใหม่และใส่ค่า config ที่ต้องการต่างๆ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a0a0766ee5a7c3dc5df5cb857d465b95/href">https://medium.com/media/a0a0766ee5a7c3dc5df5cb857d465b95/href</a></iframe><p>โดยใน marketplace contract นี้มีการดึง <strong>ERC721</strong> เพื่อใช้ function ในการจัดการ NFT (โอน, เปลี่ยน owner), <strong>Ownable</strong> ใช้เพื่อตรวจ permission ของการเรียกใช้ contract และ <strong>ERC20</strong> เพื่อใช้ function ในการรับ-โอนเงินเมื่อทำการ Sell/Buy item</p><p>โดยใน contractor กำหนดให้มีการรับ:</p><ul><li>NFT contract address - ใช้ในการระบุ NFT identity ที่ต้องการใช้</li><li>Creator wallet address - ไว้โอน token ไปให้เจ้าของเมื่อขาย item สำเร็จแล้ว</li><li>Token contract address - ระบุว่าจะให้ซื้อ-ขาย item ด้วย token สกุลอะไร</li></ul><h4>List item / Cancel list item</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11868640d4cce08817b297d08908a537/href">https://medium.com/media/11868640d4cce08817b297d08908a537/href</a></iframe><p>ในการ list item เพื่อทำการประกาศขาย NFT นั้น จะต้องมีการ <strong>transfer NFT ไปยังตัวกลางอย่าง Marketplace contract</strong> โดยการ map กันของ token id และ item struct เก็บไว้ใน “tokenIdMarketItems”</p><p>ที่เราต้องเก็บ token id ไว้ใน “marketitems” (array) เพราะเมื่อ item เคยถูก list แล้วจะไม่สามารถลบออกจาก mapping ได้ (จะมีแค่อัพเดท status, price และ owner) จึงจำเป็นต้องมี variable มาเช็คว่าตัวไหน Active อยู่จริงบ้าง แทนการ loop เพื่อเช็ค item status ของทั้งหมด</p><blockquote>ก่อนเรียก listItems() จะต้องทำการ approve NFT ให้กับ marketplace contract address ด้วยจะได้ transfer NFT ได้</blockquote><h4>Get all items / Get own items</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25a8aeabbd99b60f53ab7e070cb25cad/href">https://medium.com/media/25a8aeabbd99b60f53ab7e070cb25cad/href</a></iframe><p>เรียกดู item ที่เคยเก็บไว้ใน marketplace ได้โดยการ loop “tokenIdMarketItems”</p><h4>Buy Item</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c5994a3c890333d688b8b597369d6a77/href">https://medium.com/media/c5994a3c890333d688b8b597369d6a77/href</a></iframe><p>ในการเรียก <strong>buyMarketItem()</strong> เพื่อซื้อ item นั้น item status จะถูกเปลี่ยนเป็น Sold และทำการ transfer NFT item ไปยังผู้ที่กดซื้อ (msg.sender)</p><p>หลังจากนั้น token ตามมูลค่าของ item price ที่ถูกตั้งไว้จะถูกแบ่งออกเป็น 2 ส่วน (ให้ creator และ ให้เจ้าของ item ที่ลงขาย) และถูกโอนออกไป</p><p>.</p><p>.</p><p>เมื่อเอามายำรวมกัน และใส่ event, emit ก็จะได้หน้าตาประมาณนี้</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/91b10e50e5956597f2b67cdf4b882d42/href">https://medium.com/media/91b10e50e5956597f2b67cdf4b882d42/href</a></iframe><p>📂 สามารถดูโค้ดฉบับเต็มได้ที่ <a href="https://gist.github.com/littletanggg/e5bf723d2484b94cd0d1192c051fd6ed">Simple NFT Marketplace smart contract</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c69219aad4b5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/%E0%B8%A1%E0%B8%B2%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-nft-marketplace-smart-contract-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-solidity-remix-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-c69219aad4b5">มาสร้าง NFT Marketplace Smart Contract อย่างง่ายด้วย Solidity, Remix กันเถอะ</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[สร้าง DAO community เพื่อโหวตใน Snapshot]]></title>
            <link>https://medium.com/under-ledger/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-dao-community-%E0%B9%80%E0%B8%9E%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%82%E0%B8%AB%E0%B8%A7%E0%B8%95%E0%B9%83%E0%B8%99-snapshot-3c1ef4340ccf?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c1ef4340ccf</guid>
            <category><![CDATA[dao]]></category>
            <category><![CDATA[dao-platform]]></category>
            <category><![CDATA[snapshot]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 03:58:32 GMT</pubDate>
            <atom:updated>2022-04-25T03:58:32.822Z</atom:updated>
            <content:encoded><![CDATA[<h3>สร้าง DAO Community เพื่อโหวตผ่าน Snapshot.org</h3><p><a href="https://snapshot.org/#/">Snapshot</a> เป็นระบบการลงคะแนนแบบ decentralized ที่สามารถคิด voting power ได้หลายวิธีโดยนำจำนวน token ที่เรามีใน wallet มาคำนวนได้เลยโดยที่ไม่ต้องฝากเข้าไปใน platform เน้นการใช้งานแบบ user-friendly สามารถสร้างและโหวต proposal ได้แบบไม่ต้องเสีย fee เนื่องจากระบบดำเนินการอยู่บน off-chain</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXVHOTcfTTXbnBzlKlMOXg.png" /></figure><p><strong>⭐ Key features ⭐</strong></p><ul><li>สร้างและโหวต proposal ฟรี (gasless)</li><li>โหวตได้แบบไม่มีการ locked up เหรียญเก็บไว้</li><li>การโหวตใช้วิธีเซ็นข้อความและส่งไปยัง contract ซึ่งทำให้ง่ายต่อการตรวจสอบผลโหวต (ใช้ <a href="https://blog.spruceid.com/ethereum-identity-review-of-eips-over-time/">EIP-1271</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uVLIXHo73JPq2MYNgPNnoQ.png" /><figcaption>ชSigned message for voting proposal</figcaption></figure><ul><li>มีความหยุ่นของ voting strategies ในการคำนวณผลโหวต เช่น โหวตโดยใช้ ERC20 tokens, NFT หรือใช้ contract อื่นๆ สามารถดูเพิ่มเติมได้ที่ <a href="https://docs.snapshot.org/strategies/what-is-a-strategy">Learn about the strategies</a></li><li>Spaces สามารถ custom โทนสีและชื่อโดเมนได้</li><li>เป็น fully open-source</li></ul><p>Snapshot มีส่วนประกอบหลักๆ อยู่ 2 ส่วน:</p><ol><li>Space — ชาแนลที่เป็นที่อยู่ของ proposal ที่แต่ละ branding หรือ platform สร้างขึ้นมาให้กับ community ของตัวเอง</li><li>Proposal — หรือหัวข้อการโหวต เมื่อกดเข้าไปก็จะมีรายละเอียดของการโหวต, choices และผลโหวต</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ngdwqVTQs2REd5pooiMJmg.png" /><figcaption>Snapshot component</figcaption></figure><h4>ขั้นตอนการสร้าง space</h4><p>ก่อนที่เราจะสร้าง space เป็นของตัวเองนั้น เราจะจำเป็นที่จะต้องมี ENS domain ก่อน หากยังไม่มีให้ไปสร้างก่อน สามารถอ่านวิธีสร้างได้ที่ <a href="https://medium.com/under-ledger/ens-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%AD%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%A1%E0%B8%B5%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B9%80%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-ens-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-27529ac3a37b">ENS คืออะไร? อยากมีเป็นของตัวเองต้องสร้าง ENS อย่างไร?</a></p><ol><li>เมื่อมี ENS domain เรียบร้อยแล้ว ให้กดปุ่ม “+” ตรงแถบด้านซ้ายมือเพื่อเข้าสู่หน้าการสร้าง space จากนั้นนำ ENS domain ใส่ไปและกด “Register”</li></ol><blockquote>ขั้นตอนนี้มีต้องเสียค่า gas ด้วย 💰</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mp_Y-UD-UnZZ57A1Rn4uhw.png" /><figcaption>Input domain name to create space</figcaption></figure><p>2. จากนั้นจะมีให้ใส่ Name, Symbol และ Network ซึ่งสามารถแก้ไขได้ในภายหลัง เมื่อกด “Create” จะมีหน้าต่าง Metamask เด้งขึ้นมาเพื่อให้ sign request ให้กด “SIGN” (EIP-1271 signed message เพื่อยืนยันข้อมูลเท่านั้น ไม่เสียค่า fee)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EeIMHgTv8coBetYObvxufg.png" /><figcaption>Signature request for setting up space detail</figcaption></figure><p>3. เมื่อเราสร้าง space ขึ้นมาสำเร็จเรียบร้อยแล้ว ให้เข้าไปที่ “Setting” เพื่อตั้งค่า</p><p><strong>Profile </strong>— ข้อมูลทั่วไปของ space เรา เช่น ชื่อ, Network, ช่องทางติดต่อ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*ko6EBCaQF0lAjKkGq0A8vQ.png" /><figcaption>Profile detail setting</figcaption></figure><p><strong>Custom domain</strong> — ปรับแต่ง space เพิ่มเติม เปลี่ยนโดเมนเนม, เปลี่ยนโทนสี</p><p><strong>Admins </strong>— ใส่ wallet address ที่จะเป็นผู้ควบคุม space</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*We30_z3LO9k6LSbNfVO5sg.png" /><figcaption>Set domain name and admin wallet address</figcaption></figure><p><strong>Strategies</strong> — JavaScript function ที่ใช้ในการคำนวณผลโหวตของ proposal ซึ่งสามารถเพิ่มได้สูงสุด 8 strategies และสามารถ เพิ่ม/ลบ ได้ตลอดเวลาไม่คิดค่า fee</p><blockquote>Strategies ที่นิยมใช้กันโดยทั่วไปคือ erc20-balance-of ซึ่งเป็นการ snapshot จำนวน ERC20 token ใน wallet ของ user มาใช้เป็น voting power ได้เลย</blockquote><p><strong>Proposal validation </strong>— กำหนดว่าอนุญาตให้ user สร้าง proposal ได้หรือไม่ และกำหนดได้ว่าต้องมี token เท่าไหร่ถึงจะสร้างได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*LES5OedNuCY8aLqoMmwfTw.png" /><figcaption>Set strategies and validation of proposal</figcaption></figure><p><strong>Voting</strong> — กำหนดระยะเวลาของ proposal ได้ว่าจะให้เปิดได้ถึงเท่าไหร่ หรือกำหนดให้ proposal เป็นโหวตประเภทใด</p><p><strong>Plugins </strong>— เพิ่ม function ที่ขยายการทำงานของ proposal ซึ่งโดยพื้นฐานแล้ว plugin และจะถูกใช้เมื่อเกิดการแสดงผลหรือเมื่อตอน process ผลโหวต</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*-ROSHVNNe6y9q1ZaJtPE8Q.png" /><figcaption>Set voting period and plugin of space</figcaption></figure><p>4. กด “Save” เพื่อบันทึก</p><p>ซึ่งการตั้งค่าเหล่านี้เราสามารถกลับมาแก้ไขได้ใหม่ภายหลังโดยไม่มีค่า fee ใดๆ</p><h4>ขั้นตอนการสร้าง proposal</h4><p>หลังจากที่ได้ space ใหม่แล้ว เรามาลองสร้าง proposal หรือหัวข้อการโหวตใหม่กัน</p><ol><li>กดเลือก “New proposal” ที่หน้าแรกของ space</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*hLNYswBAkt5kypyiAy2x1A.png" /><figcaption>New proposal button</figcaption></figure><p>2. ระบุ title, description และ Link ที่อยากให้กดไปดู information เพื่อ discussion เพิ่มเติม และกด “Continue” เพื่อดำเนินการต่อ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*qG3ocNdx8B3NU8KAVvoVgg.png" /><figcaption>Create a new proposal</figcaption></figure><p>3. เลือกระบบการโหวตและระยะเวลาที่จะเปิดให้โหวตของ proposal นี้<br>ซึ่งระบบการโหวตมีหลายแบบ ได้แก่</p><ul><li><strong>Single choice</strong> — เลือกตัวเลือกได้เพียงข้อใดข้อหนึ่ง</li><li><strong>Approval voting</strong> — เลือกตัวเลือกได้กี่ข้อก็ได้ ซึ่งแต่ละตัวเลือกที่เราเลือกไปนั้นจะมี voting power ที่เท่ากัน</li><li><strong>Quadratic voting</strong> —<strong> </strong>เป็นการเลือกโหวตแบบถ้าเราโหวตตัวเลือกใดตัวเลือกนึงโดยระบุ weight มากกว่าตัวเลือกอื่น ตัวเลือกนั้นจะยิ่งใช้ voting power ในการโหวตเยอะ (อ่านเพิ่มเติม <a href="https://towardsdatascience.com/what-is-quadratic-voting-4f81805d5a06">What Is Quadratic Voting?</a>)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7YL4kgnrM1IiiIzmrgMpA.png" /><figcaption>Quadratic voting type</figcaption></figure><ul><li><strong>Ranked choice voting </strong>— สามารถโหวตตัวเลือกที่มีโดยการจัดอันดับ (rank) และเลือกกี่ตัวเลือกก็ได้</li><li><strong>Weighted voting</strong>— สามารถโหวตโดยการใส่ตัวเลขน้ำหนักการโหวตให้กับแต่ละตัวเลือกที่โหวตได้</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*hjoVFI1iDJwvl70QkpmBCQ.png" /><figcaption>Set voting type and voting period</figcaption></figure><p>4. กด “Publish” เพื่อบันทึก proposal และเผยแพร่ให้กับ community เพื่อโหวต</p><p>📝 <strong>ตัวอย่าง proposal</strong> 📝</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*jjVQst5uyYbFg7wJvWxmFA.png" /><figcaption>Example of proposal</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c1ef4340ccf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-dao-community-%E0%B9%80%E0%B8%9E%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%82%E0%B8%AB%E0%B8%A7%E0%B8%95%E0%B9%83%E0%B8%99-snapshot-3c1ef4340ccf">สร้าง DAO community เพื่อโหวตใน Snapshot</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ENS คืออะไร? อยากมีเป็นของตัวเองต้องสร้าง ENS อย่างไร?]]></title>
            <link>https://medium.com/under-ledger/ens-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%AD%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%A1%E0%B8%B5%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B9%80%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-ens-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-27529ac3a37b?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/27529ac3a37b</guid>
            <category><![CDATA[ethereum-name-service]]></category>
            <category><![CDATA[en]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Mon, 11 Apr 2022 02:41:18 GMT</pubDate>
            <atom:updated>2022-04-11T02:41:18.021Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>ENS (Ethereum Name Service)</strong> ถูกสร้างขึ้นบน Ethereum network โดยมีวัตถุประสงค์เพื่อเปลี่ยน Address ที่ดูยาวๆ จำยากๆ ให้เป็นชื่อ domain ที่เราสามารถอ่าน จำและเข้าใจได้ง่าย เช่น เปลี่ยน 0xe12…82Ab เป็น seedtopia.eth</p><p>.</p><p>.</p><h4><strong>ขั้นตอนการสร้าง ENS</strong></h4><ol><li>เข้าสู่เว็บไซต์ <a href="https://app.ens.domains/">Ethereum Name Service</a> และใส่ชื่อหรือ address ที่ต้องการจดทะเบียน</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmTIshsrA_-qWjNElb7ITA.png" /></figure><p>2. กด “Request to Register” เพื่อลงทะเบียน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DhhkYTmgKuCZ2wiZkl5-iA.png" /></figure><p>3. รอประมาณ 1–3 นาที จากนั้นเมื่อถึงขั้นตอนที่ 3 ให้กด Register</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Df5ytyssZUz_KDxVGohTVg.png" /></figure><blockquote>Request to Register และ Register จะต้องเสีย Gas fee ด้วยทั้ง 2 ขั้นตอน 💰</blockquote><p>4. เมื่อลงทะเบียน ENS name เรียบร้อยแล้ว จะสามารถเข้าไปดู detail ต่างๆ ได้ ซึ่งถ้าหากต้องการเปลี่ยนค่าที่เคยถูกตั้งไว้ ก็จะต้องเสีย Gas fee ด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z9MY9hEXMR5ctq6K2U167g.png" /></figure><p>เท่านี้เราก็จะได้ ENS name ไว้ใช้กับ platform อื่นๆ และทำธุรกรรมอื่นได้แล้ว</p><p>Reference:</p><ul><li><a href="https://www.bitkub.com/blog/what-is-ens-3c5696807655">รู้จักกับ ENS โทเคนที่ให้คุณ “ตั้งชื่อ” บน Ethereum</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27529ac3a37b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/ens-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%AD%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%A1%E0%B8%B5%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B9%80%E0%B8%AD%E0%B8%87%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-ens-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-27529ac3a37b">ENS คืออะไร? อยากมีเป็นของตัวเองต้องสร้าง ENS อย่างไร?</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เก็บ Digital Asset ไว้ใน Multisig Wallet และ Custody ต่างกันอย่างไร?]]></title>
            <link>https://medium.com/under-ledger/%E0%B9%80%E0%B8%81%E0%B9%87%E0%B8%9A-digital-asset-%E0%B9%84%E0%B8%A7%E0%B9%89%E0%B9%83%E0%B8%99-multisig-wallet-%E0%B9%81%E0%B8%A5%E0%B8%B0-custody-%E0%B8%95%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-ab86ff84391d?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab86ff84391d</guid>
            <category><![CDATA[custodian]]></category>
            <category><![CDATA[multisig-wallet]]></category>
            <category><![CDATA[custody]]></category>
            <category><![CDATA[multisig]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Fri, 01 Apr 2022 03:00:45 GMT</pubDate>
            <atom:updated>2022-04-01T03:00:45.875Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMWJGu1iULdWFmU5XQ0oXw.jpeg" /><figcaption>source: <a href="https://www.bitcoin.com/">https://www.bitcoin.com/</a></figcaption></figure><h4>Multisig Wallet</h4><p>noncustodial wallet ไว้จัดเก็บ asset รูปแบบนึง โดยสามารถทำให้ต้องใช้ 2 digital signature หรือมากกว่าในเวลาเดียวกัน​ได้เพื่อใช้ในการ sign documents หรือ access เข้าถึง</p><p>จุดประสงค์หลักๆ ของการนำ multisig มาใช้จะเกี่ยวกับ security concerns​ เพื่อหลีกเลี่ยง <strong>single point of failure </strong>เนื่องจากการที่มีผู้ใดมีสิทธิ์เด็ดขาดในการทำธุรกรรมและถือ private key เพียงแค่ผู้เดียว (single-key address)</p><blockquote>single-key address : เช่น Metamask wallet ที่เรานิยมใช้ตอนนี้ ซึ่งจะใช้แค่ private key ของ owner เองเท่านั้น​</blockquote><ul><li>เหมาะกับ fund ที่ต้องการร่วมดูแลโดยคนหลายคน​ ร่วมกันตัดสินใจ, โหวต และทำ transaction ร่วมกัน <strong>ความรับผิดชอบจะอยู่ที่ signers ทุกคน</strong></li><li>โดยปกติแล้ว signers จะมาจากหลายหน้าทีหรือหลายแหล่ง เช่น fund manager + คนจาก DAO community + platform owner</li><li>เปรียบกับ traditional way ก็เหมือนกับมี company ดูแลกองทุนแทนการที่ fund manager จะดูแลเพียงคนเดียว</li><li>ต้องการมอบหมายให้ผู้อื่นทำธุกรรมแทน ​(ชั่วคราว เพราะ revoke ได้)​</li><li>บาง multisig wallet provider ผู้ฝากสามารถหาประโยชน์จาก asset ที่ฝากไว้ได้</li></ul><blockquote>การหาประโยชน์จาก asset เช่น multisig wallet มีการ integrate ร่วมกับ DEX ทำให้สามารถใช้ staking feature ได้ เพราะฉะนั้นผู้ใช้จะสามารถนำ asset ที่ฝากไว้ stake เพื่อเอาดอกเบี้ยผ่าน wallet ได้เลย</blockquote><p><a href="https://chdru.medium.com/keep-network-keep-staking-using-gnosis-safe-walletconnect-guide-b293e48b2ba1">Keep Network —KEEP Staking using Gnosis Safe - WalletConnect Guide</a></p><p>ตัวอย่าง use case เช่น</p><ul><li>มีกองทุนอยู่กองนึง ซึ่งจะอนุญาตให้เข้าถึงได้จะต้องใช้ 2 ใน 3 signature ของคนที่มีสิทธิ์ ​(แล้วแต่กฏที่ตั้งไว้) เพื่อทำธุรกรรมต่างๆ​</li><li>การสร้าง 2-of-3 multisig address สำหรับใช้แค่คนเดียวแต่ว่าเก็บแต่ละ key ไว้ที่ device ที่​ต่างๆ (เช่น mobile phone, laptop และ tablet)​ เพื่อลดความเสี่ยงที่ key ใดอันนึงจะโดนขโมยและจะทำให้ใช้งานไม่ได้​</li></ul><p>ตัวอย่าง platform ที่ใช้ multisig​:</p><ul><li><a href="https://www.sushi.com/"><strong>SushiSwap</strong></a><strong> </strong>(Defi) —10% ของ token ที่ปล่อยมาทั้งหมดจะถูกควบคุมโดย treasury หรือกองทุนสำหรับ dev โดยจะถูกเก็บไว้ใน multisig wallet</li><li><a href="https://aave.com/"><strong>AAVE</strong></a><strong> </strong>(Defi) — กองทุนพิเศษสำหรับจ่ายให้แก่ผู้ที่ร่วมกันเขียนกฏของ decentralized community (จ่ายแบบครั้งเดียว)​ ซึ่งควบคุมการจ่ายเงินโดยใช้ multisig wallet</li><li><a href="https://synthetix.io/"><strong>Synthetix</strong></a> (Defi) — ใช้ multisig wallet ควบคุมค่า transaction fee ของ protocol DAO เมื่อมีการเปลี่ยนแปลง อัพเกรด หรือปล่อย contracts ตัวใหม่</li><li><a href="https://balancer.fi/"><strong>Balancer protocol</strong></a> (Defi) — ใช้ multisig wallet ในด้านของ governance โดยหลังจากที่โหวตจบใน snapshot.org แล้ว signer ก็จะมีหน้าที่ในการกด sign​ transaction ตามที่ voting result ของ community</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*USc7T5qHc9_9RYwxLZeZiA.png" /><figcaption>source: <a href="https://blog.openzeppelin.com/smart-contract-security-guidelines-4-strategies-for-safer-governance-systems/">Balancer safety governance system</a></figcaption></figure><ul><li><a href="https://enzyme.finance/"><strong>Enzyme</strong></a> (Defi) — ใช้เพื่อทำ asset management ร่วมกันเป็นทีม​</li><li><a href="https://cowswap.exchange/#/swap"><strong>CowSwap</strong></a> (exchange) — ใช้ multisig ในการ approve transaction ร่วมกัน</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Jn3GiniVq5ArGwqWYhzAw.png" /><figcaption>source: <a href="https://cow-protocol.medium.com/cowswap-now-supports-gnosis-safe-other-smart-contract-wallets-5fef08e1a690">CowSwap multisig flow</a></figcaption></figure><h4>Custody</h4><p>เป็นสถาบัน (custodian) ที่ทำหน้าที่ดูแล security ให้กับ digital asset ของลูกค้า โดย custodian จะได้ค่าตอบแทนเป็น ค่า fee, เงินปันผล, ดอกเบี้ย หรือเงินที่ได้จากการขายหลักทรัพย์ตามที่ได้ทำสัญญาเอาไว้</p><blockquote>custodian รับผิดชอบ asset ที่ถูกจัดเก็บไว้ใน custody</blockquote><ul><li>ดูแล asset หรือ fund โดย admin ที่ได้ผ่านการ qualified แล้ว ​จึงจะสามารถให้ข้อมูลเชิงลึกได้ดี</li><li>มี process ที่สามารถตรวจสอบได้ มีขั้นตอนการดำเนินงานที่ชัดเจน และมีรายงานผลการดำเนินงานหรือข้อมูลของ custody อยู่เสมอ</li><li>หากนำมาใช้ในการบริหารกองทุน ก็จะสามารถป้องกัน fund manager บิดเบือนข้อมูลหรือหลบหนีได้ ​เนื่องจาก custodian เป็นผู้เก็บ private key และทำธุรกรรมแทนทั้งหมด</li><li>เหมาะกับผู้ใช้ที่เป็น non-technical เนื่องจากไม่ต้องดูแลระบบเอง</li><li>Safety ขึ้นอยู่กับ custodian โดยตรง​</li><li>มี fee ที่ค่อนข้างสูง 💰</li></ul><p>ตัวอย่าง service และ solution ที่จัดการให้แก่ลูกค้า:</p><ul><li><a href="https://www.bit.com/"><strong>Bit.com</strong></a> (exchange) — เก็บ asset ของนักลงทุนไว้ที่ custody ของ Copper.co หลังจากที่ได้ทำการเทรด​ เพื่อลดมูลค่าความเสียหายจากการถูก hack (asset ไม่ได้อยู่ที่ exchange จ้า อยู่ใน custody จ้า)</li><li><a href="https://twitter.com/NEMofficial?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor"><strong>NEM</strong></a> (Defi) — เก็บ XYM tokens ที่เคยถูก stake ไว้ใน custody ของ Copper.co เพื่อรอกำหนดการวันที่ปล่อยให้ user สามารถ claim ได้ ​(XYM คือ native token ของ Symbol ซึ่งเป็น <a href="https://blockchain.fish/%E0%B8%AD%E0%B8%87%E0%B8%84%E0%B9%8C%E0%B8%81%E0%B8%A3%E0%B9%84%E0%B8%AB%E0%B8%99%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-blockchain-%E0%B8%9B%E0%B8%A3%E0%B8%B0%E0%B9%80%E0%B8%A0/">public network</a> ของ NEM)</li><li><a href="https://oasisprotocol.org/"><strong>Oasis Foundation</strong></a> (Defi) — Copper.co จัดเตรียม staking services ให้สำหรับ ROSE Token (ROSE เป็น native token ของ Oasis network)​</li><li><a href="https://www.hehmeyer.com/"><strong>Hehmyer</strong></a> (financial) — Copper.co จัดหา solution และวาง infrastructure ให้สำหรับระบบ <a href="https://www.investopedia.com/terms/o/offchain-transactions-cryptocurrency.asp">off-exchange</a> และระบบ treasury management ภายในองค์กร</li></ul><p>จากภาพด้านล่างเป็น custody solution ของ <a href="https://www.finoa.io/">Finoa</a> เป็นการผสมผสานกันของเทคโนโลยีระหว่างระบบของธนาคาร, Blockchain และ cyber security</p><figure><img alt="fiona’s custody solution" src="https://cdn-images-1.medium.com/max/1024/1*rI_AIxw_M9dt26NtTdA70Q.png" /><figcaption>source: <a href="https://medium.com/finoa-banking/finoa-custody-servicing-institutional-investors-in-the-era-of-tokenization-4bff896e7d49">Fiona’s custody solution</a></figcaption></figure><p>Custodian ในบางพื้นที่ (ประเทศ) จะต้องจดทะเบียนกับ กลต. และต้องทำตามระเบียบเพื่อให้ถูกต้องตามกฏหมายที่เกี่ยวข้องกับการดูแลทรัพย์สินของผู้อื่น ซึ่งส่งผลกับความน่าเชื่อถือให้แก่ custodian เองด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*psngVAfELVBn8BSX.jpg" /></figure><p><strong>Copper.co</strong> — เป็นหนึ่งใน custody ที่ได้รับการยอมรับและมีผู้ใช้บริการอยู่จำนวนนึง เน้นให้บริการ digital asset custody และ trading solution โดยจะจัดเตรียม custody, prime brokerage (นายหน้าเก่งๆ) และ tool suites ไว้ให้ลูกค้า เพื่อความปลอดภัยกับ asset ที่มาฝากไว้, การ trade และแลกเปลี่ยนสกุลของ token</p><p>แต่จะไม่รับลูกค้าที่เป็น individual เหมาะกับองค์กรที่เป็น token holder รายใหญ่ๆ</p><p>Custody เจ้าอื่นๆ ที่น่าสนใจ:</p><ul><li><a href="https://metamask.io/institutions/custody/">Custody Partnerships | MetaMask Institutional</a></li><li><a href="https://www.finoa.io/">Finoa | Regulated digital asset management solutions for institutions</a></li></ul><h4>📑 สรุประหว่างการเก็บ asset ใน Multisig wallet และ Custody</h4><p><strong>Multisig wallet: </strong>ไว้จัดการ asset ที่ต้องการให้รับผิดชอบร่วมกันมากกว่า 1 คนขึ้นไปโดยที่ยังถือ private key ไว้อยู่ ใช้เพื่อลดความเสี่ยงจากการผูกสิทธิ์ไว้ที่คนเดียวเฉยๆ <strong>แต่ trust ยังอยู่ที่ signers อยู่ดี</strong> (รวมหัวกันโกงยากกว่า 1 คนโกง)</p><p><strong>Custody: </strong>ไว้จัดเก็บ asset ที่ผู้ดูแลเองไม่ต้องการจัดการเอง ยกให้คนอื่นทำ โดย <strong>trust จะอยู่ที่ custody third party</strong> ล้วนๆ, ลดความเสี่ยงที่ asset จะหายจากความผิดพลาดของการจัดการ เหมาะกับ non technical user, asset ที่มีขนาดใหญ่และไม่ค่อยมีความเคลื่อนไหวมาก</p><p>ถึงจะเป็นที่ไว้สำหรับจัดเก็บ asset ได้ทั้งคู่ แต่จริงๆ ทั้งสองอย่างมีความต่างของจุดเด่นและลักษณะการใช้งานอยู่พอสมควร การเลือกใช้งานจึงต้องพิจารณาเป็นงานๆ ไปให้เหมาะสมกับการจัดการ asset ของเรามากที่สุด</p><p>Reference:</p><ul><li><a href="https://medium.com/enzymefinance/enzyme-for-organisations-fd8ce89185cd">Enzyme for Organisations</a></li><li><a href="https://research.thetie.io/a-deep-dive-into-sushiswap/">A Deep Dive into SushiSwap</a></li><li><a href="https://docs.synthetix.io/governance/">Synthetix System Documentation</a></li><li><a href="https://cow-protocol.medium.com/cowswap-now-supports-gnosis-safe-other-smart-contract-wallets-5fef08e1a690">CowSwap now supports Gnosis Safe &amp; other Smart Contract Wallets</a></li><li><a href="https://docs.balancer.fi/ecosystem/governance/multisig">Balancer docs: Multisig</a></li><li><a href="https://www.qredo.com/blog/what-is-custody-and-who-are-custodians">What is Custody and Who are Custodians?</a></li><li><a href="https://support.bit.com/hc/en-us/articles/1500001973661-Bit-com-Integrates-With-Copper-ClearLoop-To-Offer-Instant-Access-and-Zero-Counterparty-Risk-Off-exchange-Settlement">Bit.com Integrates With Copper ClearLoop</a></li><li><a href="https://www.finyear.com/Copper-appointed-as-custodian-for-Hehmeyer_a43466.html">Copper appointed as custodian for Hehmeyer</a></li><li><a href="https://copper.co/insights/copper-appointed-as-official-custodian-for-nem-symbol-token-launch">Copper appointed as official custodian for NEM Symbol token launch</a></li><li><a href="https://docs.oasis.dev/general/manage-tokens/holding-rose-tokens/custody-providers/">Oasis Custody Providers</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab86ff84391d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/%E0%B9%80%E0%B8%81%E0%B9%87%E0%B8%9A-digital-asset-%E0%B9%84%E0%B8%A7%E0%B9%89%E0%B9%83%E0%B8%99-multisig-wallet-%E0%B9%81%E0%B8%A5%E0%B8%B0-custody-%E0%B8%95%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B9%84%E0%B8%A3-ab86ff84391d">เก็บ Digital Asset ไว้ใน Multisig Wallet และ Custody ต่างกันอย่างไร?</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ERC20 คืออะไร? เริ่มสร้าง ERC20 token ด้วย Remix ทำยังไง?]]></title>
            <link>https://medium.com/under-ledger/erc20-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-erc20-token-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-remix-%E0%B8%97%E0%B8%B3%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-7296d1902b74?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7296d1902b74</guid>
            <category><![CDATA[erc20]]></category>
            <category><![CDATA[erc20-token]]></category>
            <category><![CDATA[remix-ide]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Wed, 16 Mar 2022 03:03:09 GMT</pubDate>
            <atom:updated>2022-03-16T03:03:09.010Z</atom:updated>
            <content:encoded><![CDATA[<h3>ERC20 คืออะไร? เริ่มสร้าง ERC20 token ด้วย Remix ทำยังไง? — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*9UWt4EI32_Cd7HPuBpaoAw.png" /></figure><h3><strong>อะไรคือ ERC20?</strong></h3><ul><li>แต่ละ token จะมี smart contract เป็นของตัวเอง ซึ่ง ERC20 เองก็เป็นหนึ่งใน Ethereum’s token standard สำหรับ Fungible token (token ที่ไม่มีลักษณะเฉพาะตัว) เช่น ETH, USDT</li><li>มี fixed supply (re-mint ไม่ได้) แต่สามารถ mint ขึ้นมาใหม่และ burn ทิ้งได้</li><li>เป็นการใช้งานอินเทอร์เฟซที่กำหนดไว้ใน <em>IERC20</em></li></ul><blockquote>🤍 IERC20 - กำหนด function signature โดยไม่ได้ระบุ behavior, function names, input และ output แต่ว่าไม่ได้มีการทำ process อะไร<br>🤍 ERC20 - inherit มาจาก interface และต้องใช้ required function ทั้งหมด</blockquote><p>เราไม่สามารถสร้าง ERC20 token ที่เปลี่ยนแปลง หรือว่าใช้ชื่อ function ไม่เหมือนตามใน standard ได้ ไม่งั้นจะทำให้ exchange ดีลกับ token ของเราไม่ได้ (คุยคนละ function กันงี้)</p><p>แนวคิดเบื้องต้นของ token contract คือแต่ละ address จะมีจำนวน token เป็นของตัวเองซึ่งแต่ละ address สามารถ transfer token ที่ตัวเองมีอยู่ไปยัง address อื่นได้</p><p>methods และ events ที่ต้องมีตามที่กำหนดไว้ใน standard มีดังนี้:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AtxDiA5tw2Cq8NMYC6sufQ.png" /></figure><ul><li><strong>totalSupply()</strong> - จำนวน token ทั้งหมดที่เคยถูก mint</li><li><strong>balanceOf()</strong> - จำนวน token ที่เป็นเจ้าของโดย address นี้</li><li><strong>transfer()</strong> - transfer แบบเจาะจง recipient และจำนวน token</li><li><strong>transferFrom()</strong> - เรียกใช้เพื่อให้ owner ของ address อนุญาตให้ address อื่นๆ สามารถใช้ token ของตัวเองได้ เทียบง่ายๆ เหมือนการใช้บัตรเดบิตเพื่อใช้เงินจากในบัญชี</li><li><strong>approve()</strong> - ใช้เมื่อทำการ transfer “from address” ครั้งแรก เพื่อทำการ allow ให้ผู้ใช้จ่ายใช้เหรียญแทนตนได้</li><li><strong>allowance()</strong> - เช็คจำนวน token ที่ได้รับอนุมัติให้ใช้สำหรับการรวมกันระหว่าง owner และ spender</li></ul><blockquote>ERC20 แต่ละเหรียญยังมีการกำหนด maximum spending limit อีกด้วย ถ้าเกินกว่านั้นก็จะไม่สามารถโอนได้เพิ่มอีก</blockquote><h3>เริ่มต้นสร้าง ERC20 Token กัน</h3><p>และหลังจากที่ได้ศึกษาการเขียน smart contract โดยพื้นฐานแบบภาพรวมไปบ้างแล้ว ทีนี้ก็มานั่งตกผลึกได้ว่า โอเค เราอ่านรู้เรื่อง อ่านเข้าใจ ทั้ง structure, component, mechanic การทำงาน และสามารถหาเหตุผลของแต่ละบรรทัดที่เขาเขียนกันได้แล้วในระดับนึง</p><p>เลยนึกขึ้นได้ว่า เอ๊ะ ยังไม่เคยเขียนอะไรขึ้นมาเป็นชิ้นเป็นอันเลยนี่นา 🤔</p><p>ก็เลยเริ่มจากแบบพื้นฐานๆ จะลองสร้าง basic token contract ขึ้นมาสักตัว<br>ทั้งนี้เพื่อเป็นการทบทวนสิ่งที่ได้อ่านมาและถือโอกาสนี้มาแชร์ให้ทุกคนด้วยค่ะ</p><p>How to ศึกษา ERC20 token ให้ลึกซึ้งและเห็นภาพ (ฉบับแตง)</p><p>✅ CryptoZombies<br>✅ ศึกษาตัวอย่างการสร้าง token จาก blog ของคนอื่นๆ<br>✅ แกะ contract แอบดู token mechanic <br>⬜ ลองสร้าง token เป็นของตัวเอง</p><p>เริ่มเลย!</p><p>.</p><p>.</p><h4>Step 1: Decide what you want your token to be</h4><p>กำหนดสิ่งที่จำเป็นในการสร้าง ERC20 token:</p><ul><li>Name: MLAB team token</li><li>Symbol: MLAB</li><li>Decimal places: 2</li><li>Amount of Tokens in Circulation: 100,000</li></ul><p>ซึ่งเหรียญโดยส่วนมากจะเซต decimal places ไว้ที่ 18 ตำแหน่ง ซึ่งนั่นแปลว่า token holder สามารถมี token ได้มากถึง .0000000000000000001 (ทศนิยมเยอะจัดๆ)</p><blockquote>เลขทศนิยมจะถูกใช้โดย wallets เพื่อแสดงจำนวนของ token ที่ถูกต้องเราเป็นเจ้าของอยู่ แต่ function อื่นๆ ใน smart contract จะไม่ใช้ decimals parameter</blockquote><p>ดูรายละเอียดเพิ่มเติมเกี่ยวกับ ERC20 token สามารถอ่านได้จาก doc ของ <a href="https://docs.openzeppelin.com/contracts/3.x/erc20#a-note-on-decimals">OpenZeppelin</a> เลยค่ะ โดยส่วนตัวคิดว่าละเอียดกว่าของ <a href="https://ethereum.org/en/developers/docs/standards/tokens/erc-20/">Ethereum</a> เยอะอยู่ 😄</p><h4>Step 2: Code contract</h4><p>ในที่นี้จะใช้ Remix IDE เป็น editor ในการ implement contract นะคะ</p><p><a href="https://medium.com/under-ledger/remix-vs-truffle-%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-smart-contact-9a47d9263cc2">Remix VS Truffle ในการสร้าง Smart Contact</a></p><p>เริ่มต้นโดยการสร้างไฟล์ contract ใหม่จากของเดิมที่มีอยู่แล้ว ซึ่งเราจะเอาไว้เป็นไฟล์ของ token</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*_DpHYkEqluFH4mGGHrxlxA.png" /></figure><p>ในบทความนี้จะใช้ solidity เวอร์ชั่น 0.8.5 นะคะ</p><p>ก่อนอื่นเลยก็ต้องมา construct token ที่เราได้ทำการแพลนไว้แล้วก่อนเพื่อทำการเสก token ขึ้นมา</p><blockquote><strong>constructor()</strong> เป็น special function จะถูก executed แค่ครั้งเดียวเมื่อตอนที่ contract ถูกสร้างขึ้นเท่านั้น</blockquote><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9da78b7a5dd06d6ad94b611562f871fb/href">https://medium.com/media/9da78b7a5dd06d6ad94b611562f871fb/href</a></iframe><p>จากโค้ดด้านบนจะเห็นว่าแตง import ERC20 จาก OpenZeppelin มาใช้ ซึ่งจริงๆ แล้วเราสามารถ import มาจากที่อื่นแบบที่เขียนนี้ก็ได้ (เป็นการเรียกใช้ contract จากที่อื่น) จะเก็บแยกเป็นอีกไฟล์แล้วค่อย import เข้ามาก็ได้</p><pre>import &quot;./ERC20.sol&quot;</pre><p>หรือยกทั้ง <a href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol">ERC20 contract</a> มาวางไว้ในไฟล์เดียวกับ token contract เลยก็ได้เหมือนกันค่ะ</p><p>ในบรรทัดที่ 16 มีการเรียก ERC20 และส่งค่า name, symbol เข้าไปเพื่อสร้าง contract ใหม่ และบรรทัดที่ 17 เราสั่งให้ทำการเรียก _mint() function ที่ได้ inherit มาจาก ERC20 contract ให้ mint token แก่ msg.sender จำนวน 10,000 tokens</p><p>ลองเทสด้วยการ compile</p><p>ใน Remix IDE เราสามารถเลือก complier ที่ต้องการใช้ได้ตามความต้องการและตาม solidity version และกดเลือก Auto compile ไว้ด้วยเพื่อความรวดเร็ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*6t9cym4iwBjaF97lFHM-Vg.png" /></figure><p>เสร็จแล้วลอง deploy เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*afQ4RKj5zSf8KovO0hbZ4A.png" /></figure><p>ทีนี้ลองมาเช็คดูว่ามีเหรียญถูกเสกขึ้นมาใน test environment ที่เรากำลังทำนี้อยู่จริงอ่ะป่าว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*4_8YlZc8bVaGoWtfTWFhsw.png" /></figure><p>จะเห็นได้ว่าเมื่อลองเรียก<strong> </strong>function<strong> balanceOf()</strong> ดูจะเห็นว่ามีค่า return ออกมาเป็น 10000000 (ศูนย์เจ็ดตัว เพราะคูณกับ decimal ที่กำหนดไว้) เป็นอันเสร็จเรียบร้อย เหรียญถูก mint ขึ้นมาแล้วค่า ✨</p><p>ในเบื้องต้นเราสามารถเสกเหรียญ โอนเหรียญไปมาระหว่าง address ได้แล้ว ต่อไปจะมีการเพิ่ม token functionalities ด้วยการเอาไปใช้ในการทำ DAO vote และการ deploy ขึ้นบน test net</p><p>รอติดตามพาร์ทถัดๆ ไปนะคะ</p><p>Reference:</p><ul><li><a href="https://steemit.com/ethereum/@maxnachamkin/how-to-create-your-own-ethereum-token-in-an-hour-erc20-verified">How To Create Your Own Ethereum Token In An Hour (ERC20 + Verified)</a></li><li><a href="https://solidity-by-example.org/app/erc20/">Solidity by Example — ERC20</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7296d1902b74" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/erc20-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-erc20-token-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-remix-%E0%B8%97%E0%B8%B3%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-7296d1902b74">ERC20 คืออะไร? เริ่มสร้าง ERC20 token ด้วย Remix ทำยังไง?</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Remix VS Truffle ในการสร้าง Smart Contact]]></title>
            <link>https://medium.com/under-ledger/remix-vs-truffle-%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-smart-contact-9a47d9263cc2?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a47d9263cc2</guid>
            <category><![CDATA[remix-vs-truffle]]></category>
            <category><![CDATA[truffle-suite]]></category>
            <category><![CDATA[remix]]></category>
            <category><![CDATA[truffle]]></category>
            <category><![CDATA[remix-ide]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Wed, 09 Mar 2022 03:43:50 GMT</pubDate>
            <atom:updated>2022-03-10T04:25:12.114Z</atom:updated>
            <content:encoded><![CDATA[<h3>เลือกใช้ยังไงระหว่าง Remix VS Truffle ในการสร้าง Smart Contact? (ฉบับย่อ)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xRRpdrjmTAcJ92Esm1E9qg.jpeg" /></figure><p>ถึงจะเป็น Tool ที่ใช้ในการ develop smart contract ได้เหมือนกัน แต่การทำงานของทั้งคู่ก็ไม่เหมือนกัน และยังมีข้อดี-ข้อเสียหรือจุดเด่นแตกต่างกันออกไป ปกติแล้ว developer ก็จะเลือกใช้ได้ตามความถนัดและลักษณะงานในขณะนั้น หรือใช้ทั้งสอง tools ควบคู่กันไป</p><p>.</p><p>.</p><h4><a href="https://remix.ethereum.org/">Remix</a></h4><p>ไม่ใช่เพลงที่ถูก mix แต่เป็น tool นะ 😎<br>(เวลาแตงเซิร์ทชอบใช้ “remix ide” หรือ “remix smart contract” ไรงี้ก็ได้)</p><p>เป็น Online IDE สำหรับใช้สร้าง smart contract โดยใช้กับ <a href="https://hackernoon.com/7-top-programming-languages-to-learn-before-2020s-over-yn1g3ugk">stable programming language</a> (ภาษาที่ใช้กับ contract เช่น Solidiy และ Vyper) ที่สามารถเขียน + compile + interact ครบจบในที่เดียว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ubpghMJAXYQs5UTzekrLKA.png" /><figcaption>Remix Ethereum interface</figcaption></figure><ul><li>ใช้ฟรี ไม่เสียเงิน</li><li>ข้อเด่นแบบเด่นมากกกก คือไม่ต้อง install อะไรเลย<strong> </strong>เข้า<strong>เว็บใน browser</strong> แล้วใช้ได้เลย ซึ่งช่วยได้มาก สำหรับมือใหม่ที่เพิ่งเริ่มต้นศึกษา หรือผู้ที่ใช้งานแบบเร่งด่วน นอกสถานที่ ใช้ในคอมของคนอื่น ฯลฯ</li><li>Interface สวย ใช้งานง่ายสำหรับผู้เริ่มต้น</li><li>ทำได้ทั้งเขียน contract ไฟล์, compile และ deploy ในที่เดียวโดยไม่ต้องใช้ tool อะไรเพิ่ม และอีกสิ่งที่แตงชอบคือเราสามารถเลือกได้เลยตอนจะ compile ว่าจะใช้ complier version ไหนใน</li><li>ไม่สามารถใช้ได้กับทุก contract use case ได้แม้ว่าจะมี plugin ไว้ให้โหลดมาใช้เพิ่ม แต่ก็ถือว่ายังยากถ้าจะ test ในการที่จะเอาไปทำงานใน project ที่จริงจังๆ</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FWmeWbo7wzGI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DWmeWbo7wzGI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FWmeWbo7wzGI%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/6341be15664030c3b2a615b34c887868/href">https://medium.com/media/6341be15664030c3b2a615b34c887868/href</a></iframe><h4><a href="https://trufflesuite.com/">Truffle</a></h4><p>เป็น tool ไม่ใช่เห็ด 🍄 (เช่นกันเวลาเซิร์ท คีย์เวิร์ดที่แตงใช้ “truffle ethereum”)</p><p>เป็นเซตเครื่องมือ JavaScript framework ทำงานอยู่บน Nodejs สำหรับพัฒนาและรวมทั้ง blockchain simulator CLI ไว้ใช้ทดสอบ smart contract</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JovvWgl015zKMvHniP_Rg.png" /><figcaption>Source: <a href="https://subscription.packtpub.com/book/web-development/9781839218262/7/ch07lvl1sec41/understanding-truffle-framework">Understanding Truffle framework</a></figcaption></figure><ul><li>ใช้ฟรี ไม่เสียเงิน</li><li>จะต้อง install npm package เพื่อติดตั้งก่อนใช้งาน และเนื่องจากรันอยู่บน Nodejs เพราะฉะนั้นต้องติดตั้ง node.js ก่อนใช้งานด้วย</li><li>ใช้งานผ่าน command line interface ซึ่งอาจจะไม่ user friendly มากเท่าถ้าเทียบกับ Remix แต่ก็จะคล่องมือสำหรับ CLI lover</li><li>ไม่ใช่เพียงแค่ไว้สร้าง smart contract เท่านั้น แต่ truffle ยังสามารถ <a href="https://next-stack.github.io/tutorials/building-testing-frontend-app-truffle-3">build frontend</a> ได้อีกด้วย (ใช้ webpack มา compile) ซึ่งช่วยให้สามารถทำงานได้แบบครบลูป</li><li>สามารถสร้าง smart contract ได้ complex มากกว่า Remix เนื่องจากมี dependency ที่เยอะกว่า</li></ul><p><strong>ตัวอย่างการใช้งาน</strong></p><ul><li><a href="https://iamgique.medium.com/%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-smart-contract-%E0%B8%9A%E0%B8%99-binance-smart-chain-bsc-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-solidity-%E0%B9%81%E0%B8%A5%E0%B8%B0-truffle-%E0%B9%81%E0%B8%9A%E0%B8%9A-step-by-step-b1a7514bd86">สร้าง Smart Contract บน BSC ด้วย Solidity และ Truffle แบบ Step by Step</a></li><li><a href="https://medium.com/coinmonks/5-minute-guide-to-deploying-smart-contracts-with-truffle-and-ropsten-b3e30d5ee1e">5 minute guide to deploying smart contracts with Truffle and Ropsten</a></li></ul><p><a href="https://trufflesuite.com/docs/truffle/getting-started/installation.html">Installation - Truffle Suite</a></p><h4><strong>📑 สรุปคือ</strong></h4><ul><li>ใช้งานได้ฟรีทั้งคู่</li><li>Remix เหมาะสำหรับ <strong>beginner</strong> หรือการใช้งานไวๆ มากกว่า Truffle</li><li>Truffle เหมาะกับ smart contract ที่<strong>ซับซ้อน</strong>มากกว่า (เพราะว่ามี plugin หรือ dependency เยอะกว่า)</li><li>จริงๆ จะใช้คู่กันก็ได้ เช่น เขียนด้วย Truffle แต่ว่า debug ด้วย Remix</li></ul><p><strong>Reference</strong></p><ul><li><a href="https://www.youtube.com/watch?v=77SStBWS304&amp;ab_channel=EatTheBlocks">Remix vs Truffle: Which one is best for Solidity Development?</a></li><li><a href="https://ethereum.stackexchange.com/questions/78686/whats-the-relative-advantage-of-using-remix-ethereum-org-over-studio-ethereum-o">What’s the relative advantage of using remix.ethereum.org over studio.ethereum.org?</a></li></ul><p>💙 ติดตามพวกเราได้ที่ Facebook: <a href="https://www.facebook.com/underledger/">Under Ledger</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a47d9263cc2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/remix-vs-truffle-%E0%B9%83%E0%B8%99%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87-smart-contact-9a47d9263cc2">Remix VS Truffle ในการสร้าง Smart Contact</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เก็บตกงาน “Web3.0 เว็บไร้ตัวกลางกำลังจะมา คนทำเว็บว่ายังไง?” - ทิศทางของ Web 3.0 ในไทย]]></title>
            <link>https://medium.com/under-ledger/%E0%B9%80%E0%B8%81%E0%B9%87%E0%B8%9A%E0%B8%95%E0%B8%81%E0%B8%87%E0%B8%B2%E0%B8%99-web3-0-%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B9%84%E0%B8%A3%E0%B9%89%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B8%81%E0%B8%A5%E0%B8%B2%E0%B8%87%E0%B8%81%E0%B8%B3%E0%B8%A5%E0%B8%B1%E0%B8%87%E0%B8%88%E0%B8%B0%E0%B8%A1%E0%B8%B2-%E0%B8%84%E0%B8%99%E0%B8%97%E0%B8%B3%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-%E0%B8%97%E0%B8%B4%E0%B8%A8%E0%B8%97%E0%B8%B2%E0%B8%87%E0%B8%82%E0%B8%AD%E0%B8%87-web-3-0-%E0%B9%83%E0%B8%99%E0%B9%84%E0%B8%97%E0%B8%A2-6896d663ec4e?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6896d663ec4e</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[decentralized-web]]></category>
            <category><![CDATA[decentralized]]></category>
            <category><![CDATA[สมาคมผู้ดูแลเว็บไทย]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Mon, 28 Feb 2022 09:35:18 GMT</pubDate>
            <atom:updated>2022-03-21T04:45:03.463Z</atom:updated>
            <content:encoded><![CDATA[<p>จากการที่แตงซึ่งเป็นตัวแทนหมู่บ้าน (😂) ของทีมงาน Under Ledger ได้มีโอกาสเข้าร่วมกิจกรรมพูดคุยแลกเปลี่ยนความคิดเห็น ในหัวข้อ “Web3.0 เว็บไร้ตัวกลางกำลังจะมา คนทำเว็บว่ายังไง” ที่ทาง<a href="https://www.facebook.com/thaiwebmasterassociation/">สมาคมผู้ดูแเลเว็บไทย</a>จัดขึ้นเมื่อวันที่ 26 กุมภา 2565 ที่ผ่านมา</p><p>เลยถือโอกาสเอาโน๊ตที่สรุปไว้ + เสริมเพิ่มเติมอีกนิดหน่อย เขียนเก็บไว้เป็นบันทึกและแชร์ให้ทุกคนได้ลองอ่านกันค่า<br>.<br>.</p><figure><img alt="โปสเตอร์งาน Web3.0 เว็บไร้ตัวกลางกำลังจะมา คนทำเว็บว่ายังไง" src="https://cdn-images-1.medium.com/max/1024/1*UQmFIb834M_skKL9X9-u_w.jpeg" /><figcaption>สมาคมผู้ดูแลเว็บไทย (Thai Webmaster Association)</figcaption></figure><h4>สรุปย่อๆ Web 3.0 คืออะไร?</h4><ul><li>Sematic web - เพิ่มความสามารถให้ web มีการกำกับความหมายลงไปในข้อมูล</li><li>Decentralized web - เว็บแบบไร้ตัวกลาง ที่ server ไม่มีใครเป็นเจ้าของเพียงแค่คนเดียว มีเจ้าของหลายๆ คน</li><li>จากด้านบน ทำให้ user สามารถควบคุมข้อมูลและ identity ของตัวเองได้</li></ul><figure><img alt="Application layers of Web3.0" src="https://cdn-images-1.medium.com/max/1024/1*_MYAU7Vg1qTcFilGJ99LVA.png" /><figcaption>Source: <a href="https://medium.com/@coinbaseblog?source=post_page-----785240e557f0-----------------------------------">Coinbase</a></figcaption></figure><figure><img alt="The evolution of the web" src="https://cdn-images-1.medium.com/max/1024/0*7Qs2v9D_F699Mf2n" /><figcaption>Source: Fabric Ventures</figcaption></figure><h4>Web 3.0 กับความ Decentralize</h4><ol><li>การเก็บ Data ของ DApp</li></ol><ul><li>Off-chain : ข้อมูลที่อยู่บน server ผู้ให้บริการที่เขา host ให้</li><li>On-chain :<strong> </strong>เก็บไว้บน Blockchain หรือ decentralized ที่อื่นๆ (เช่น BitTorrent)</li></ul><p>2. เว็บที่เป็น practical ที่เกิดขึ้นในปัจจุบัน จะมีบางส่วนของเว็บที่เป็น off-chain และบางส่วนที่เป็น on-chain</p><figure><img alt="DApp structure" src="https://cdn-images-1.medium.com/max/1024/1*fUqksUhqEzsEMluEVMPsWw.png" /><figcaption>source: <a href="https://docs.substrate.io/v3/concepts/off-chain-features/">Substrate Off-Chain feature</a></figcaption></figure><figure><img alt="การแบ่งงานและลักษณะงานของ off-chain and on-chain" src="https://cdn-images-1.medium.com/max/702/1*-2HopZhT7iLZSUmVWJ8W8g.png" /><figcaption>source: <a href="https://www.researchgate.net/figure/Communication-process-between-on-chain-and-off-chain_fig1_332669639">Deductive Proof of Ethereum Smart Contracts Using Why3</a></figcaption></figure><p>3. การเก็บ Data ไว้บน on-chain ทั้งหมดก็สามารถทำได้แต่ไม่ใช่ทุก use case ซึ่งจะมีปัจจัยที่เกี่ยวข้องที่ต้องนึกถึงหลักๆ เช่น</p><ul><li><strong>Security</strong> - การเก็บข้อมูลแบบ Decentralize คือ “ไม่มีเจ้าของที่แท้จริง” ทำให้การทำ security ทำได้ยากมากกว่าแบบเดิม</li></ul><blockquote>เพราะไม่ใช่ข้อมูลทุกอย่างที่เราอยากให้ทุกคนเห็น (Blockchain is transparency) ฉะนั้นการที่ข้อมูล 100% อยู่บน on-chain จึงอาจจะไม่ใช่กับทุก use case</blockquote><ul><li><strong>ค่า Gas</strong> - Fee จากการ approve transaction และที่ต้อง validate node ก็เป็นอีกปัจจัยที่กระทบกับ user ที่จะมาใช้งาน <em>การสร้างข้อมูลบน Blockchain มีต้นทุนทุก transaction ยิ่ง data ใหญ่ และ Process เยอะยิ่งแพง</em></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgCn_1sQtfcg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgCn_1sQtfcg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgCn_1sQtfcg%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/acaaa71c3427951c17e6839960b24777/href">https://medium.com/media/acaaa71c3427951c17e6839960b24777/href</a></iframe><ul><li><strong>Performance leak</strong> - เพราะต้องใช้ node หลายตัวในการ approve transaction ทั้งนี้ก็ขึ้นอยู่กับ Blockchain network ที่ใช้ด้วย</li></ul><h4>web 3.0 มีผลกระทบอะไรต่อคนทำเว็บหรือไม่?</h4><p>ใน Meeting session ทางวิทยากรได้ยกตัวอย่าง process ที่อาจจะมีการเปลี่ยนแปลงเมื่อเรานำ web 3.0 เทคโนโลยีเข้ามาใช้งาน เช่น</p><ul><li>Component บางอย่างที่แตกต่างกันออกไป เช่น การยิง API ต้องเป็นการยิงไป RPC node ของ chain แล้วดึงข้อมูลออก แทนการใช้ API เพื่อ call service ที่ต้องการโดยตรง</li><li>เปลี่ยน concept ไปดึงข้อมูลจากที่ไม่มีเจ้าของ เช่นจาก Google ไปเป็นจาก decentralize แทน ซึ่งเป็นข้อมูลไม่ได้ถูก dominated จากใคร</li></ul><p>“ปรับ ไม่ได้รื้อใหม่ทั้งหมด” นับว่าเป็นประโยคที่สรุปทิศทางสำหรับการทำ Web ในอนาคตได้ดีทีเดียว <br>.<br>.</p><p>โดยส่วนตัวมองว่าเนื่องจาก web 3.0 ก็เปรียบเสมือนมี technology ใหม่ๆ ขึ้นมาเติมเต็มการทำเว็บแบบเดิม เป็นเพียง another web technology ที่จะทำให้เกิดโอกาสที่จะกระจายข้อมูลไปเก็บที่หลายๆ ที่ มากกว่าการเก็บเป็น centralized ไว้ที่ที่ใดที่นึงเฉยๆ ไม่ได้เป็นอะไรที่จะเข้ามาพลิกโฉมการทำงาน web แบบเดิมขนาดนั้น</p><h4><strong>How to start การนำ web 3.0 มาใช้งาน</strong></h4><p>อันดับแรกที่สำคัญ คือ ต้องเข้าใจ decentralized network ก่อน!</p><p>เพราะหลักๆ การทำงานของ web 3.0 คือการที่เอา Frontend ไปเชื่อมต่อกับอะไรที่เป็น decentralize เพื่อส่ง-รับข้อมูล ดังนั้นควรเข้าใจคอนเซปคร่าวๆ ของการทำงานทั้งหมดก่อน เพื่อง่ายต่อการ implement และ debug</p><p>เริ่มจาก Ethereum ก่อนก็ได้ เนื่องจาก มี docs ให้ศึกษาเยอะและเป็นพื้นฐานสุดๆ เอาไปต่อยอดเชนอื่นที่รองรับ EVM เหมือนกันได้ หรือจะเริ่มจาก Solana ที่เป็น Web assembly concept ก็เป็นอีกตัวที่กำลังมาแรงในตอนนี้</p><p>และต่อมา ต้องเข้าใจการสร้าง DApp เช่น การเรียนรู้ Smart contract และการสร้าง web 3.0 โดยการใช้ Library ของ Ether.js และ Web3.js มาใช้เพื่อเชื่อมต่อกับฝั่งที่เป็น decentralize ซึ่งจะมีวิธีการ call/receive เฉพาะตัวอยู่ ต้องศึกษาเพิ่มเติม</p><p>ส่วนอื่นของเว็บไซต์นอกเหนือจากนี้ ก็สามารถใช้วิธีการเขียนเว็บโดยปกติทั่วไปได้เลย เช่น React JS + Web 3.0</p><figure><img alt="Architecture and process flow of Dapp Ethereum" src="https://cdn-images-1.medium.com/max/1024/1*zW9zRHpiC8hgYiyNNUuJPA.png" /><figcaption>Source: Preethi Kasireddy</figcaption></figure><p>💙 แวะขายของ บทความที่เคยเขียนไว้ค่ะ อิอิ 😍<br><a href="https://medium.com/under-ledger/get-started-with-blockchain-development-blockchain-developer-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87%E0%B8%94%E0%B8%B5-348f74036cda?source=your_stories_page----------------------------------------">Get started with blockchain development — Blockchain developer เริ่มยังไงดี?</a></p><h4>แนวโน้ม Web 3.0 ในอนาคต</h4><ul><li>เป็นแค่การทำ Web อีกรูปแบบนึง ที่จะมาอยู่ร่วมกับ Web 1.0 และ 2.0 เฉยๆ และการเกิดมากน้อย ขึ้นอยู่กับความเข้าใจของการนำมาใช้</li><li>จะต้องมีการปรับตัวของด้าน user experience เสียก่อน เช่น ก็ไม่ใช่ทุกคนที่จะมี Crypto wallet หรือเข้าใจการทำงานของ Blockchain</li></ul><blockquote>ทางทีม Under Ledger ก็กำลังศึกษาเรื่องนี้อยู่เหมือนกันนะ อยากจะทำยังไงก็ได้ที่ user จะรู้สึก Smooth ที่สุด กระทบ user experience น้อยที่สุด เอาแบบเปลี่ยนเนียนๆ</blockquote><ul><li>Trade of performance: ในบาง use case การทำงานอาจจะยังเร็วเท่าแบบ server ใคร server มันทำไม่ได้</li><li>การเติบโตของ Player ในตลาดของ decentralized (Competition Market) : เช่น crypto wallet ที่คนใช้หลักๆ มากกว่านี้ หรือ Gamefi อาจจะมี studio รายใหญ่เข้ามา มี economic/แนวทางเกมอื่นๆ นอกเหนือจาก Play-to-earn</li></ul><h4>Business model ใหม่ๆ จากการเติบโตของ web 3.0</h4><p>ตัวอย่างการนำ web 3.0 technology มาใช้งาน</p><ol><li>Digital ID - การยืนยันตัวตน digital signature ผ่าน decentralized</li><li>Event ticket เช่น สามารถใช้ป้องกันบัตรผีได้เพราะแต่ละ ticket มี identity ฝังไว้</li><li>Web 3.0 + Metaverse เช่น การ Access metaverse ผ่านเว็บเพื่อทำบางอย่างโดยที่ไม่ต้องไปเข้า system โดยตรง</li></ol><h4><strong>Thailand and web 3.0</strong></h4><ul><li>ในปัจจุบัน Developer ในไทยค่อนข้าง active กับเทคโนโลยี web 3.0 รวมถึง blockchain อยู่แล้ว อีกทั้งมี product หลายตัวที่ถูกปล่อยออกมาและเป็นที่ได้รับการยอมรับทั่วโลกอีกด้วย เช่น <a href="https://apeboard.finance/">Apeboard</a>, <a href="https://www.wardenswap.finance/#/best-rate-swap">Warden swap</a> และ <a href="https://dopple.finance/">Dopple Finance</a></li><li>ไม่มี barrier ด้าน knowledge - จากข้อด้านบน เนื่องจาก developer ไทย active กันเป็นส่วนใหญ่แล้ว เพราะฉะนั้นจึงมี knowledge ที่มากเพียงพอที่จะหาแนวทางและสร้างเว็บใหม่ๆ ที่ใช้ concept web 3.0 ได้</li><li>ภาครัฐ: ในส่วนของภาครัฐเองตอนนี้ก็ได้เริ่มมีการนำเทคโนโลยี Blockchain เข้ามาใช้ในการช่วยเรื่องพิสูจน์และยืนยันตัวตนทาง digital (NDID) ซึ่งอยู่บน Private Blockchain สามารถอ่านเพิ่มเติมได้ที่ <a href="https://www.ndid.co.th/">NDID official website</a></li></ul><figure><img alt="ขั้นตอนการเปิดบัญชีออนไลน์ด้วย NDID" src="https://cdn-images-1.medium.com/max/1024/1*T6ON69-eUVuygCBHrnH-8w.jpeg" /><figcaption>source: <a href="https://www.ldaworld.com/ndid-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B8%A2%E0%B8%B7%E0%B8%99%E0%B8%A2%E0%B8%B1%E0%B8%99%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B8%95%E0%B8%99%E0%B8%94%E0%B8%B4%E0%B8%88%E0%B8%B4%E0%B8%97%E0%B8%B1%E0%B8%A5/">NDID การยืนยันตัวตนดิจิทัล เปิดบัญชีออนไลน์ อนาคตของสังคมไร้กระดาษ</a></figcaption></figure><p>สามารถติดตามข่าวสารที่คนทำเว็บควรรู้ หรืองานพูดคุยแลกเปลี่ยนที่เป็นประโยชน์แบบนี้ในอนาคต สามารถติดตามได้ทางเพจ Facebook ของ<a href="https://www.facebook.com/thaiwebmasterassociation/?__cft__[0]=AZVfYxzjlT8pxS_8219QJ8oDyyzAyZpqFjNgF24Jvc5PXz2aKa7rLUz3Ho6RUk83f6AiH8EsfuCJ9CWk4FCRvZ8xDDyz06FfRZbMTPWcb0sH2ITqMACyifbJsUYFmGBZO2DBbcvHni8QoV7FEz_r4rUr&amp;__tn__=-UC%2CP-R">สมาคมผู้ดูแลเว็บไทย (Thai Webmaster Association)</a> ได้เลยค่า</p><p>📑 แนะนำบทความอ่านน่าอ่าน เพิ่มเพื่อทำความเข้าใจ web 3.0</p><p>• <a href="https://www.beartai.com/article/tech-article/914953">พาไปรู้จักกับ ‘Web 3.0’ แล้วคนธรรมดาอย่างเรา ๆ ต้องรู้อะไรบ้าง </a><br>• <a href="https://www.youtube.com/watch?v=JYWQOluU5rI&amp;ab_channel=PatiphanPhengpao">Guide การเป็น Web3 Developer ในปี 2022 เรื่องที่คุณต้องรู้</a><br>• <a href="https://www.youtube.com/watch?v=Lz3m4BI1EfY&amp;ab_channel=CleverProgrammer">Building Web 3.0 in 3-Day with React JS + Web 3.0 Challenge</a><br>• <a href="https://blog.coinbase.com/a-simple-guide-to-the-web3-stack-785240e557f0">A simple guide to the Web3 stack</a></p><p>Reference:</p><ul><li><a href="https://www.facebook.com/thaiwebmasterassociation">สมาคมผู้ดูแลเว็บไทย (Thai Webmaster Association)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6896d663ec4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/%E0%B9%80%E0%B8%81%E0%B9%87%E0%B8%9A%E0%B8%95%E0%B8%81%E0%B8%87%E0%B8%B2%E0%B8%99-web3-0-%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B9%84%E0%B8%A3%E0%B9%89%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B8%81%E0%B8%A5%E0%B8%B2%E0%B8%87%E0%B8%81%E0%B8%B3%E0%B8%A5%E0%B8%B1%E0%B8%87%E0%B8%88%E0%B8%B0%E0%B8%A1%E0%B8%B2-%E0%B8%84%E0%B8%99%E0%B8%97%E0%B8%B3%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-%E0%B8%97%E0%B8%B4%E0%B8%A8%E0%B8%97%E0%B8%B2%E0%B8%87%E0%B8%82%E0%B8%AD%E0%B8%87-web-3-0-%E0%B9%83%E0%B8%99%E0%B9%84%E0%B8%97%E0%B8%A2-6896d663ec4e">เก็บตกงาน “Web3.0 เว็บไร้ตัวกลางกำลังจะมา คนทำเว็บว่ายังไง?” - ทิศทางของ Web 3.0 ในไทย</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get started with blockchain development — Blockchain developer เริ่มยังไงดี?]]></title>
            <link>https://medium.com/under-ledger/get-started-with-blockchain-development-blockchain-developer-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87%E0%B8%94%E0%B8%B5-348f74036cda?source=rss-ff6273e61be7------2</link>
            <guid isPermaLink="false">https://medium.com/p/348f74036cda</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain-developer]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[blockchain-development]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Wichita Serchuit]]></dc:creator>
            <pubDate>Tue, 15 Feb 2022 03:42:09 GMT</pubDate>
            <atom:updated>2022-03-11T08:49:06.293Z</atom:updated>
            <content:encoded><![CDATA[<h4>Get started with blockchain development — Blockchain dev เริ่มยังไงดี?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ct_Z1XgdqbxKGR0HmmT1oA.jpeg" /></figure><p>ปฏิเสธไม่ได้เลยว่าตอนนี้ Blockchain development เป็นอีกหนึ่งศาสตร์ เป็นอีกหนึ่ง Topic ที่ชาว dev กำลังให้ความสนใจ</p><p>เนื่องจากกระแสของ DeFi, GameFi หรือการนำเทคโนโลยีของ Blockchain เข้ามาใช้ในการขยาย limitation และเพิ่ม Security ของ Application ให้ยิ่งดีขึ้น อีกทั้งยังเป็นเทคโนโลยีที่มีอนาคตอีกไกลแน่ๆ<br>(สามารถอ่านเพิ่มเติมได้ที่ <a href="https://www.getsmarter.com/blog/market-trends/the-future-of-blockchain-technology-in-2022/">The Future of Blockchain Technology in 2022</a>)</p><p><em>แต่อยู่ๆ จะให้เริ่มศึกษาด้วยการเปิด Smart Contract ขึ้นมาอ่านเลย บางคนก็อาจจะจับประเด็นไม่ได้ หรืออาจจะไม่ได้เข้าใจการทำงานทั้งหมดรึเปล่า?</em></p><p>.<br>.<br>.</p><p>ไม่เป็นไรทุกคน เราไปงงและหายงงล่วงหน้ามาให้แล้ว!</p><p>ก่อนอื่นเลย พื้นฐาน programming language ก็คือสำคัญมาก<br>เริ่มต้นจากทำความเข้าใจเบสิก HTML ก่อน เพื่อเข้าใจพื้นฐานการสร้าง Web Application ซึ่งใช้เวลาไม่นานรับรองเกท จากนั้นต่อเลยที่ JavaScript กับ Solidity</p><blockquote>ศึกษาการเขียน HTML และ JavaScript แนะนำเว็บ <a href="https://www.w3schools.com/">W3Schools</a> เลย</blockquote><p>ซึ่งอันที่จริงแล้ว Solidity ก็เป็นแค่หนึ่ง option ยอดฮิตเท่านั้น (สำหรับ chain ที่เป็น EVM-Based) แต่ว่าแต่ละ chain ก็มีภาษาที่ใช้เขียนแตกต่างกันไป ทั้งนี้อาจจะลองตั้งเป้าก่อน ว่าเราอยากจะเริ่มต้นกับ chain ไหน</p><p>ซึ่งในบทความนี้จะเน้นไปที่ EVM-Based ก่อนนะคะ</p><figure><img alt="Top 6 smart contract platform in 2021" src="https://cdn-images-1.medium.com/max/839/1*rT4-vDNy23e86eMvJGUDgQ.png" /><figcaption>Top 6 smart contract platform (<a href="https://www.itransition.com/blog/smart-contract-platforms">https://www.itransition.com/blog/smart-contract-platforms</a>)</figcaption></figure><h4><strong>Environment, Steps และ Tools</strong></h4><ul><li><a href="https://trufflesuite.com/">Truffle Framework</a> - ใช้เขียน smart contract และติดต่อกับ Blockchain ได้ง่ายขึ้น มี library ไว้ช่วยเขียนเยอะ</li><li><a href="https://trufflesuite.com/ganache/">Ganache</a> - Truffle suite ใช้สำหรับเป็น blockchain simulator</li><li><a href="https://remix.ethereum.org/">Remix IDE</a> - อีกหนึ่ง tool ไว้สำหรับ code, compile และ deploy Smart Contract และสามารถใช้งานผ่าน browser ได้เลย ไม่ต้องติดตั้ง</li><li><a href="https://metamask.io/">Metamask</a> - เอาไว้เก็บ Key ที่จะใช้ในการ Deploy Smart Contract</li><li>Blockchain Explorer - ใช้ monitor ธุรกรรมที่เกิดขึ้น เช่น EtherScan, BscScan หรือ PolygonScan แล้วแต่ว่าธุรกรรมเกิดบน chain ไหนเลย</li></ul><blockquote><em>โดยการติดตั้งโปรแกรมต่าง ๆ ที่ใช้ในการเขียน Smart Contract สามารถศึกษาเพิ่มเติมได้จากบทความ </em><a href="https://medium.com/@methuz/ethereum-%E0%B8%95%E0%B8%AD%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88-1-%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B9%80%E0%B8%84%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B9%83%E0%B8%AB%E0%B9%89%E0%B8%9E%E0%B8%A3%E0%B9%89%E0%B8%AD%E0%B8%A1%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2-solidity-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-vscode-truffle-infura-%E0%B9%81%E0%B8%A5%E0%B8%B0-1af5189650c4"><em>ติดตั้งเครื่องให้พร้อมเขียนภาษา Solidity ด้วย VSCode, Truffle, Infura และ Ganache</em></a><em> อธิบายเข้าใจง่ายอยู่นะ</em></blockquote><figure><img alt="working process and related tools of DApp development" src="https://cdn-images-1.medium.com/max/960/1*ZQvrZrAr9a4GEOAB48olQw.png" /><figcaption>source: <a href="https://livebook.manning.com/book/blockchain-in-action/chapter-6/195">https://livebook.manning.com/book/blockchain-in-action/chapter-6/195</a></figcaption></figure><p>จากภาพด้านล่าง เป็นตัวอย่างของ DApp project diagram ซึ่งทำให้เห็นการใช้งานของแต่ละ tool ได้ชัดเจนมากขึ้น</p><figure><img alt="Working flow and related tools of DApp development" src="https://cdn-images-1.medium.com/max/810/1*5_pdBe94BkGbSJfsxmigRQ.png" /><figcaption>source: <a href="https://github.com/tippi-fifestarr/proof-of-workout">https://github.com/tippi-fifestarr/proof-of-workout</a></figcaption></figure><h4>Blockchain Layer</h4><ul><li><a href="https://cointelegraph.com/blockchain-for-beginners/a-beginners-guide-to-understanding-the-layers-of-blockchain-technology#:~:text=The%20blockchain%20is%20the%20first,technologies%20are%20currently%20being%20implemented.">A beginner’s guide to understanding the layers of blockchain technology</a></li><li><a href="https://youtu.be/BgCgauWVTs0">Ethereum Layer 2 scaling explained</a></li></ul><p>★ <a href="https://github.com/OffcierCia/DeFi-Developer-Road-Map"><strong>DeFi Developer Road Map</strong></a></p><p>แหล่งรวบรวมบทความและ website อ้างอิงที่ใช้ในการ สร้าง DeFi หรือ Blockchain โดยรวมเอาบทความ, skill ที่เกี่ยวข้อง, tool รวมถึง practice ที่น่าสนใจ<br>ทั้งนี้เจ้าของ GitHub เองเปิดโอกาสให้เราสามารถ Submit pull request เพื่อเสนอสิ่งที่น่าสนใจเพิ่มได้</p><p>ขอบอกเลยว่า Link ข้อมูลเยอะมากกกก ก.ไก่ล้านตัว มีหลายพาร์ทเลย ทั้งที่เป็น Smart Contract, Frontend รวมถึงการ Test Blockchain ด้วย</p><p>★ <a href="https://www.dappuniversity.com/articles/solidity?fbclid=IwAR1jht-zlk4CmWfVhkjjkPkECXCmwENS0YUjw01SePGYjtehF3t4v5py9ZE"><strong>Master Solidity for Blockchain: Step-by-Step Guide</strong></a><strong>:</strong></p><p>บทความในตำนาน ที่บอกต่อกันรุ่นสู่รุ่น!<br>อธิบายการพัฒนา Smart contract ด้วยภาษา Solidity อธิบายไว้ละเอียดพอสมควรเลย โดยแบ่งออกเป็น 6 พาร์ทหลักๆ เริ่มตั้งแต่การแนะนำ Tool ที่ใช้ไปถึงการเขียน function พื้นฐานที่จำเป็น</p><p>และถ้าใครไม่อยากอ่านก็ดูใน YouTube channel ได้เลย นอกจากนี้ “<a href="https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ">Dapp University Channel</a>” เขายังทำคลิปที่เกี่ยวกับ Blockchain อีกเพียบ แนะนำให้กด Subscribe ไว้รับรองมีประโยชน์แน่นอน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*73XHF7N6RmZZ-Fs6.jpg" /><figcaption>source: <a href="https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ">https://www.youtube.com/channel/UCY0xL8V6NzzFcwzHCgB8orQ</a></figcaption></figure><p>★ <a href="https://cryptozombies.io/"><strong>CryptoZombies</strong></a><strong>:</strong></p><p>ตัวช่วยในการเริ่มศึกษา “การเขียน Smart Contract ด้วยภาษา Solidity” ที่คนไม่ใช่เนิร์ดหรือเชี่ยวชาญ programming ก็สามารถเข้าใจได้อย่างง่าย มีการให้ลอง coding ด้วยตัวเอง และอธิบายการเขียนหรือ method ทีละสเตปๆ ตามลำดับที่ควรรู้</p><p>โดยสอนตั้งแต่พื้นฐานการเริ่มต้นเขียน smart contract ด้วยภาษา Solidity ผ่านการยกตัวอย่างการเขียน smart contact สร้างเกม NFT ซอมบี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*Vy2FpmnGABpzn8zU5n2d4Q.png" /><figcaption>source: <a href="https://dappradar.com/loom/other/cryptozombies">https://dappradar.com/loom/other/cryptozombies</a></figcaption></figure><p>แถมๆ</p><ul><li>Facebook เพจ “<a href="https://www.facebook.com/UncleEngineer/?ref=page_internal">ลุงวิศวกร สอนคำนวณ</a>” - มีคอร์สสอนเขียนโปรแกรม แนะนำลายแทงดีๆ และอัพเดทข่าว เทรนด์ เทคโนโลยีใหม่ๆ อยู่เรื่อยๆ</li><li>Facebook เพจ “<a href="https://www.facebook.com/groups/879466468887478">Blockchain Developer Thailand</a>” - Community ของ Blockchain developer คนไทยขนาดใหญ่ มีเทพๆ คอยมาแลกเปลี่ยนความรู้กันเพียบ เพจเน้น develop โดยเฉพาะ ไม่เน้นลงทุน</li><li><a href="http://thannob.com/articles/%E0%B8%95%E0%B8%B1%E0%B8%A7%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%A3%E0%B8%B0%E0%B8%9A%E0%B8%9A-Vote-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-Smart-Contract-%E0%B8%9A%E0%B8%99-Ethereum-Blockchain/">ตัวอย่างระบบ Vote ด้วย Smart Contract บน Ethereum Blockchain</a></li></ul><p>ทั้งนี้ทั้งนั้น Blockchain ปัจจุบันก็มี Chain ใหม่ๆ ผุดขึ้นมามากมาย (เพื่ออุดรูรั่วและเพิ่มประสิทธิภาพให้ตัวก่อนๆ) ซึ่งบางตัวก็อาจจะมีภาษา หรือ Tool ที่เกิดมาเพื่อ Chain นั้นๆ จึงอาจจะต้องศึกษาและอัพเดทเจาะไปเป็นตัวๆ ไป</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=348f74036cda" width="1" height="1" alt=""><hr><p><a href="https://medium.com/under-ledger/get-started-with-blockchain-development-blockchain-developer-%E0%B9%80%E0%B8%A3%E0%B8%B4%E0%B9%88%E0%B8%A1%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87%E0%B8%94%E0%B8%B5-348f74036cda">Get started with blockchain development — Blockchain developer เริ่มยังไงดี?</a> was originally published in <a href="https://medium.com/under-ledger">Under Ledger</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>