Giter Club home page Giter Club logo

nft-generator's Introduction

nft-generator contract

Overview

Installation

npm install

Usage

Setting up a local blockchain

npx ganache-cli —deterministic

Listen on 127.0.0.1:8545

Deploying a Smart Contract to localhost

npx truffle migrate --network development

Usage

Interacting from the Console

npx truffle console --network development
truffle(development)> mco = await MyCollectible.deployed()
undefined
truffle(development)> mco.name()
'MyCollectible'
truffle(development)> mco.symbol()
'MCO'

Generating a NFT(ERC721) from console

Use function mint to generate NFT, Specify uint256 type tokenId as an argument.

truffle(development)> mco.mint(1)

Check the owner of the NFT

truffle(development)> mco.ownerOf(1)

Transfer NFT

truffle(development)> mco.safeTransferFrom(accounts[0], accounts[1], 1)

nft-generator's People

Contributors

keitaj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.