# pow-mint-nft-template

> PoW-mint NFT template (ERC721 + ERC2981 royalties + Agent ID gate). Tier from leading zero bits of a keccak proof, free quota, configurable supply/tiers/fees. Includes verified reference sources, a Python nonce grinder, and a Foundry deploy guide. Test on BSC testnet first — template unaudited.

pow-mint-nft-template is a paid AI agent skill on Agensi by SUBHAN ABQORI, in Web3 & Crypto. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $10 (one-time purchase)
- Creator: [SUBHAN ABQORI](https://www.agensi.io/creators/subhan-abqori)
- Category: [Web3 & Crypto](https://www.agensi.io/skills/web3-crypto)
- Version: 1.0
- Last updated: 2026-11-18
- Security: scan passed (2026-11-18); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/pow-mint-nft-template
- Tags: web3, security, solidity, nft-drop, bnb-chain, proof-of-work

## About this skill

Traditional NFT drops rely on centralized randomness or allowlist lotteries that users often distrust. This skill provides a proof-of-work (PoW) minting system where rarity is earned through off-chain computation, ensuring a transparent and verifiable distribution of assets.

### What it does
- **Mining-based Rarity** assigns tiers (Common to Legendary) based on the computational strength of a submitted nonce.
- **On-chain Verification** validates every proof using `keccak256` to ensure the work matches the wallet and current mint count.
- **Configurable Economics** supports per-wallet ladder pricing, royalty enforcement via ERC-2981, and optional free-quota gates.
- **Tier Gating** allows creators to lock high-value tiers behind total supply milestones to prevent early exhaustion of rare items.
- **Reference Implementations** include byte-for-byte verified sources for three live collections: OAGENT V2, FUIN ONI, and CHASTLE.

### How it works
1. **Configure parameters** by setting supply, floor difficulty (min bits), and tier thresholds in the constructor.
2. **Deploy the contract** using Foundry or Remix with the provided optimized compiler settings.
3. **Verify the source** on Sourcify to prove the immutability of the supply cap and royalty settings.
4. **Grind nonces** using the included Python script to generate proofs for specific wallet challenges.
5. **Mint tokens** by submitting the nonce and the calculated fee to the contract.

### Frameworks & tools
The core contract uses Solidity 0.8.24 with OpenZeppelin 5.x. Deployment scripts are optimized for Foundry (forge/cast) and Remix. The off-chain grinder requires Python 3 and the `pycryptodome` library for Keccak256 hashing.

### Why this beats prompting it yourself
Writing a secure PoW mint requires precise challenge rotation to prevent replay attacks and optimized hashing for on-chain gas efficiency. This template is derived from three production collections that have already handled real BNB transactions and successful mints. You avoid the trial-and-error of balancing tier difficulty that often plagues unverified implementations.

### Use cases
- **Fair Launch Collections** where users earn rarity through compute rather than gas wars or luck.
- **Agentic NFT Minting** that requires autonomous agents to perform work before acquiring assets.
- **Competitive Minting Events** using crown races and prize reserves to reward the highest computational effort.

### Known limitations
The template is not third-party audited. You must provide your own art and metadata hosting service. Rarity distribution depends entirely on your chosen bit thresholds.

## Requires

- Python

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the pow-mint-nft-template skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this template ensure a fair distribution of rare NFTs compared to traditional drops?

This template replaces centralized lotteries with a Proof-of-Work system, where NFT rarity is determined by verifiable computational effort (hashing) performed off-chain and verified on-chain.

### What specific files and tools are included in this skill package?

The purchase includes the optimized Solidity smart contract, deployment scripts for Foundry/Remix, and a Python-based 'grinder' script used to compute the nonces required for minting.

### Can I adjust the mining difficulty or change the number of rarity tiers?

Yes, you can fully customize total supply, difficulty thresholds for different rarity tiers, and pricing structures directly within the contract constructor before deployment.

### Is this skill restricted only to the BNB Chain, or can I deploy it on other networks?

While designed for the BNB Chain to take advantage of low gas costs, the Solidity 0.8.24 code is compatible with most EVM-compatible networks, though difficulty parameters may need tuning for different block times.

### How does the contract prevent users from submitting the same winning nonce multiple times?

The system uses a unique challenge rotation that binds every proof to a specific wallet address and the current mint count, effectively preventing users from reusing or 'replaying' nonces.

### Is this compatible with autonomous AI agents that need to mint their own assets?

This template is ideal for autonomous AI agents that can be programmed to run the included Python hashing script to 'earn' their own assets through compute rather than simple prompting.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
