Giter VIP home page Giter VIP logo

nftdao's Introduction

MyNFT

The MyNFT contract is a non-fungible token (NFT) contract that extends the ERC721 contract from the OpenZeppelin library. It allows for the minting and management of unique, collectible tokens.

Properties

  • mintingRate: The maximum number of tokens that can be minted in a single block.
  • lastMintedBlock: The block number of the last time a token was minted.
  • mintsInCurrentBlock: The number of tokens minted in the current block.
  • nftPrice: The price of each token in wei.
  • members: A mapping of addresses to booleans representing whether or not they are members of the DAO.

Functions

mint

Mints a new token and assigns it to the specified address.

Parameters

  • _to: The address to assign the token to.
  • _tokenId: The unique ID of the token to mint.

mintNFT

Mints a new token and assigns it to the caller, provided that they have sent the required payment to the contract. Also enforces the minting rate and block restrictions.

Parameters

  • _tokenId: The unique ID of the token to mint.

Modifiers

  • payable: The function accepts ether payments.

addMember

Adds the specified address to the list of members of the DAO.

Parameters

  • _member: The address to add as a member.

updateMintingRate

Updates the minting rate of the contract. Can only be called by members of the DAO, and requires a majority vote of the members in favor of the change.

Parameters

  • _newRate: The new minting rate to set.

Modifiers

  • onlyMembers: The function can only be called by members of the DAO.

nftdao's People

Contributors

jacqwhales avatar

Watchers

 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.