폴리곤으로 토큰 발행하기

May 29, 2024
폴리곤으로 토큰 발행하기
 

폴리곤 위에서 토큰 생성하는 방법

1. 테스트 토큰 받는 방법(Polygon Mumbai)

2. 오픈 제플린에 들어가서, ERC20 설정 복사

// contracts/GLDToken.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract GLDToken is ERC20 { constructor(uint256 initialSupply) ERC20("Gold", "GLD") { _mint(msg.sender, initialSupply); } }

3. 리믹스에 들어가기

4. contract에 새로운 파일을 생성해주기 → 설정 후 복사

notion image
 

5. 7번째 줄, 8번쨰 줄에, 이름을 변경하면 된다.

 

6. Environment 환경을 폴리곤이 되어 있는 지갑으로 설정

notion image

6. Deply에서, InitialSupply 갯수 설정:

무조건 10^18을 해줘야 원하는 숫자가 나온다.
80만개 → 800000000000000000000000
 

7. Trasact를 누르면, 승인이 되며 Deplyed Contracts 복사

notion image

8. 토큰 가져오기 클릭

notion image

9.토큰 계약 주소에 Deployed Contacts 복사 후, 집어넣기

notion image

10. 토큰 있는 것이 확인이 된다.

notion image

11. 토큰 계약 주소

0x2867Bc4B59abeF2c65C5A400418970FEE59b0784
Share article

정리한 노션 내용을 올리는 공간