Skip to content

rizkim2/MagicEden-Auto-Mint-NFT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magic Eden Mint Executor

🚀 A simple and efficient tool for minting NFTs through Magic Eden's API with support for multiple chains.

Features

Multi-Chain Support - Ethereum, Arbitrum, Base, Monad Testnet
Gas Estimation - Accurate gas cost calculation before minting
Transaction Monitoring - Real-time transaction confirmation tracking
Error Handling - Comprehensive error messages and troubleshooting tips

Supported Networks

Network Chain ID Currency Status
Ethereum Mainnet 1 ETH
Arbitrum 42161 ETH
Base 8453 ETH
Monad Testnet 10143 MON

Installation

  1. Clone the repository
git clone https://github.com/dickifatma/MagicEden-Auto-Mint-NFT
cd MagicEden-Auto-Mint-NFT
  1. Install dependencies
npm install ethers dotenv readline axios
  1. Create environment file .env.example // Delete .example

  2. Configure your .env file

# Required: Your wallet private key
PRIVATE_KEY=your_private_key_here

# RPC URLs for different networks
RPC_URL_ETH_MAINNET=
RPC_URL_ARBITRUM=
RPC_URL_BASE=
RPC_URL_MONAD=

Project Structure

magic-eden-mint-executor/
├── index.js              # Main execution script
├── magiceden.js          # Magic Eden API wrapper
├── .env.example          # Environment template
├── package.json          # Dependencies
└── README.md            # Documentation

Usage

Basic Usage

  1. Run the script
node index.js
  1. Select network
🔗 Available chains:
1. Monad-Testnet
2. Arbitrum  
3. Ethereum Mainnet
4. Base

Select chain (1 - 4): 3
  1. Enter contract address
📋 Enter contract address: 
  1. Specify mint amount
📦 How many to mint (default 1): 

Features Breakdown

🔗 Network Selection

🔗 Available chains:
1. Monad-Testnet    # Free testnet tokens
2. Arbitrum         # Lower gas fees  
3. Ethereum Mainnet # Main network
4. Base             # Coinbase L2

Common Errors

Error Cause Solution
PRIVATE_KEY not found Missing environment variable Add PRIVATE_KEY to .env
RPC URL not found Missing RPC configuration Add RPC URLs to .env
Invalid contract address Wrong format Use 0x... format
Insufficient balance Not enough funds Add more ETH/tokens
No mint steps found Mint not active Check if mint is live
Gas estimation failed Network issues Retry or use default gas

🔧 Insufficient Funds

💡 INSUFFICIENT FUNDS:
- Add more ETH to your wallet
- Check if you have enough for mint cost + gas fees

⚡ Transaction Issues

💡 NONCE ISSUE:
- Try again, transaction might have been replaced

🌐 Network Problems

💡 RPC CONNECTION:
- Check your internet connection
- Verify RPC URL in .env
- Try different RPC provider

Security

⚠️ Important Security Notes:

  • Never share your private key
  • Use testnet for testing
  • Keep .env file secure
  • Don't commit private keys to git

.gitignore

Make sure your .gitignore includes:

.env
node_modules/

Adding New Networks

  1. Add network configuration
const networkNames = {
  10143: 'monad-testnet',
  42161: 'arbitrum', 
  1: 'ethereum',
  8453: 'base',
  // Add new network
  137: 'polygon'
};
  1. Add currency symbol
const getCurrencySymbol = (chain) => {
  switch (chain) {
    case 'monad-testnet': return 'MON';
    case 'polygon': return 'MATIC';
    default: return 'ETH';
  }
};
  1. Add RPC URL to .env
RPC_URL_POLYGON=

Testing

Testnet Testing

# Use Monad testnet for free testing
Select chain (1 - 4): 1

# Get testnet tokens from faucet
# Test with small amounts first

Mainnet Testing

# Start with small amounts
📦 How many to mint (default 1): 1

# Always verify contract address
# Check gas prices during high activity

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/new-feature)
  3. Commit changes (git commit -am 'Add new feature')
  4. Push to branch (git push origin feature/new-feature)
  5. Create Pull Request

Support


Star this repo if it helped you!

About

Its for educational only and it will be update depend on my mood. Feel free to fork this and doing collab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%