วิธีทดลองใช้ AltLayer Rollup Launchpad ด้วย IDE แบบง่ายๆ

Nikka

Nikka

1/ เปิดเว็บ AltLayer Rollup Launchpad ที่ https://dashboard.alt.technology และเข้าสู่ระบบด้วยอีเมล

post image

2/ เมื่อ Log in แล้วจะเห็นหน้า rollup launchpad เลือก Create ด้านซ้าย จากนั้นเลือก Free Trial (2hour)

post image

3/ตั้งค่า Flash Layer ตามที่ต้องการ

-Transaction processing mode

Fair sequencing: ค่าแก๊สคงที่ อัดแก๊สแข่งไม่ได้

Priority gas auction: อัดแก๊สแข่งได้

ตั้ง flash layer name, block gas limit, block time, Native currency name, symbol ตามสบาย

Genesis account addresses and balances ใส่ address เราและจำนวนเหรียญที่ต้องการ ตรวจสอบข้อมูล Flash Layer หลังจากตรวจสอบแล้ว คลิกที่ "Create"

post image

4/รอประมาณ 5 นาที flash layer จะ active จากนั้น กดที่มุมขวาล่างเลือก switch to network เพื่อเปลี่ยนไปใช้ flash layer ที่สร้าง

post image

5/ตอนนี้เราจะไปสร้าง smart contract บน flash layer ของเราด้วย IDE ถ้าไม่มีสคริปต์ใช้ของผมที่แปะไว้ได้เลย เป็นสคริปต์มิ้นเหรียญERC20ง่ายๆ กด new file ตั้งชื่อ ก๊อปวางได้เลยครับ Script สร้างเหรียญแบบง่ายๆ ก๊อปวงเล็บให้ครบ https://paragraph.xyz/@nikka/CLAoI1kjHco4JWoSPaGO

post image

6/ จากนั้นไปที่ compiler กรณีใช้สคริปต์ด้านบนให้เลือกเวอร์ชั่น 0.8.18 แล้วกดปุ่ม compile สีฟ้าๆ

post image

7/ไปที่หน้า deploy & run เปลี่ยน network ใน metamask เป็น flash layer ที่สร้างไว้ Environment เลือกเป็น injected provider - metamask Contract เลือกสคริปต์ที่เราสร้างไว้ แล้วกด deploy สีส้มๆ ย้ำ เช็ค network ให้ดีๆ ถ้าไปเลือกเชนจริง จะเสียค่าแก๊สฟรี

post image

8/ หลังจากกด deploy จ่ายแก๊สแล้ว ให้เลื่อนลงมา ตรง deployed contracts จะมี contract ของเราขึ้นมาด้านล่าง

9/ กรณีใช้สคริปต์ด้านบน แล้วต้องการ interact กับ contract ที่เรา deploy บน Flash Layer ไปที่ฟังก์ชั่น mint ใส่ address ใส่จำนวนที่ต้องการแล้วตามด้วยเลข 0 18 ตัว กด transact เป็นอันเสร็จสิ้น สามารถเช็คเหรียญใน wallet ได้ด้วยการ add token จาก address หลังชื่อ contract

post image

วิธีทดลองใช้ AltLayer Rollup Launchpad ด้วย IDE แบบง่ายๆ