Skip to content

Instantly share code, notes, and snippets.

View anxiubin's full-sized avatar
💻
Frontend Developer

subin anxiubin

💻
Frontend Developer
View GitHub Profile

1. NFT Contract

  • KIP17 NFT 기반
  • mint
    • 지정 주소에 토큰을 발행
    • tokenURI에 메타데이터가 담긴 IPFS 링크 주소를 작성
      • NFT 메타데이터 : 상호명, 메뉴이름, 인증날짜, 업로드 위치, 이미지 url 등
  • mintMasterBadge
    • 같은 address에 20개 NFT가 쌓였을 때, badgeContract에 마스터 배지 NFT를 mint하는 메소드 호출
// Klaytn IDE uses solidity 0.4.24, 0.5.6 versions.
pragma solidity >=0.4.24 <=0.5.6;

contract IKIP17Receiver {
    function onKIP17Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes memory data