Nft minter basic

From XSpoonAi/spoon-awesome-skill · View interactive version

Nft minter basic is an AI agent skill from the GitHub repository XSpoonAi/spoon-awesome-skill. Build real ERC721 mint transactions by querying blockchain contract data. Generates valid transaction call data with proper ABI encoding, gas estimation, and metadata. Transactions are fully built but

How to use this skill

Skill file

Description

Build real ERC721 mint transactions by querying blockchain contract data. Generates valid transaction call data with proper ABI encoding, gas estimation, and metadata. Transactions are fully built but not signed/sent - requires private key for blockchain execution.

Key Features

Inputs

{
  "contract": "0x... (ERC721 contract address)",
  "to": "0x... (recipient address)",
  "uri": "ipfs://... (metadata URI)"
}

Outputs

{
  "success": true,
  "contract": "0xBC4CA0EdA7647A8aB7C2061c2E2ad5B53F37f649",
  "contract_name": "BoredApeYachtClub",
  "contract_symbol": "BAYC",
  "next_token_id": 10000,
  "recipient": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "uri": "ipfs://QmWYNtmQaC2YmvwV4ZKLNVhNeqVZdGhbKxBGjxDYUgNQq",
  "transaction": {
    "from": "0x0000000000000000000000000000000000000000",
    "to": "0xBC4CA0EdA7647A8aB7C2061c2E2ad5B53F37f649",
    "function": "safeMint(address,string)",
    "function_selector": "0x50bb4e7f",
    "parameters": {...},
    "data": "0x50bb4e7f...",
    "estimated_gas": 80000,
    "gas_price_gwei": 50,
    "total_estimated_cost_eth": 0.004
  },
  "block_number": 24398887,
  "rpc_used": "https://eth-mainnet.public.blastapi.io",
  "timestamp": "2026-02-06T16:10:08.712885+00:00"
}

Usage

Build NFT Mint Transaction

echo '{
  "contract": "0xBC4CA0EdA7647A8aB7C2061c2E2ad5B53F37f649",
  "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "uri": "ipfs://QmWYNtmQaC2YmvwV4ZKLNVhNeqVZdGhbKxBGjxDYUgNQq"
}' | python3 scripts/main.py

ERC721 Standard Implementation

The skill builds transactions for the standard ERC721 safeMint function:

function safeMint(address to, string memory uri) public

Function Selector: 0x50bb4e7f (keccak256 of function signature)

Parameters:

Transaction Building Process

  1. Contract Validation: Verify contract address is valid Ethereum address
  2. Recipient Validation: Verify recipient address is valid
  3. Contract Queries: Fetch name, symbol, total supply from blockchain
  4. Token ID: Calculate next token ID as totalSupply + 1
  5. ABI Encoding: Encode parameters according to Solidity ABI spec
  6. Call Data: Build complete transaction call data
  7. Gas Estimation: Calculate realistic gas requirements
  8. Metadata: Include block number and timestamp as proof of real data

Error Handling

When an error occurs, the skill returns:

{
  "success": false,
  "error": "validation_error|connection_error|system_error",
  "message": "Human-readable error description"
}

Error Types:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.