Giter Club home page Giter Club logo

gas-optimization's Introduction

Gas Optimization

We've all been there. A new collection drops and you go and try to mint just to find that the gas fees are much more expensive than the NFT itself. Jeez!

This is clearly not a good user experience. So, when creating the smart contract for your NFT collection, one of your main objectives is to make gas fees for minting as cheap as possible.

We created a Medium article where we take a deep dive into gas costs and strategies you can use to lower them:

https://medium.com/wallstfam/the-ultimate-guide-to-nft-gas-optimization-7e9289e2d88f

This repository is a Hardhat project(hardhat.org) that includes all the smart contracts and scripts used in the article.

Feel free to use it in your own project. At Wall St Fam we believe blockchain is our future and thus we want to help where we can in making blockchain development more accesible to anyone.

How to use?

Clone the repository, go into the project directory and install all dependencies:

npm i

Depending on which scripts you run, you may need to input your .env variables(the format is in .env.example).

Run any hardhat task listed in hardhat.config.js.

For example:

npx hardhat getAllOwners_ownerOf

npx hardhat getAllOwners_transfer_event

npx hardhat vsEnumerable

gas-optimization's People

Contributors

jonathan-melnik avatar phutngo avatar mc-hamster avatar fosgate29 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.