<?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 FranceVlog on Medium]]></title>
        <description><![CDATA[Stories by FranceVlog on Medium]]></description>
        <link>https://medium.com/@frongrider2?source=rss-10d5cd8e9d72------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*M7E6NnhMXi2FF4Pa2yxJIw.jpeg</url>
            <title>Stories by FranceVlog on Medium</title>
            <link>https://medium.com/@frongrider2?source=rss-10d5cd8e9d72------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 21:09:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@frongrider2/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[จัดการ Node Version ด้วย NVM]]></title>
            <link>https://medium.com/@frongrider2/%E0%B8%88%E0%B8%B1%E0%B8%94%E0%B8%81%E0%B8%B2%E0%B8%A3-node-version-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-nvm-c42eb3d9ef41?source=rss-10d5cd8e9d72------2</link>
            <guid isPermaLink="false">https://medium.com/p/c42eb3d9ef41</guid>
            <dc:creator><![CDATA[FranceVlog]]></dc:creator>
            <pubDate>Mon, 05 Jan 2026 08:39:22 GMT</pubDate>
            <atom:updated>2026-01-05T08:39:22.228Z</atom:updated>
            <content:encoded><![CDATA[<p>เริ่มต้นด้วย การ install NVM เพื่อใช้ ในการจัดการ Node package เพื่อความสะดวกในการจัดการ Node Package ตัวร้าย เพื่อลดความวุ่นวายในอนาคตของเรา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QqWkwzFKRPcBwDgENbhi6A.png" /></figure><p><strong>NVM (Node Version Manager) คือ เครื่องมือจัดการเวอร์ชันของ Node.js</strong> ที่ช่วยให้นักพัฒนาสามารถติดตั้ง สลับ และจัดการ Node.js หลายเวอร์ชันบนเครื่องเดียวได้อย่างง่ายดาย เพื่อให้ตรงกับความต้องการของโปรเจกต์ต่างๆ ที่อาจต้องใช้ Node.js เวอร์ชันแตกต่างกัน ป้องกันปัญหาความไม่เข้ากันระหว่างเวอร์ชัน.</p><p><a href="https://www.nvmnode.com/guide/download.html">Download NVM For Windows, Linux, and macOS</a></p><p>มาเริ่มติดตั้งใช้งานกัน</p><ol><li><strong>Install Homebrew 🍺 ให้เรียบร้อย</strong></li></ol><pre>/bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;</pre><p><strong>2. Update Homebrew &amp; Install NVM</strong></p><pre>brew update<br>brew install nvm<br>mkdir ~/.nvm</pre><p><strong>3. เช็ค shell</strong></p><pre>echo $SHELL</pre><p>ต้องเป็น <strong>/bin/zsh เท่านั้น ถ้าเป็น </strong>Bash ให้ติดตามบทความของพี่คนนี้ได้เลยครับ</p><p><a href="https://engineering.thinknet.co.th/%E0%B8%88%E0%B8%B1%E0%B8%94%E0%B8%81%E0%B8%B2%E0%B8%A3-node-%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B9%86%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-nvm-fa784e0cd581">จัดการ node แบบง่ายๆด้วย NVM</a></p><p><strong>4. Add the NVM Loading Script</strong></p><pre>touch ~/.zshrc<br>nano ~/.zshrc</pre><p>พิมพ์ตามนี้ครับ แล้ว Save ครับ</p><pre>export NVM_DIR=&quot;$HOME/.nvm&quot;<br>[ -s &quot;$(brew --prefix nvm)/nvm.sh&quot; ] &amp;&amp; \. &quot;$(brew --prefix nvm)/nvm.sh&quot;<br>[ -s &quot;$(brew --prefix nvm)/etc/bash_completion.d/nvm&quot; ] &amp;&amp; \. &quot;$(brew --prefix nvm)/etc/bash_completion.d/nvm&quot;</pre><p>รันคำสั่ง</p><pre>source ~/.zshrc</pre><p>เป็นอันเสร็จสิ้นครับ</p><p>สามารถ ลอง Install Node ได้เลยครับ</p><pre>nvm install 24<br>nvm use 24</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c42eb3d9ef41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ข้อระวังใน การใช้ PRISMA]]></title>
            <link>https://medium.com/@frongrider2/%E0%B8%82%E0%B9%89%E0%B8%AD%E0%B8%A3%E0%B8%B0%E0%B8%A7%E0%B8%B1%E0%B8%87%E0%B9%83%E0%B8%99-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-prisma-3f11875a82f4?source=rss-10d5cd8e9d72------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f11875a82f4</guid>
            <dc:creator><![CDATA[FranceVlog]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 14:53:46 GMT</pubDate>
            <atom:updated>2026-01-05T08:46:52.182Z</atom:updated>
            <content:encoded><![CDATA[<p>From Chatgpt Note!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YkTmyMR0G3dlHNHAkRIgg.png" /></figure><ul><li><a href="https://docs.nestjs.com/recipes/prisma">Documentation | NestJS - A progressive Node.js framework</a></li><li><a href="https://www.prisma.io/">Prisma | Instant Postgres plus an ORM for simpler db workflows</a></li></ul><p>จากที่เราเขียน Nest.js และ ใช้ Prisma ในการ ORM และ migration database sql</p><p>ข้อควรระวัง ที่ผมเคยทำ database ระเบิด บุ้ม มาแล้ว 💥 (ที่เขียนมาจาก chatgpt research ครับ) ไว้เตือนภัยตัวเอง</p><ol><li><strong>การเปลี่ยนชื่อ Field (ระวังข้อมูลหาย!) 🥵🥵🥵🥵<br></strong>นี่คือจุดที่มือใหม่พลาดบ่อยที่สุดครับ</li></ol><p><strong>สิ่งที่เกิดขึ้น:</strong> สมมติคุณเปลี่ยน name String เป็น fullName String ใน schema.prisma</p><p><strong>Prisma คิดว่า:</strong> “อ๋อ… ยูต้องการ <strong>ลบ</strong> column name ทิ้ง แล้ว <strong>สร้าง</strong> column fullName ใหม่ใช่ไหม?&quot;</p><p><strong>ผลลัพธ์:</strong> <strong>ข้อมูลใน column </strong><strong>name หายเกลี้ยง!</strong> เพราะมันสั่ง DROP COLUMN</p><p><strong>วิธีแก้:</strong></p><ul><li>ถ้าแค่อยากเปลี่ยนชื่อใน Code แต่ใน DB ชื่อเดิม: ใช้ @map(&quot;name&quot;)</li></ul><pre>fullName String @map(&quot;name&quot;) // ใน DB ชื่อ name, ใน Code เรียก fullName</pre><ul><li>ถ้าอยากเปลี่ยนชื่อใน DB จริงๆ: ต้องแก้ไฟล์ Migration SQL เอง (ใช้ ALTER TABLE ... RENAME COLUMN ...) อย่าปล่อยให้ Prisma Auto-generate เด็ดขาด</li></ul><p>สร้าง ไฟล์ migrate</p><pre>npx prisma migrate dev --name althenate_name_table_name</pre><p><strong>2. การเปลี่ยน Data Type (Breaking Changes) 🧨</strong></p><p><strong>สถานการณ์:</strong> เปลี่ยนจาก String เป็น Int</p><p><strong>ความเสี่ยง:</strong> ถ้าข้อมูลเก่าแปลงเป็นตัวเลขไม่ได้ Postgres จะ Error หรือ Prisma อาจจะขอ <strong>Reset Database</strong> (ล้างบาง) ในเครื่อง Local เพื่อให้ Structure มันตรง</p><p><strong>วิธีแก้:</strong> อ่าน Warning ของ Prisma ตอนรัน migrate dev ให้ดี ถ้ามันเตือนว่า <strong>&quot;Data loss&quot;</strong> ให้หยุด แล้วเข้าไปเขียน SQL ในไฟล์ migration เพื่อแปลงข้อมูลเองก่อน (เช่น Cast data)</p><p>3. ห้ามใช้ migrate dev บน Production 🌟</p><p><strong>คำสั่ง:</strong>npx prisma migrate dev: ใช้ตอน <strong>เขียนโค้ด</strong> (มันจะตรวจสอบ Drift, สร้างไฟล์ SQL ใหม่, และอาจ Reset DB ถ้าจำเป็น)</p><p>npx prisma migrate deploy: ใช้ตอน <strong>ขึ้น Server/Production</strong> (มันจะรันแค่ไฟล์ SQL ที่ยังไม่ได้รันเท่านั้น ไม่มีการ Reset DB)</p><p><strong>ความเสี่ยง:</strong> ถ้าเผลอไปรัน migrate dev บน Prod แล้ว Schema ไม่ตรงกัน มันอาจจะถามหาการ Reset DB ข้อมูลหายหมดครับ</p><p><strong>4. ห้ามลบไฟล์ในโฟลเดอร์ </strong><strong>prisma/migrations ทิ้งเอง</strong></p><p><strong>5. ระวัง “Database Drift” (แอบแก้สด)</strong></p><ul><li>ห้ามแก้ Structure ผ่าน TablePlus ให้แก้ผ่าน schema.prisma เท่านั้น</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f11875a82f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS — Journey EP1]]></title>
            <link>https://medium.com/@frongrider2/aws-journey-ep1-8b4b287a3299?source=rss-10d5cd8e9d72------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b4b287a3299</guid>
            <dc:creator><![CDATA[FranceVlog]]></dc:creator>
            <pubDate>Sat, 20 Dec 2025 14:43:26 GMT</pubDate>
            <atom:updated>2025-12-20T14:43:26.916Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS — Journey</h3><ol><li>สร้าง VPS</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqwe3AF1kXoA67xxDuneKw.png" /></figure><h3>ส่วนประกอบของ CIDR (10.0.0.0/16)</h3><p><strong>IPv4 CIDR</strong> (Classless Inter-Domain Routing)</p><ol><li><strong>ตัวเลขชุดหน้า (</strong><strong>10.0.0.0)</strong>: คือจุดเริ่มต้นของ Network (เหมือนชื่อซอยหรือชื่อหมู่บ้าน)</li><li><strong>ตัวเลขหลังทับ (</strong><strong>/16)</strong>: คือตัวบอก <strong>ขนาด</strong> ว่ามี IP ให้ใช้กี่เบอร์ (เรียกว่า Subnet Mask)</li></ol><h4>⚡️ กฎเหล็กของตัวเลขหลังทับ (สำคัญมาก)</h4><p><strong>“ยิ่งเลขน้อย พื้นที่ยิ่งเยอะ / ยิ่งเลขมาก พื้นที่ยิ่งน้อย”</strong></p><ul><li>/16 = ใหญ่มาก (มาตรฐาน AWS VPC) → มี <strong>65,536</strong> IPs</li><li>/20 = ปานกลาง → มี <strong>4,096</strong> IPs</li><li>/24 = เล็ก (ขนาดเท่า Wifi บ้านทั่วไป) → มี <strong>256</strong> IPs</li><li>/28 = จิ๋ว (เล็กสุดที่ AWS ยอม) → มี <strong>16</strong> IPs</li></ul><p>ถ้า <strong>VPC</strong> คือ <strong>“หมู่บ้านจัดสรร”</strong> (ตามที่คุยกันข้อที่แล้ว) <strong>Subnet</strong> ก็คือ <strong>“ซอย”</strong></p><h3>แนะนำการตั้งค่าสำหรับทีมคุณ (5 คน)</h3><p>ตอนสร้าง VPC คุณเลือก CIDR เป็น 10.0.0.0/16 (มี 65,536 ไอพี) จากนั้นคุณควรสร้าง Subnet อย่างน้อย 2 ตัว ดังนี้:</p><p><strong>1. Public Subnet (สำหรับวางตัว VPN/EC2)</strong></p><ul><li><strong>Name:</strong> public-subnet-1</li><li><strong>IPv4 CIDR:</strong> 10.0.1.0/24 (เลขท้าย 1 = จำง่ายว่าเป็นซอย 1)</li><li><em>หมายเหตุ: </em><em>/24 จะมีที่ว่าง 256 ไอพี เพียงพอเหลือเฟือสำหรับ EC2</em></li><li><strong>Availability Zone:</strong> เลือกมาสักอัน เช่น ap-southeast-1a</li></ul><p><strong>2. Private Subnet (สำหรับวาง RDS)</strong></p><ul><li><strong>Name:</strong> private-subnet-1</li><li><strong>IPv4 CIDR:</strong> 10.0.2.0/24 (เลขท้าย 2 = จำง่ายว่าเป็นซอย 2)</li><li><strong>Availability Zone:</strong> เลือกอันเดียวกับข้างบน ap-southeast-1a (เพื่อให้ EC2 คุยกับ RDS ได้เร็วที่สุด เพราะอยู่ใน Data Center ตึกเดียวกัน)</li></ul><p>พอสร้างเสร็จ ไปสร้าง Internet gateway ละเชื่อมกับ VPC 0.0.0.0/0=&gt;gateway</p><p>ผูก subnet เป็น Subnet Associations ใน route table ก่อน</p><h3><strong>Security group</strong></h3><ul><li><strong>outbound rules ทางออก</strong></li><li><strong>inbound rules ทางเข้า</strong></li></ul><p><a href="https://gemini.google.com/share/56de46e83fdb">https://gemini.google.com/share/56de46e83fdb</a></p><p>ได้ tailscale แล้ว สามารถ add ได้ ใช้ mail ใหญ่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7dKtjDQUSDInpx2RNdpN9w.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b4b287a3299" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Developing Smart Contracts on SUI with LotusUI]]></title>
            <link>https://medium.com/@frongrider2/introduction-to-developing-smart-contracts-on-sui-with-lotusui-8e94d9b5c785?source=rss-10d5cd8e9d72------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e94d9b5c785</guid>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[sui]]></category>
            <dc:creator><![CDATA[FranceVlog]]></dc:creator>
            <pubDate>Mon, 02 Jun 2025 10:35:52 GMT</pubDate>
            <atom:updated>2025-06-02T10:35:52.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gr1ssHMDrQTOe_6Nkfijsw.jpeg" /><figcaption>lotusUI a sui local development</figcaption></figure><p>💧 Full local <a href="https://sui.io/"><strong>sui</strong></a> development user interface</p><p>Hi, I’m a software developer from <strong>Nerd3Lab</strong>.<br>I’d like to introduce you to one of our open-source projects: <a href="https://github.com/Nerd3Lab/lotusUI"><strong>LotusUI</strong></a>.</p><h3>Overview</h3><p>lotusUI is a local-first development interface built specifically for the Sui ecosystem. It addresses real challenges faced by Sui developers, including the unreliability of testnet faucets and the complexity of CLI-based local node setup. With lotusUI, developers can easily launch and manage local Sui environments through an intuitive interface, accelerating development and reducing friction. The goal is to make Sui development more productive and accessible for all developers, regardless of experience with CLI tools</p><h3>Why?</h3><p>You just want to spin up a local chain, test something small. But instead</p><p>❌ CLI errors<br>❌Faucet dry<br>❌Explorer doesn’t work</p><ul><li>✨ Intuitive account management — Easily create, delete and manage Sui addresses and accounts</li><li>💰 Built-in faucet — Get test tokens instantly with just one click</li><li>💾 Persistent chain state — Your local Sui chain data is automatically saved and persisted</li><li>⏰ State snapshots — Save and restore chain states to quickly switch between different development stages</li><li>📊 Transaction tracking — Monitor account balances and transaction history in real-time</li><li>🔍 Object explorer — Visually browse and inspect Sui objects, their properties and relationships</li><li>📝 Live logging — Watch node operations and transactions as they happen with detailed real-time logs</li><li>🎯 Developer focused — Built by developers, for developers, to make Sui development smoother</li></ul><h3>Prerequisites</h3><p>Before using lotusUI, you need to have Sui installed on your system. For detailed installation instructions, visit <a href="https://docs.sui.io/guides/developer/getting-started/sui-install">Sui Installation Guide</a>.</p><p>In macOS just run</p><pre>brew install sui</pre><p>And then Download and Install LotusUI application in this link <a href="https://github.com/Nerd3Lab/lotusUI?tab=readme-ov-file#download">https://github.com/Nerd3Lab/lotusUI?tab=readme-ov-file#download</a></p><p>Spin up a LotusUI 👩🏻‍💻</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aflD5_rd0ydNxS1y5eeL2w.png" /></figure><h3>🌟 LotusUI Modes</h3><p>LotusUI offers two flexible modes to support your local Sui development workflow</p><p>1. 🚀 <strong>Quick Start<br></strong>Spin up a local Sui node instantly without saving any data.<br>Perfect for rapid testing, airdrops, or exploring smart contracts in a throwaway environment.</p><p>Key Features:</p><ul><li>No persistent storage objects also transactions</li><li>Fast startup</li><li>Ideal for experiments or temporary usage</li><li>Lightweight — avoids SSD writes</li></ul><p>just click on<strong> Quick Start button</strong></p><p>2. 📁 <strong>Create Project<br></strong>Create a dedicated project with persistent local data.<br>Track blocks, monitor usage history, and manage multiple environments — all in one clean dashboard.</p><p>Key Features:</p><ul><li>Persistent block data</li><li>Project-based management</li><li>Suitable for long-term development and contract iteration</li><li>SSD writes (you can delete project data anytime)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RSUlO5TF1qqR9klehMmQkw.png" /></figure><p>can config Epoch durations of your sui local node</p><h3>🐳 Accounts tab features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eoEaGktOGqMNTj8qsORfMw.png" /></figure><ul><li>create new account</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*aaKDAH_aStp6Agex5Fezng.png" /><figcaption>Create test account</figcaption></figure><ul><li>set active account and add faucet 💧</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOSl2oRFirnxBYDx2uQm6A.png" /></figure><h3><strong>🖥️ Explorer tab feature</strong></h3><p>Thanks to <strong>Suiscan</strong>, you can now use a fully functional <strong>blockchain explorer</strong> right from your local environment — no need to connect to external networks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A7-pFUdb8L-IhdsfZLlsag.png" /></figure><h3>🖥️ Logging tab</h3><p>monitor sui local node logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MwfrBs_lUju44HkM7mnpJQ.png" /></figure><h3>🖥️ Objects tab</h3><p>LotusUI lets you easily inspect all <strong>on-chain objects</strong> owned by the currently <strong>active account</strong> on your local Sui network.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_0Hxu5saq5pAOypPkODnPw.png" /></figure><h3>SUMMARY</h3><p>In the previous part, we handled interacting with basic use of <strong>LotusUI</strong>. You can see that <strong>LotusUI</strong> is quite a good tool for testing and debugging smart contracts on the <strong>Sui ecosystem</strong>.</p><p>If you’d like to contribute to <strong>LotusUI</strong>, you’re welcome to:</p><ul><li>Fork our repository</li><li>Create issues on GitHub</li><li>Submit pull requests</li><li>Report bugs or suggest improvements</li></ul><p><strong>Don’t forget to show your support by giving us a star ⭐ on GitHub!</strong></p><p>Connect With Us:</p><ul><li>GitHub Repository : <a href="https://github.com/Nerd3Lab/lotusUI.git">https://github.com/Nerd3Lab/lotusUI.git</a></li><li>Discord : <a href="https://discord.gg/EthqZaAU">https://discord.gg/EthqZaAU</a></li><li>X : <a href="https://x.com/Nerd3Lab">https://x.com/Nerd3Lab</a></li></ul><p>If you enjoy my Blockchain articles, please share them and follow my page and Medium account. 🥰</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khojAyZB-sy6m3gx7IjxBA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e94d9b5c785" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Developing Smart Contracts on Superchain Using SuperUI]]></title>
            <link>https://blog.blockmagnates.com/introduction-to-developing-smart-contracts-on-superchain-using-superui-fab6f6cc83e7?source=rss-10d5cd8e9d72------2</link>
            <guid isPermaLink="false">https://medium.com/p/fab6f6cc83e7</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[superchain]]></category>
            <dc:creator><![CDATA[FranceVlog]]></dc:creator>
            <pubDate>Tue, 08 Apr 2025 13:18:39 GMT</pubDate>
            <atom:updated>2025-06-02T16:13:31.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="SuperUI provide superchain environment to run tests, fork networks, and inspect transactions of smart contract" src="https://cdn-images-1.medium.com/max/1024/1*5MfliEXc8skaZ24kgG4Yuw.jpeg" /><figcaption>SuperUI provide superchain environment to run tests, fork networks, and inspect transactions of smart contract</figcaption></figure><h3><strong>Overview</strong></h3><p>In this guide, we’ll walk through how to use SuperUI, a User Interface designed for blockchain developers working with Superchain (interoperability). We’ll learn how to set up your personal Superchain or fork an OP Stack chain, and then explore deploying smart contracts both manually and using Hardhat for development.</p><h3>Prerequisites</h3><p>Before we begin, Download and Install <a href="https://www.superui.app/"><strong>SuperUI</strong></a> application in this link</p><p><a href="https://github.com/Nerd3Lab/superUI?tab=readme-ov-file#download">GitHub - Nerd3Lab/superUI</a></p><ul><li><a href="https://nodejs.org/en"><strong>Node.js</strong></a>: Required for running JavaScript-based tools.</li><li><a href="https://book.getfoundry.sh/"><strong>Foundry</strong></a><strong>: A </strong>smart contract development toolchain</li></ul><h3>Step 1: Run your local superchain</h3><ol><li>open SuperUI application</li><li>Create project</li><li>Input your Project name</li><li>Select <strong>Quick start -&gt; Create Project 🚀</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3At6cHEKhTpRD6ZU5eZU5Q.png" /></figure><p>SuperUI enables you to create and manage a local development environment consisting of one Layer 1 (L1) chain and two Layer 2 (L2) chains.</p><p>Testing Accounts and ETH Balances in SuperUI</p><p><strong><em>IMPORTANT: Security Notice</em></strong></p><p><strong>⚠️ The following test accounts are for development purposes only. Never use these accounts in production environments or store real assets in them.</strong></p><ul><li>You can get private key each account by clicking key button</li><li>You can send ETH for each account</li></ul><h3>Step 2: Let’s see deploy contract in layer 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-4DAPHWBWrI4WNrW7pJlMA.png" /></figure><p>The Layer 1 (L1) contracts serve as the foundation for managing specific OP Stack chains. These contracts handle critical operations between L1 and their respective L2 chains</p><h3>Step 3: Let’s see Predeploy contract</h3><p>Predeploy contracts are special system-level smart contracts that are automatically deployed at specific addresses on OP Stack-based chains</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d6tdaZXDei_Y4xjLIzkFSg.png" /></figure><h3>Step 4: Let’s make transaction each account</h3><ol><li>Select Accounts tab any one chain</li><li>click transfer button</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ORt_1jDQiinEoliDslJiPQ.png" /></figure><p>3. Input your ETH and confirm</p><p>4. Boom!! At Transactions tab you will see the value transfer transaction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*68rshkF7dEcesc6y_DMeVg.png" /></figure><h3>Step 5: Let’s testing transfer ETH between layer2 chain</h3><ol><li>We will use Forge to send a transaction to <strong>SuperchainWETH</strong> contract at <strong>OPChainA (network 901)</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*qusIM83s_FdoLF2sHBZz9A.png" /></figure><p>2. Send ETH from <strong>Chain 901</strong> to <strong>Chain 902</strong> using the following command</p><pre>cast send 0x4200000000000000000000000000000000000024 &quot;sendETH(address _to, uint256 _chainId)&quot; 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 902 --value 10ether --rpc-url http://127.0.0.1:9545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yw8Xx_s4KtzOgpp17TUBxg.png" /></figure><p><strong>From Account (Chain 901)</strong><br>0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 <br>0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 (Private Key)<br><strong>To Account (Chain 902)</strong><br>0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266<br><strong>Value</strong><br>10ether</p><p>3. Result 🚀</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*cXl-zFHL_BzInsCz_prOiA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*TwEz3G5Ozd0t-bP1BxXHQg.png" /></figure><p>Let’s see <strong>transactions and Events</strong> In <strong>OPChainA</strong> and <strong>OPChainB</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*fzINlJ9lUH7bMAbgCMA50w.png" /><figcaption>SuperchainWETH Contract Call on OPChainA</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*wQ2hs6NBjmYvd8jAFU3AYQ.png" /><figcaption>L2ToL2CrossDomainMessenger Contract Call on OPChainB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*mqXgjLkDnhk3f9JXFbqObA.png" /><figcaption>Event from OpchainA</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*Hef1uM1DucQ4TjQHamyDmA.png" /><figcaption>Event from OpchainB</figcaption></figure><p>You can see the detail of <strong>SendMessage</strong> event from <strong>L2ToL2CrossDomainMessenger</strong> On OPChainA</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*wQ2hs6NBjmYvd8jAFU3AYQ.png" /></figure><h3>Step 6: deploy our contract</h3><ol><li>Exit project and run quick start to run new local superchain</li><li>Prepare your ABI json, In this Step, we will use my test smart contract from hardhat project clone this repository</li></ol><p><a href="https://github.com/RelieferProject/contracts.git">GitHub - RelieferProject/contracts</a></p><p>3. create .env file</p><pre>LOCAL_PRIVATE_KEY_1=&quot;0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80&quot;<br>LOCAL_PRIVATE_KEY_2=&quot;0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d&quot;<br>LOCAL_PRIVATE_KEY_3=&quot;0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a&quot;<br>LOCAL_PRIVATE_KEY_4=&quot;0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6&quot;<br><br><br>TYPECHAIN_TARGET=&quot;ethers-v5&quot;<br><br>DEPLOYMENT_ENV=&quot;prod | develop&quot;</pre><p>4. Install node package</p><pre>$ npm install</pre><p>5. Generate ABI with</p><pre>npm run run:abi</pre><p>ABI contracts wil generate at ./artifacts/contracts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*0RD-fH9GTqgiGAsk8LcEjg.png" /></figure><p>6. Deploy our contract with SuperUI <br>Select contracts tab &gt; Deploy Contract Button<br>Select Mode = hardhat<br>Select Directory of abi contracts that we generate before <strong>./artifacts/contracts<br></strong>select TestContract and Input arguments<br>add value of ETH<br>deploy</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxRImj8hxZGtaWFhI7KUFA.png" /></figure><p>Boom!! 🚀 our contract</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*475j5uIBQtR2FG8AsEXkTw.png" /></figure><h3>Step 7: Test Config ABI from deploy from hardhat</h3><p>In this step I will show you how to handle with contract that we deploy by hardhat</p><ol><li>use the same smart contract at step 6</li><li>Deploy contract (deploy my contracts)</li></ol><pre>npm run run:full:deploy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mR6GYrOuq5TI4SENB9Gqdw.png" /></figure><p>3. Let’s see result in SuperUI (layer 1 chain)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fce6w0zby0kvtHkllItgdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C44Tcewf5ngSQVlEheed1Q.png" /></figure><p>contract name and contract events are not defined <br>🤔🤔🤔 Because SuperUI don’t know ABI and contract name? <strong>(yes)</strong></p><p>4. We need to add contract name and contract ABI each contract<br><strong>click contract</strong> &gt; <strong>config ABI &amp; Name</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2tvLj2ql_MIrwtzH2L1nw.png" /></figure><p>Use ABI value at artifacts folder that we generated recently</p><p>Boom!!! RelieferFactory contract can read Event value</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQNZCDmnGP3vpeC3UKa4Cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QwliYTruiPUe1gzjkwoJyQ.png" /></figure><h3>SUMMARY:</h3><p>In the previous part we handled interacting with the deployed smart contract and testing with SuperUI and hardhat, You can see SuperUI is quit a good tool for test and debug smart contract on superchain ecosystem.</p><p><strong>Thank You for Your Interest!</strong></p><p>If you’d like to contribute to SuperUI, you’re welcome to:</p><ul><li>Fork our repository</li><li>Create issues on GitHub</li><li>Submit pull requests</li><li>Report bugs or suggest improvements</li></ul><p>Don’t forget to show your support by giving us a star ⭐ on GitHub!</p><p>Connect With Us:</p><ul><li>GitHub Repository : <a href="https://github.com/Nerd3Lab/superUI.git">https://github.com/Nerd3Lab/superUI.git</a></li><li>Discord : <a href="https://discord.gg/EthqZaAU">https://discord.gg/EthqZaAU</a></li></ul><p>If you enjoy my Blockchain articles, please share them and follow my page and Medium account. 🥰</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fab6f6cc83e7" width="1" height="1" alt=""><hr><p><a href="https://blog.blockmagnates.com/introduction-to-developing-smart-contracts-on-superchain-using-superui-fab6f6cc83e7">Introduction to Developing Smart Contracts on Superchain Using SuperUI</a> was originally published in <a href="https://blog.blockmagnates.com/">Block Magnates</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>