# Fhenix Deploy Contract

By [ic36006](https://paragraph.com/@ox97acc5) · 2024-10-07

---

Fhenix เป็น Blockchain Layer 2 ระดมทุน 22M มีเควสให้ทำใน Discord เพื่อเก็บสะสมแต้มลุ้น Airdrop วันนี้จะมาสอนทำเควส Deploy contract กัน

1.เข้าร่วม [Discord Fhenix](https://discord.gg/WDWc9h5cJY)

2,Verify discord ให้เรียบร้อย จากนั้นไปที่ ห้อง Chennel & Role

![](https://storage.googleapis.com/papyrus_images/471367103f66b49c7228e7d0c1a5d4536254e50294e1c7073021b7915ee7502b.png)

3.เลือกแท๊บ Browse Channels มองหาห้อง community-quests ติกเครื่องหมายถูก

![](https://storage.googleapis.com/papyrus_images/0380387fd3ce4ccca4f1d804d418d706b88fbaac5158558d27fdd4830f3f04c3.png)

4.เข้าไปที่ห้อง community-quests แล้วใช้คำสั่ง /quest จะมี menu quest ขึ้นมาตามภาพ

![](https://storage.googleapis.com/papyrus_images/9cf9fa01793d889c5fde03b4175121663f0c37630cfbf6cd701b36591658caf0.avif)

5.เลือกQuest ที่ 1 จะปรากฎห้องย่อยขึ้นมาอีกห้องให้เราเชื่อม Wallet กด Connect wallet ก่อนที่เราจะ Sign เพื่อเชือม wallet ให้เราเปลี่ยน chain เป็น Etherum Mainnet ก่อนไม่งั้น Metamask จะไม่เด้งขึ้นมาให้ sign

![](https://storage.googleapis.com/papyrus_images/d3700bc28aa0aabf060741335bcc106aefa979f087b532dc48de13b5709ca338.png)

6.ไปที่ [ChainList](https://chainlist.org/?testnets=true&search=fhen) เพื่อ add chain Fhenix testnst

![](https://storage.googleapis.com/papyrus_images/4b429dfb43fb9bda75e49e151bc77ffcfc0ad89c9b5bf513f70a7632244cfd2e.png)

7.Bridge ETH จาก sepolia ไปยัง Fhenix เพื่อใช้เป็นค่า gas ในการ Deploy ที่

[https://bridge.helium.fhenix.zone/](https://bridge.helium.fhenix.zone/)

8.เราจะใช้ Remix ในการ Deploy contract ให้ไปที่ Remix กดสร้างไฟล์ให้ใช้ชื่อว่า test.sol แล้วเอา Code นี้ไปใส่

> // SPDX-License-Identifier: MIT pragma solidity ^0.8.26; contract Counter { uint256 public count; function increment() public { count += 1; } function decrement() public { require(count > 0, "Count cannot be negative."); count -= 1; } function getCount() public view returns (uint256) { return count; } }

จากนั้น ทำการ Compile

![](https://storage.googleapis.com/papyrus_images/b16714365a92c0d5d700166f7b4e37ff53bcf9a7e097ff6ce52e6d52502d1e0c.png)

แล้ว Deploy ก่อน Deploy ให้เลือก **Injected Provider - MetaMask** เปลี่ยน chain ใน metamask เป็น Fhenix แล้วทำการ Deploy ให้เรา Deploy ทั้งหมด 5 ครั้ง

![](https://storage.googleapis.com/papyrus_images/1700491981ade5d87ec4460f31867938540130a4c456b9c4bf56b1caeac8ce75.avif)

แล้วกลับไป Discord เพื่อ verify

![](https://storage.googleapis.com/papyrus_images/96e41c6f991107d63b57efb37f8bfed4438aae14e7f0f4d984d771d666bd107e.avif)

อ้างอิงวิธีการ ทำมาจาก

[https://www.alphadrops.net/alpha/fhenix](https://www.alphadrops.net/alpha/fhenix)

เช่นเคยถ้าเห็นว่ามีประโยชน์แล้วอยากสนันสนุนสามารถ Mint NFT เพื่อเป็นกำลังใจได้

---

*Originally published on [ic36006](https://paragraph.com/@ox97acc5/fhenix-deploy-contract)*
