All Projects → 0xcert → Ethereum Erc721

0xcert / Ethereum Erc721

Licence: mit
Non-fungible token implementation for Ethereum-based blockchains.

Programming Languages

solidity
1140 projects

Projects that are alternatives of or similar to Ethereum Erc721

erc721
The reference implementation of the ERC-721 non-fungible token standard.
Stars: ✭ 989 (+290.91%)
Mutual labels:  smart-contracts, standard, tokens, token, implementation, eth
ethereum-dex
Decentralized exchange implementation for the 0xcert protocol on the Ethereum blockchain.
Stars: ✭ 18 (-92.89%)
Mutual labels:  smart-contracts, standard, tokens, token, eth
ethereum-erc20
Fungible token implementation for the Ethereum blockchain.
Stars: ✭ 27 (-89.33%)
Mutual labels:  smart-contracts, standard, tokens, token, eth
ethereum-crowdsale
0xcert protocol crowdsale contracts for Ethereum blockchain.
Stars: ✭ 15 (-94.07%)
Mutual labels:  smart-contracts, tokens, token, eth
Ethereumbook
Mastering Ethereum, by Andreas M. Antonopoulos, Gavin Wood
Stars: ✭ 11,663 (+4509.88%)
Mutual labels:  ethereum, smart-contracts, token
Simple-Game-ERC-721-Token-Template
🔮 Very Simple ERC-721 Smart Contract Template to create your own ERC-721 Tokens on the Ethereum Blockchain, with many customizable Options 🔮
Stars: ✭ 83 (-67.19%)
Mutual labels:  smart-contracts, token, eth
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (-55.73%)
Mutual labels:  smart-contracts, tokens, eth
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (+66.01%)
Mutual labels:  ethereum, smart-contracts, eth
Wallet
🚀 基于Flutter开发的跨终端数字货币交易所✨
Stars: ✭ 36 (-85.77%)
Mutual labels:  ethereum, eth, token
Awesome Buggy Erc20 Tokens
A Collection of Vulnerabilities in ERC20 Smart Contracts With Tokens Affected
Stars: ✭ 251 (-0.79%)
Mutual labels:  ethereum, smart-contracts, tokens
solidstate-solidity
💠 Upgradeable-first Solidity smart contract development library 💠
Stars: ✭ 264 (+4.35%)
Mutual labels:  smart-contracts, eth
conduit
Conduit - Open Source 0x Relayer API implemented in NodeJS
Stars: ✭ 18 (-92.89%)
Mutual labels:  token, eth
framework
Lightweight, open source and magic-free framework for testing solidity smart contracts.
Stars: ✭ 36 (-85.77%)
Mutual labels:  smart-contracts, eth
laravel-web3
Laravel SDK wrapper for the Web3 PHP API client that interacts with the Ethereum blockchain.
Stars: ✭ 85 (-66.4%)
Mutual labels:  token, eth
colonySale
Colony Token and Crowdsale Contracts
Stars: ✭ 27 (-89.33%)
Mutual labels:  smart-contracts, token
erc20-balance
💎 Get 2000+ ERC-20 token balances with JavaScript. Supports Node.js and Deno
Stars: ✭ 18 (-92.89%)
Mutual labels:  smart-contracts, tokens
blockstarter
This is a white label solution to create a contribution crypto-wallet that can be used in your ICO campaign.
Stars: ✭ 21 (-91.7%)
Mutual labels:  smart-contracts, token
mock-oauth2-server
A scriptable/customizable web server for testing HTTP clients using OAuth2/OpenID Connect or applications with a dependency to a running OAuth2 server (i.e. APIs requiring signed JWTs from a known issuer)
Stars: ✭ 83 (-67.19%)
Mutual labels:  tokens, token
ethereum-contracts
Knowledge Ethereum Smart Contracts
Stars: ✭ 41 (-83.79%)
Mutual labels:  smart-contracts, token
crowdsale-smart-contract
No description or website provided.
Stars: ✭ 39 (-84.58%)
Mutual labels:  smart-contracts, token

Build Status NPM Version Dependencies Status Bug Bounty

ERC-721 Token — Reference Implementation

This is the complete reference implementation of the ERC-721 non-fungible token standard for the Ethereum and Wanchain blockchains. This is an open-source project, complete with Specron testing.

The purpose of this implementation is to provide a good starting point for anyone who wants to use and develop non-fungible tokens on the Ethereum and Wanchain blockchains. Instead of re-implementing the ERC-721 yourself you can use this code which has gone through multiple audits and we hope it will be extensively used by the community in the future.

If you are looking for a more feature-rich and advanced ERC721 implementation, then check out the 0xcert Framework.

Structure

All contracts and tests are in the src folder. There are multiple implementations and you can select between:

  • nf-token.sol: This is the base ERC-721 token implementation (with support for ERC-165).
  • nf-token-metadata.sol: This implements optional ERC-721 metadata features for the token contract. It implements a token name, a symbol and a distinct URI pointing to a publicly exposed ERC-721 JSON metadata file.
  • nf-token-enumerable.sol: This implements optional ERC-721 support for enumeration. It is useful if you want to know the total supply of tokens, to query a token by index, etc.

Other files in the tokens and utils directories named erc*.sol are interfaces and define the respective standards.

Mock contracts showing basic contract usage are available in the mocks folder.

There are also test mocks that can be seen here. These are specifically made to test different edge cases and behaviours and should NOT be used as a reference for implementation.

Requirements

  • NodeJS 9.0+ is supported
  • Windows, Linux or macOS

Installation

npm

This is the recommended installation method if you want to use this package in your JavaScript project.

This project is released as an npm module. You must install it using the npm command:

$ npm install @0xcert/[email protected]

Source

This is the recommended installation method if you want to improve the 0xcert/ethereum-erc721 project.

Clone this repository and install the required npm dependencies:

$ git clone [email protected]:0xcert/ethereum-erc721.git
$ cd ethereum-erc721
$ npm install

Make sure that everything has been set up correctly:

$ npm run test

Usage

npm

To interact with this package's contracts within JavaScript code, you simply need to require this package's .json files:

const contract = require("@0xcert/ethereum-erc721/build/nf-token-enumerable.json");
console.log(contract);

Remix IDE (Ethereum only)

You can quickly deploy a contract with this library using Remix IDE. Here is one example.

You have created and have possession of unique glass-blown artwork (each having a serial/lot number) which you would like to sell using the Ethereum or Wanchain mainnet. You will sell non-fungible tokens and the buyers would be able to trade those to other people. One token per piece of artwork. You commit to anybody holding these tokens that they may redeem their token and take physical possession of the art.

To do this, simply paste the code below into Remix and deploy the smart contract. You will "mint" a token for each new piece of artwork you want to see. Then you will "burn" that token when you surrender physical possession of the piece.

pragma solidity 0.8.0;

import "https://github.com/0xcert/ethereum-erc721/src/contracts/tokens/nf-token-metadata.sol";
import "https://github.com/0xcert/ethereum-erc721/src/contracts/ownership/ownable.sol";

/**
 * @dev This is an example contract implementation of NFToken with metadata extension.
 */
contract MyArtSale is
  NFTokenMetadata,
  Ownable
{

  /**
   * @dev Contract constructor. Sets metadata extension `name` and `symbol`.
   */
  constructor()
  {
    nftName = "Frank's Art Sale";
    nftSymbol = "FAS";
  }

  /**
   * @dev Mints a new NFT.
   * @param _to The address that will own the minted NFT.
   * @param _tokenId of the NFT to be minted by the msg.sender.
   * @param _uri String representing RFC 3986 URI.
   */
  function mint(
    address _to,
    uint256 _tokenId,
    string calldata _uri
  )
    external
    onlyOwner
  {
    super._mint(_to, _tokenId);
    super._setTokenUri(_tokenId, _uri);
  }

}

You should contact a lawyer before holding an auction, or selling anything. Specifically, laws for auctions vary wildly by jurisdiction. This application is provided only as an example of the technology and is not legal advice.

Playground

Ethereum - Ropsten testnet

We already deployed some contracts to the Ropsten network. You can play with them RIGHT NOW. No need to install the software. In this test version of the contract, anybody can mint or burn tokens, so don't use it for anything important.

Contract Token address Transaction hash
nf-token.sol 0xd8bbf8ceb445de814fb47547436b3cfeecadd4ec 0xaac94c9ce15f5e437bd452eb1847a1d03a923730824743e1f37b471db0f16f0c
nf-token-metadata.sol 0x5c007a1d8051dfda60b3692008b9e10731b67fde 0x1e702503aff40ea44aa4d77801464fd90a018b7b9bad670500a6e2b3cc281d3f
nf-token-enumerable.sol 0x130dc43898eb2a52c9d11043a581ce4414487ed0 0x8df4c9b73d43c2b255a4038eec960ca12dae9ba62709894f0d85dc90d3938280

Wanchain - testnet

We already deployed some contracts to testnet network. You can play with them RIGHT NOW. No need to install software. In this test version of the contract, anybody can mint or burn tokens, so don't use it for anything important.

Contract Token address Transaction hash
nf-token.sol 0x6D0eb4304026116b2A7bff3f46E9D2f320df47D9 0x9ba7a172a50fc70433e29cfdc4fba51c37d84c8a6766686a9cfb975125196c3d
nf-token-metadata.sol 0xF0a3852BbFC67ba9936E661fE092C93804bf1c81 0x338ca779405d39c0e0f403b01679b22603c745828211b5b2ea319affbc3e181b
nf-token-enumerable.sol 0x539d2CcBDc3Fc5D709b9d0f77CaE6a82e2fec1F3 0x755886c9a9a53189550be162410b2ae2de6fc62f6791bf38599a078daf265580

Contributing

See CONTRIBUTING.md for how to help out.

Bug bounty

You are somebody that reads the documentation of smart contracts and understands how the ERC-721 Token Reference Implementation works. So you have unique skills and your time is valuable. We will pay you for your contributions to this project in the form of bug reports.

If your project depends on ERC-721 or you want to help improve the assurance of this project then you can pledge a bounty. This means you will commit to paying researchers that demonstrate a problem. Contact us at [email protected] if interested. Thank you.

Read the full bug bounty program.

Licence

See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].