---
name: web3league-mining
description: |
  Use when the user wants to mine / claim Web3League tokens with their Binance Agentic Wallet.
  Mining requires holding 5 or more Web3League NFTs. Accrual is tiered by cards held:
  5,000 tokens/hour at 5 cards, +5,000 per tier, up to 50,000/hour at 40 cards.
  Claimable at most once every 24 hours; the user pays gas only.
  Triggers: web3league mining, mine web3league, claim mined tokens, w3l mining.
metadata:
  version: '0.1.0-draft'
  requires:
    bins: [baw]
---

# Web3League mining skill (DRAFT — contract addresses filled in after testnet deploy)

Web3League is on **BNB Smart Chain (chainId 56)**. Holders of **5 or more Web3League NFTs**
mine the Web3League token at a **tiered rate** by cards held. Mined tokens accrue in the mining
contract and are **claimed at most once every 24 hours** per wallet. The claim sends **0 BNB**
(the user pays network gas only) and needs **no token approvals**.

| | |
|---|---|
| NFT contract | `0xE29E55A6dc801Cac4Ef673B72B0d118eFacdf869` (filled at deploy) |
| Mining contract | `0x902FBa2954857162bd22F4462e22a711928305C2` (v2, tiered — filled at deploy) |
| Token contract | `0xF2974Cade3d01587E432c5B27C5dc326708AaB32` (filled at deploy) |
| Eligibility | Wallet holds **≥ 5** Web3League NFTs (checked on-chain) |
| Rate | Tiered: 5→5,000 · 8→10,000 · 10→15,000 · 13→20,000 · 16→25,000 · 20→30,000 · 25→35,000 · 30→40,000 · 35→45,000 · 40+→50,000 tokens/hour (MAX) |
| Rate lock | The rate is locked at `startMining()` and re-locked at every `claim()` to the tier of the balance held at that moment (`lockedRate(<wallet>)`). Buying cards raises the rate only from the next claim onward. `ratePerHour(<wallet>)` shows the tier the CURRENT balance would lock. |
| Claim cooldown | 1 claim per 24 hours per wallet |
| Pool | Mining runs until the distribution pool is empty, then stops forever |

## Rules for you, the agent

- **Only act when the user asks.** Never claim on your own initiative, and don't schedule repeat claims.
- **Get an explicit "yes" before signing.** Show the preview (to, value, function, claimable amount) and wait for a clear yes before `baw contract-call execute`.
- **Never ask for a private key or seed phrase.** `baw` signs inside the Agentic Wallet.
- Stop and tell the user if anything looks different: a value above 0 BNB, an approval request, a different contract than the ones above, or a chain other than BSC (56).

## 0. Preflight

```bash
npm i -g @binance/agentic-wallet   # once
baw auth signin --json             # follow the sign-in steps it prints
baw wallet address --json          # the wallet that will mine / claim
```

This skill has **two separate flows**. Run only the one the user asked for:

- **MINING flow** — "start mining", "check my mining", "am I mining?" → start/status.
- **CLAIM flow** — "claim my tokens" → the payout. Never merge the two: a status check is not a claim.

## MINING flow — start / status

### M1. Check eligibility (holdings)

Read `balanceOf(<wallet>)` on the NFT contract.

- If the balance is **less than 5**: tell the user they cannot mine yet, and exactly how many more
  cards they need. Reaching 5 costs 1 free mint + 4 paid mints (0.0005 BNB each) on the Web3League
  site, or buying NFTs on the market. **Stop here — do not start anything, do not attempt a claim.**
- If the balance is **5 or more**: continue.

### M2. Start mining (if not already running)

If the mining contract shows the wallet is not yet registered/started, preview and execute
`startMining()` — value 0, gas only — with the same preview → explicit yes → execute pattern as
the CLAIM flow below. Then report the user's claimable balance, their locked rate
(`lockedRate(<wallet>)`, tokens/hour) and the tier their current balance would lock next
(`ratePerHour(<wallet>)`), and when the first claim opens.

## CLAIM flow — claim the payout

### C1. Check claimable amount and cooldown

Read `claimable(<wallet>)` and `lastClaim(<wallet>)` on the mining contract.

- If less than 24 hours have passed since the last claim: tell the user when the next claim
  opens and how much has accrued so far. **Stop here — do not claim.**
- If the claimable amount is 0 (pool empty or accrual not started): tell the user plainly. Stop.
- Re-check `balanceOf(<wallet>)` ≥ 5 on the NFT contract; if it dropped below 5, the claim will
  fail — tell the user instead of sending it.

### C2. Preview the claim

```bash
baw contract-call preview --binanceChainId 56 \
  --from <agent wallet> --to 0x902FBa2954857162bd22F4462e22a711928305C2 \
  --value 0 --inputData <claim() calldata> --json
```

Tell the user in plain words: "Claim <amount> Web3League tokens to <wallet>. It sends 0 BNB;
you pay gas only. Shall I send it?" Then wait for a clear yes.

### C3. Execute (only after a clear yes)

```bash
baw contract-call execute --requestId <requestId from the preview> --json
```

If the Binance app asks for a confirmation, tell the user to approve it there.
Share the transaction hash and the BscScan link when it lands, and the wallet's new token balance.

## Errors

| Error | Meaning | What to tell the user |
|---|---|---|
| `NotEligible` | Wallet holds fewer than 5 NFTs | They need 5 NFTs to mine |
| `Cooldown` | Claimed within the last 24 hours | Wait until 24h have passed since the last claim |
| `PoolEmpty` | Distribution pool exhausted | Mining has ended permanently |
| `PausedBelowFive` | Holdings dropped below 5 during accrual | Accrual resumes when they hold 5+ again |

Not financial advice · DYOR.
