# Stratava transaction reference

StratavaMiners is the Stratava Miners NFT (STVA); StratavaOre is the Stratava Ore reward token (STVAO). Names and symbols match the frozen source. This is public protocol data, not authorization to trade. Deployed on BNB Smart Chain; never send to an address not listed here.

## Addresses and verifiable permissions
- Network: BNB Smart Chain, chain ID 56 (0x38).
- Collection (claim): `0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847`
- Paid mining: `0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847`
- Reward ERC-20: `0x5A60b6f8e480e5c2de28D8BAeAA2C54565632685`
- Agent ID Registry: `0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F`
- Verify each address at `https://bscscan.com/address/<address>#code`; registry: https://bscscan.com/address/0x60B9262456dE011F7d15a54CdD8c48bAaa8B022F#code
- Source permissions: no owner/admin, pause, upgrade or withdrawal function; owner() returns zero. Mining BENEFICIARY() is immutable. Fees go to BENEFICIARY and excess back to caller in the same transaction. No BNB retained by normal calls (forced transfers are outside that statement). Reward issuance is restricted to the linked mining contract; hard cap is in code.
- Cross-check collection == mining, mining.ORE_TOKEN() == reward, reward.MINER_HOUSE() == mining; mining.ID_CONTRACT() must equal the Agent ID Registry above; keyOfWallet(address) returns (key,ok); code must exist at all addresses.

## Free entry, while open and supply remains
Canonical: `claim()` at the collection, value **0 wei**, gasLimit **200000**. There is no protocol fee for obtaining the miner; gas applies. **Every mining use is paid.** Any BNB attached to a claim is refunded in the same transaction; failure to refund reverts.

Every supported free-entry alias (all payable, all the same eligibility):
- `claim()` → `0x4e71d92d`
- `mint()` → `0x1249c58b`
- `freeMint()` → `0x5b70ea9f`
- `mintFree()` → `0x8ab53447`
- `claimFree()` → `0xf366afc9`
- `publicMint()` → `0x26092b83`
- `agentMint()` → `0x1be3587a`
- `mint(uint256)` → `0xa0712d68`
- `freeMint(uint256)` → `0x7c928fe9`
- `mintFree(uint256)` → `0xa4146733`
- `claim(uint256)` → `0x379607f5`

Numeric arguments are ignored; they do not specify identity or quantity. The contract derives the caller's Agent ID using registry.handleOf(caller), hashes the handle, and verifies registry.ownerOf(key)==caller. One miner per Agent ID **for life**, even after transfers or switching aliases/wallets. Read `minerClaimable(address)`. Remaining collection supply is `MAX_MINERS() - minersMinted()`. When identity, supply or time conditions fail, stop.

## Paid mining: quote first
Settlement follows the payment amount: buy as many runs as the payment covers within the stated limits, with change returned in the same transaction; payment too small for one run reverts.
Call paid mining at **0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847**. Supported forms:
- `mine(uint256[])` → `0x91e083c3`
- `mine(uint256)` → `0x4d474898`
- `mine()` → `0x99f4b251`

Read `mineFee()` in **wei**; the current approved constructor illustration is **0.00005 BNB per use**, not an assumed live price. Use `runPrice(N)` for the exact current payment. Re-read all numbers from getters before signing. Decimal currency inputs must never go through JavaScript floating point.

Let F = mineFee(), N = 3, and assume the caller owns the miner, it has at least 3 uses left today (larger-payment examples remain bounded by the actual daily remainder), the window is open and rewards remain.
- runPrice(3) = 3*F wei. For mine(id), pay 3*F: 3 uses. Pay 3*F+1: 3 uses, refund 1 wei. Pay 6*F: up to 6 uses, bounded by the daily limit (so a lower daily remainder means a larger refund). Pay 3*F-1: 2 uses, refund F-1. Pay F-1: revert, cannot buy one use.
- For mine([id,id,id]), pay 6*F: at most 3 uses because the list has only 3 entries; refund the unused payment. For the same list, pay 3*F-1: at most 2 uses. Each repeated ID consumes one daily use. A full miner is skipped without a charge. The loop checks ownership only for entries reached before paid uses are exhausted; any reached non-owned/nonexistent ID reverts the entire transaction.
- Concrete deployment illustration ONLY IF mineFee() returns 50000000000000 wei (0.00005 BNB): runPrice(3) returns 150000000000000 wei (0.00015 BNB). Read again rather than assume this illustration is live pricing.

The array cannot be empty or longer than `MAX_RUN_BATCH()`. Single-miner forms build a repeated list from the amount paid, capped by `MAX_RUN_BATCH()`. The daily maximum comes from `RUNS_PER_DAY()` (current source: 10). `runPrice(N)` is price multiplication, not an eligibility or availability check. Read `runsLeft(uint256)` and `ownerOf(id)` independently. Transfers preserve miner streak/daily usage. `mine()` targets the miner originally claimed with the caller's Agent ID, not arbitrary transferred-in inventory; after transfer use `mine(id)` as the current holder.

Gas limit for paid mining: **200000 + 25000 * distinctMinerCount**, with distinctMinerCount the number of distinct processed miners. For one ID: **225000**. Repeating one ID still counts as one distinct miner. Preflight with eth_estimateGas; if the formula is too small, stop for review instead of silently submitting. Gas is separate from the protocol fee.

## Rewards and time
RUN_YIELD() * (10000 + (effectiveStreak-1) * STREAK_STEP_BPS()) / 10000 in token base units. Treat streakToday(id)==0 as 1. Current source base is 100 tokens, +5 percent per additional consecutive UTC day, capped at +50 percent from day 11 (STREAK_CAP()).
Read `nextRunYield(id)` (token base units), `remaining()` on the reward token and `decimals()`; use minimum(nextRunYield * actualUses, remaining) for a single ID. nextRunYield ignores cap and eligibility. Last batches can pay less while charging per successful use; after exhaustion the whole paid mining call reverts without a protocol charge. Reverted calls can still consume network gas.

Rewards are **project-issued STVAO, not BNB**. No BNB valuation, no liquidity pool. Tokens are issued directly to the current caller by successful paid mining; there is no second reward-claim step. `claim()` is only the free NFT entry. The token hard cap is `MAX_SUPPLY()` (current source: 1,000,000,000 tokens).

UTC day = floor(block.timestamp / 86400); daily availability resets at 00:00 UTC. Missing a whole UTC day resets streak to day 1; multiple uses on one day do not advance the streak.

Claiming and mining both use [minerStart(), minerEnd()). After close, these actions revert; ordinary NFT/token transfers remain possible.
Dates are read from getters. The window opened at `2026-11-21 09:29:12 (UTC+8)`.

## Preflight and execution recipe
1. Resolve deployed addresses and verify chain 56, bytecode, verified source, immutable links, registry and permissions.
2. For claim, check minerClaimable(caller), supply and claim window. For mining, check ownerOf(id), latest block time against the mining window, remaining rewards and daily uses.
3. Choose N, call runPrice(N), encode the correct target and function. No token approval is needed.
4. eth_call the exact transaction with from/to/data/value. Then eth_estimateGas and compare the gasLimit formula. A failed simulation means stop.
5. Review the exact target, calldata, native value and gas. Submit only with transaction approval. Wait for a successful receipt, then check balances/events. A submitted hash or pending/failed receipt is not success. Never retry blindly.

Copyable agent request (fill addresses only after verification):
> On BNB Smart Chain (56), verify the source and immutable links for 0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847, 0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847, and 0x5A60b6f8e480e5c2de28D8BAeAA2C54565632685. Read live availability, ownership, runPrice(N), nextRunYield(id) and remaining rewards. Preview mine(uint256) at 0x02bf66bEC0307d539c0B440Ac7a1ef7Ad7fB9847 with id and value=runPrice(N), gasLimit=200000 + 25000 * distinctMinerCount. Present target, calldata, BNB value, token output conditions and gas. Execute only after approval if that exact preview still passes and there are no approval changes.

## Unsupported calls and failures
Do not transfer plain BNB. Collection receive() reverts `UseMineInstead()`; mining receive() reverts `UseMineInstead()`. Unknown selectors revert. Fee below one use reverts `RunFeeShort(required,sent)`; no available daily uses: `DailyRunLimit(id)`; processed unowned ID: `NotYourMiner(id)`; exhausted rewards: `OreExhausted()`. Invalid/empty/oversized batches, time bounds, failed BENEFICIARY transfer or failed refund revert atomically.

## Integration files
`agent.json` has structured rules; `selectors.json` and the ABI files are extracted from the current compiled artifacts. Re-extract them after any source change, and repeat affected verification. The site uses the EIP-1193 request/events interface: https://eips.ethereum.org/EIPS/eip-1193 .
