The project's README from github.com/zunmax/osnm-z. As one markdown file: README.md.
|
|
OSNM-ZSingle-wallet Python CLI for OpenSea NFT mints |
A Python CLI tool for minting ERC-721 NFTs from OpenSea SeaDrop collections. Each run uses one wallet and one selected phase, supporting public sales, signed allowlists, and Merkle allowlists. The configured wallet pays for the mint and gas and receives the NFTs.
The sections below cover the major operating systems and commonly used terminals: Windows with PowerShell or Command Prompt, Linux with Bash, and macOS with Zsh or Bash. Follow the section for your operating system and terminal, completing each step in order.
Open Windows PowerShell 5.1 or PowerShell 7 and check whether Git is installed:
git --version
If Git is unavailable, install it with WinGet:
winget install --id Git.Git -e --source winget
For manual installation, download and run the
official Git for Windows installer.
Close and reopen PowerShell after installing Git, then run git --version again.
Install uv:
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex"
Close and reopen PowerShell, then confirm that uv is available:
uv --version
Clone the repository:
git clone https://github.com/zunmax/osnm-z.git
Enter the cloned project directory:
Set-Location -LiteralPath '.\osnm-z'
Install Python 3.12 through uv:
uv python install 3.12
Create the project environment from the locked dependencies:
uv sync --frozen --python 3.12
Create your private configuration file:
Copy-Item -LiteralPath '.env.example' -Destination '.env'
Open the configuration file in Notepad:
notepad.exe .env
Follow Wallet setup to fill in the required values and save the file.
Open Command Prompt and check whether Git is installed:
git --version
If Git is unavailable, install it with WinGet:
winget install --id Git.Git -e --source winget
For manual installation, download and run the
official Git for Windows installer.
Close and reopen Command Prompt after installing Git, then run git --version again.
Install uv through Windows PowerShell:
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex"
Close and reopen Command Prompt, then confirm that uv is available:
uv --version
Clone the repository:
git clone https://github.com/zunmax/osnm-z.git
Enter the cloned project directory:
cd /d "osnm-z"
Install Python 3.12 through uv:
uv python install 3.12
Create the project environment from the locked dependencies:
uv sync --frozen --python 3.12
Create your private configuration file:
copy ".env.example" ".env"
Open the configuration file in Notepad:
notepad.exe .env
Follow Wallet setup to fill in the required values and save the file.
Open a Bash terminal and check whether Git is installed:
git --version
If Git is unavailable, follow the instructions for your distribution.
On Debian or Ubuntu, update the package index:
sudo apt update
Then install Git:
sudo apt install git
On Fedora, install Git with DNF instead:
sudo dnf install git
For other distributions or manual installation, follow the
official Git for Linux instructions.
After installing Git, run git --version again.
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
If curl is unavailable, install uv with wget instead:
wget -qO- https://astral.sh/uv/install.sh | sh
Close and reopen the terminal, then confirm that uv is available:
uv --version
Clone the repository:
git clone https://github.com/zunmax/osnm-z.git
Enter the cloned project directory:
cd osnm-z
Install Python 3.12 through uv:
uv python install 3.12
Create the project environment from the locked dependencies:
uv sync --frozen --python 3.12
Create your private configuration file:
cp .env.example .env
Open .env in your preferred plain-text editor, then follow
Wallet setup.
Open Terminal using Zsh or Bash and check whether Git is installed:
git --version
If Git is unavailable, install Apple's Command Line Tools, which include Git:
xcode-select --install
For manual installation or other package-manager options, follow the
official Git for macOS instructions.
After installing Git, run git --version again.
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
Close and reopen Terminal, then confirm that uv is available:
uv --version
Clone the repository:
git clone https://github.com/zunmax/osnm-z.git
Enter the cloned project directory:
cd osnm-z
Install Python 3.12 through uv:
uv python install 3.12
Create the project environment from the locked dependencies:
uv sync --frozen --python 3.12
Create your private configuration file:
cp .env.example .env
Open .env in your preferred plain-text editor and follow Wallet setup.
The setup commands copy .env.example to .env. Run the copy
command only during first-time setup so an existing .env is not overwritten.
Edit .env, set the required values, and save it before running the tool:
WALLET_KEY=0x<64-hex-character-private-key>
RPC_URL=https://your-chain-rpc.example
FEE_AUTOMATIC=true
GAS_LIMIT=300000
Replace the wallet and RPC placeholders. Keep your private key and .env private.
GAS_LIMIT=300000 is an example; choose a limit suitable for the mint. The tool
does not estimate gas during submission.
These commands work in Windows PowerShell 5.1, PowerShell 7, Command Prompt,
Linux Bash, and macOS Zsh or Bash. Run them from the osnm-z directory.
uv run uses the project's environment; manual activation is not required.
Check configuration, wallet signer loading, and RPC readiness:
uv run --frozen osnm-z doctor
doctor does not submit a transaction. OpenSea wallet authentication and collection
eligibility are checked during mint setup.
Start an interactive mint:
uv run --frozen osnm-z mint
During scheduled waits, the terminal shows a live Mint starts in 1h 23m 45s
countdown to the selected phase's start. Preparation and early requests can finish
their waits before it reaches zero. Redirected logs record the remaining time once
per wait instead of printing repeated countdown updates.
Keep your system clock synchronized and avoid other transactions from the same wallet while minting. If the result is uncertain or unconfirmed, check the printed transaction hash before trying again; the tool does not automatically resend it.
Show command help:
uv run --frozen osnm-z --help
Show version information:
uv run --frozen osnm-z --version
The tool reads its settings from .env. Unknown and duplicate keys are rejected.
.env.example lists all supported settings.
| Setting | Default | Description |
|---|---|---|
WALLET_KEY |
Required | One private key, optionally prefixed with 0x. |
RPC_URL |
Required | Endpoint for chain reads, submission, and receipt tracking. HTTPS is required except for HTTP loopback testing. |
FEE_AUTOMATIC |
Required | true for automatic fees or false for manual fees. |
GAS_LIMIT |
Required | Positive transaction gas limit; the example uses 300000. |
MAX_FEE_PER_GAS_GWEI |
Manual mode only | Positive maximum fee per gas, in gwei. |
MAX_PRIORITY_FEE_PER_GAS_GWEI |
Manual mode only | Nonnegative priority fee, in gwei; must not exceed the maximum fee. |
RPC_REQUEST_TIMEOUT_MS |
10000 |
RPC request timeout; 100–120000 ms. |
PUBLIC_MINT_BROADCAST_OFFSET_MS |
0 |
Public submission lead time; 0–60000 ms. Positive values send early and can cause a revert if mined before the phase opens. |
PENDING_TIMEOUT_SECONDS |
20 |
Receipt-tracking timeout; 1–86400 seconds. |
RECEIPT_POLL_INTERVAL_MS |
250 |
Wait between receipt checks; 50–60000 ms. |
Automatic fees apply a 1.25× multiplier for an active phase and 2.5× for a scheduled
phase. Remove or comment out both manual fee settings when automatic fees are
enabled. For manual fees, set FEE_AUTOMATIC=false and supply both fee values.
| Setting | Default | Description |
|---|---|---|
OPENSEA_REQUEST_TIMEOUT_MS |
10000 |
General request timeout; 100–120000 ms. |
ELIGIBILITY_REQUEST_TIMEOUT_MS |
5000 |
Eligibility request timeout; 100–120000 ms. |
OPENSEA_ACTION_REQUEST_TIMEOUT_MS |
3000 |
Mint action request timeout; 100–120000 ms. |
OPENSEA_ATTEMPTS |
6 |
Request attempt limit; clamped to 6–10. |
OPENSEA_RETRY_INTERVAL_MS |
250 |
Request retry interval; 50–30000 ms. |
OPENSEA_CALLDATA_ATTEMPTS |
15 |
Private mint calldata attempt limit; clamped to 15–1000 and subject to timing and phase-expiry limits. |
OPENSEA_ATTEMPTS and OPENSEA_RETRY_INTERVAL_MS also govern RPC wallet preparation
and public settings recovery. Scheduled recovery uses its time window instead of
the attempt limit. Final wallet refresh and endpoint warm-up have separate retry
policies; these settings never cause a transaction to be resent.