Skip to content

Latest commit

 

History

History
executable file
·
95 lines (55 loc) · 3.05 KB

202104142109 TragbarNFT development.md

File metadata and controls

executable file
·
95 lines (55 loc) · 3.05 KB

202104142109 TragbarNFT development

#Ethereum #Projekt #NFT #TragbarNFT

Development

Resources

Ethereum smart contracts

OpenZeppelin contracts

INTRODUCTION TO SMART CONTRACTS

learn by coding

INTERACT WITH OTHER CONTRACTS FROM SOLIDITY

DEPLOYING YOUR FIRST SMART CONTRACT

HOW TO IMPLEMENT AN ERC-721 MARKET

Solidity by Example

2 Factor authentication with Smart Contracts

OpenSea NFT marketplace

OpenSea: ERC721 Tutorial

OpenSea Basic Integration

OpenSea: JavaScript SDK

OpenSea docs

Node.js framework

Express framework for Node.js

Node.js Tutorial for Beginners: Learn Node in 1 Hour

Learn Express Middleware In 14 Minutes

Live Server Extension in Visual Studio Code

Using nodemon with NodeJS Servers

Express framework for Node.js

Node.js Tutorial for Beginners: Learn Node in 1 Hour

Learn Express Middleware In 14 Minutes

Live Server Extension in Visual Studio Code

Using nodemon with NodeJS Servers

Others

Aragon whitepaper

Code

// contracts/GameItem.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract GameItem is ERC721URIStorage {
    using Counters for Counters.Counter;
    Counters.Counter private _tokenIds;

    constructor() ERC721("GameItem", "ITM") {}

    function awardItem(address player, string memory tokenURI)
        public
        returns (uint256)
    {
        _tokenIds.increment();

        uint256 newItemId = _tokenIds.current();
        _mint(player, newItemId);
        _setTokenURI(newItemId, tokenURI);

        return newItemId;
    }
}