Git Product home page Git Product logo

tiny-erc721's Introduction

Overview

TinyERC721 is an ERC721-compliant smart contract with a focus on gas-optimization.

mint # gas usage
1 51,297
2 53,296
3 55,319
4 57,361
5 59,362

For more information, please read our blog.

Installation

$ npm install --save-dev tiny-erc721

Usage

Once installed, you can use the contracts in the library by importing them:

pragma solidity ^0.8.0;

import 'tiny-erc721/contracts/TinyERC721.sol';

contract Tajigen is TinyERC721 {
  // third constructor argument is maximum batch size, 0 for no limit
  constructor() TinyERC721('Citizens of Tajigen', 'TAJIGEN', 0) {}

  // second argument for _mint is quantity instead of token id
  function mint(uint256 quantity) external payable {
    _mint(msg.sender, quantity);
  }
}

Contribute

We really appreciate and value contributions to TinyERC721. If you have a suggestion that would make this better, please fork the repo and create a pull request.

Local development

$ npm run test
$ npm run test:gas

License

TinyERC721 is released under the MIT License.

Contact

wkm - @wakemi18

Project Link: https://github.com/tajigen/tiny-erc721

tiny-erc721's People

Contributors

wakemi18 avatar

Stargazers

 avatar Shawn avatar  avatar Alex Astro avatar Simon avatar Matt Russell avatar  avatar Luis de la Torre avatar Xen0ph0n avatar

tiny-erc721's Issues

Add starting index support

Great implementation of ERC721, would it be possible to add support to change the starting index similar to how ERC721A does so it doesn't always start at zero?

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.