반업주부의 일상 배움사

[블록체인/NFT] 이미지 생성부터 오픈씨까지 (Mumbai/Polygon) 본문

IT 인터넷/Blockchain

[블록체인/NFT] 이미지 생성부터 오픈씨까지 (Mumbai/Polygon)

Banjubu 2022. 4. 30. 17:34
반응형

 

간단하게 아래 프로젝트에 들어있는 이미지를 이용할께요.

https://github.com/HashLips/hashlips_art_engine

 

GitHub - HashLips/hashlips_art_engine: HashLips Art Engine is a tool used to create multiple different instances of artworks bas

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers. - GitHub - HashLips/hashlips_art_engine: HashLips Art Engine is a tool used to create...

github.com

 

터미널에서 실행

$ yarn install
$ yarn build

 

아래 서비스를 이용해서 IPFS에 등록할께요.

https://www.pinata.cloud/

 

Pinata | Your Home for NFT Media

Pinata is the home of NFT media, used by nearly 200,000 creators including some of the world's biggest brands. Experience web3 media like never before.

www.pinata.cloud

 

피나타 > 폴더 업로드 > 해쉬립스 폴더 > build/images 업로드 (name: *-images)

CID 복사 > 해쉬립스 src/config.js > 아래와 같이 수정

const baseUri = 'ipfs://NewUriToReplace';
수정
const baseUri = 'ipfs://복사한CID';

 

터미널에서 실행

$ yarn build update_info
$ cd build/json/
$ for f in *.json; do mv "$f" "${f%.*}"; done

 

피나타 > 폴더 업로드 > 해쉬립스 폴더 > build/json 업로드 (name: *-metadata)

메타데이터 해시를 스마트 컨트랙트에 등록 > 민팅 > 오픈씨에서 json 파싱 > 이미지 및 상세정보 노출.

 

크롬에 메타마스크 설치 및 계정 생성

https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn

 

MetaMask

브라우저의 이더리움 지갑

chrome.google.com

 

뭄바이(Polygon) 테스트넷 연결: 메타마스크 > 네트워크 추가

Network Name: Mumbai Testnet
New RPC URL: https://rpc-mumbai.maticvigil.com
Chain ID: 80001
Currency Symbol: MATIC
Block Explorer URL: https://polygonscan.com/

 

입금

https://faucet.polygon.technology/

 

몇 분 기다리면 들어와요.

 

폴리곤스캔 사이트 가입

https://polygonscan.com/register

 

PolygonScan Registration Page

 

polygonscan.com

 

샘플 프로젝트 다운로드

https://github.com/prayagsingh/hardhat_polygon_nft

 

GitHub - prayagsingh/hardhat_polygon_nft: An Nft example using hardhat and Polygon blockchain

An Nft example using hardhat and Polygon blockchain - GitHub - prayagsingh/hardhat_polygon_nft: An Nft example using hardhat and Polygon blockchain

github.com

 

폴리곤스캔 > 계정 > API key (POLYGON_TEST_API_KEY)

메타마스크 > 뭄바이 > More > 계정 세부정보 > 비공개 키 (POLYGON_TEST_PRIVATE_KEY)

.env에 설정

POLYGON_TEST_PRIVATE_KEY = ''
POLYGON_TEST_API_KEY = ''

 

각자에 맞게 .sol 파일 수정 > 컴파일 > 디플로이 > 증명(verify)

스마트 컨트랙트를 이용해 오픈씨 계정 주소로 보내면 끝.

 

 

 

영어, 중국어 공부중이신가요?

홈스쿨 교재. 한 권으로 가족 모두 할 수 있어요!

 

한GLO 미네르바에듀 : 네이버쇼핑 스마트스토어

한글로 영어가 된다?! 한글로[한GLO]는 영어 중국어 일어 러시아어 스페인어가 됩니다!!

smartstore.naver.com

 

반응형
LIST
Comments