Giter Club home page Giter Club logo

mint-bot's Introduction

Contract Minting Bot

A simple bot which allows automated NFT minting via Flashbots.

Gas Prices

This bot uses Etherchain to estimate gas prices

How to use the bot

The bot uses toml files for configuration. Please see example.toml for a basic template.

It is also advisable to use a Burner Wallet when using this bot. NEVER USE YOUR COLD WALLET.

  1. Generate an encrypted private key file by running the application and selecting Encrypt private key then folllowing the prompts.
  2. Copy example.toml into another file. (e.g chubbicorns.toml)
  3. Generate a flashbot signer key (This only needs to be done once) by running the application and selecting Generate Flashbot Signer
  4. Edit the configurations inside the new file.
  5. Run the bot and select the configuration you would like to use.

Examples

This section will go through common contract scenarios and what configuration values should be set.

Basic Free Mint Contract

contract_address = "0x0000000000000000000000000000000000000000"
function = "mint(uint256)"
arguments = [{ type = "uint256", value = 2 }]
value = 0

Paid Mint Contract

value will need to be set to price per nft in eth * total amount minting

contract_address = "0x0000000000000000000000000000000000000000"
function = "mint(uint256)"
arguments = [{ type = "uint256", value = 2 }] # Minting 2 nfts with a price of 0.1eth each
value = 0.2 # 0.2eth is required for the single transaction

Automatic Gas

The bot uses a simple gas oracle to calculate gas.

gas_preset = "instant" # You can use slow, standard, fast, instant
gas_limit = 250_000

Custom Gas

If you would like to set your own gas use the following:

gas_preset = "custom"
gas_fee = 50 # Change to your preferred gas fee here
priority_fee = 2 # Change to your preferred priority fee here
gas_limit = 250_000

Multi mint

If a contract allows multiple mints but limits the mints per transaction then you can configure values like so:

contract_address = "0x0000000000000000000000000000000000000000"
function = "mint(uint256)" # Mint only allows 5 per tx and 10 max per wallet
arguments = [{ type = "uint256", value = 5 }]
value = 0.2 # The cost of mint PER transaction
transaction_count = 2 # We need to run the function above twice to mint all 10 NFTs

Delayed start time

If a contract has a set time for public mint then you can do the following:

# The public minting time in unix epoch seconds
# https://www.epochconverter.com/
start_time = 1654494482

Testing Configuration

If you would like to test the bot without submitting bundles then set the following value:

dry_run = true

Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

mint-bot's People

Contributors

magicalturtle avatar

Stargazers

Rohit Kumar Anant avatar arden 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.