บทเรียนที่ 3

Deploy LearnCoin (LC) on Goerli Testnet

By the end of this lesson, you should be able to: 1.Understand the Goerli Testnet and its purpose. 2.Deploy your ERC20 token (LearnCoin) on the Goerli Testnet.

Introduction

Now that we have generated the code for our ERC20 meme token, the next step is to deploy it. Before deploying the token on the main Ethereum network, we will first deploy it on the Goerli Testnet. This allows us to test our token in a risk-free environment.

What is Goerli Testnet?

The Goerli Testnet is one of Ethereum’s test networks (testnets), which developers use for testing their decentralized applications before deploying them on the main Ethereum network (mainnet). Goerli Testnet, just like other Ethereum testnets, works similarly to the mainnet, but the Ether on it has no real value.

Using Goerli Testnet allows us to ensure our token works as expected, without spending real Ether. This makes it a crucial step in the development and deployment of smart contracts.

Getting Testnet Ether

Before we can deploy our token, we need some Ether in our Metamask wallet. Since we are using the testnet, we will use Testnet Ether, which can be obtained for free.

  1. Before all, please be sure to have Goerli Testnet on your Metamask. If you don’t have one, just click on Add Network and follow the instructions. If you have any problems, you can directly use this website for fast adding.
  1. To get free Testnet Ether, visit the Goerli Faucet.

  2. Follow the instructions on the website to receive free Testnet Ether in your MetaMask wallet.

  3. You should see a screen like this after completion. You are going to receive 0,02 GoerliETH

Make sure your MetaMask wallet is connected to the Goerli Testnet.

Deploying the Contract

Now, let’s deploy the contract on Goerli Testnet using Remix IDE:

  1. Go back to your Remix IDE.

  2. Click on the “Deploy & Run transactions” icon on the left side of the screen.

  3. Ensure the environment is set to “Injected Provider - Metamask” in the drop-down menu. This option connects to Metamask (Again. Make sure your MetaMask wallet is connected to the Goerli Testnet)

  4. From the “Contract” drop-down menu, select “LearnCoin” (your contract should be listed here after being successfully compiled).

  5. Click on “Deploy”.

You should have received the GoerliETH from the faucet. You can confirm your transaction on metamask and wait it to confirm on the Goerli testnet! Once the transaction is confirmed, your contract will be deployed to the Goerli Testnet! Your Remix console below must look like this:

And you should be able to find your contract deployed by clicking “View on Etherscan”

Congratulations, you have now created your own ERC20 token in a safe, testnet environment! You can find our Learn Coin here: https://goerli.etherscan.io/address/0x70a1704f22c476d64c6dfd5ad2e1a75dc2928cf0

ข้อจำกัดความรับผิด
* การลงทุนคริปโตมีความเสี่ยงสูง โปรดดำเนินการด้วยความระมัดระวัง หลักสูตรนี้ไม่ได้มีไว้เพื่อเป็นคำแนะนำในการลงทุน
* หลักสูตรนี้สร้างขึ้นโดยผู้เขียนที่ได้เข้าร่วม Gate Learn ความคิดเห็นของผู้เขียนไม่ได้มาจาก Gate Learn
แคตตาล็อก
บทเรียนที่ 3

Deploy LearnCoin (LC) on Goerli Testnet

By the end of this lesson, you should be able to: 1.Understand the Goerli Testnet and its purpose. 2.Deploy your ERC20 token (LearnCoin) on the Goerli Testnet.

Introduction

Now that we have generated the code for our ERC20 meme token, the next step is to deploy it. Before deploying the token on the main Ethereum network, we will first deploy it on the Goerli Testnet. This allows us to test our token in a risk-free environment.

What is Goerli Testnet?

The Goerli Testnet is one of Ethereum’s test networks (testnets), which developers use for testing their decentralized applications before deploying them on the main Ethereum network (mainnet). Goerli Testnet, just like other Ethereum testnets, works similarly to the mainnet, but the Ether on it has no real value.

Using Goerli Testnet allows us to ensure our token works as expected, without spending real Ether. This makes it a crucial step in the development and deployment of smart contracts.

Getting Testnet Ether

Before we can deploy our token, we need some Ether in our Metamask wallet. Since we are using the testnet, we will use Testnet Ether, which can be obtained for free.

  1. Before all, please be sure to have Goerli Testnet on your Metamask. If you don’t have one, just click on Add Network and follow the instructions. If you have any problems, you can directly use this website for fast adding.
  1. To get free Testnet Ether, visit the Goerli Faucet.

  2. Follow the instructions on the website to receive free Testnet Ether in your MetaMask wallet.

  3. You should see a screen like this after completion. You are going to receive 0,02 GoerliETH

Make sure your MetaMask wallet is connected to the Goerli Testnet.

Deploying the Contract

Now, let’s deploy the contract on Goerli Testnet using Remix IDE:

  1. Go back to your Remix IDE.

  2. Click on the “Deploy & Run transactions” icon on the left side of the screen.

  3. Ensure the environment is set to “Injected Provider - Metamask” in the drop-down menu. This option connects to Metamask (Again. Make sure your MetaMask wallet is connected to the Goerli Testnet)

  4. From the “Contract” drop-down menu, select “LearnCoin” (your contract should be listed here after being successfully compiled).

  5. Click on “Deploy”.

You should have received the GoerliETH from the faucet. You can confirm your transaction on metamask and wait it to confirm on the Goerli testnet! Once the transaction is confirmed, your contract will be deployed to the Goerli Testnet! Your Remix console below must look like this:

And you should be able to find your contract deployed by clicking “View on Etherscan”

Congratulations, you have now created your own ERC20 token in a safe, testnet environment! You can find our Learn Coin here: https://goerli.etherscan.io/address/0x70a1704f22c476d64c6dfd5ad2e1a75dc2928cf0

ข้อจำกัดความรับผิด
* การลงทุนคริปโตมีความเสี่ยงสูง โปรดดำเนินการด้วยความระมัดระวัง หลักสูตรนี้ไม่ได้มีไว้เพื่อเป็นคำแนะนำในการลงทุน
* หลักสูตรนี้สร้างขึ้นโดยผู้เขียนที่ได้เข้าร่วม Gate Learn ความคิดเห็นของผู้เขียนไม่ได้มาจาก Gate Learn