{
  "schema_version": "1.0",
  "name": "Kilnfold",
  "display_name": "\u6298\u7089",
  "symbol": "KFLD",
  "reward_symbol": "KFLDO",
  "chain_id": 56,
  "deployment_state": "deployed",
  "contracts": {
    "engine": {
      "address": "0x9DD6f32DD0dF65fc0736cED0e7b7BFea30158b53",
      "standard": "ERC-721",
      "verification": "https://bscscan.com/address/0x9DD6f32DD0dF65fc0736cED0e7b7BFea30158b53#code",
      "contract_name": "Kilnfold",
      "token_name": "Kilnfold Rig",
      "symbol": "KFLD"
    },
    "reward": {
      "address": "0xA1090CC393585bf19bc604AB36a9316DF83172E4",
      "standard": "ERC-20",
      "authoritative_address_getter": "ORE()",
      "verification": "https://bscscan.com/address/0xA1090CC393585bf19bc604AB36a9316DF83172E4#code",
      "contract_name": "KilnfoldOre",
      "token_name": "Kilnfold Ore",
      "symbol": "KFLDO"
    }
  },
  "documents": {
    "site": "index.html",
    "guide": "skill.md",
    "discovery": "llms.txt",
    "abi": "api.json"
  },
  "security": {
    "engine_has_owner": false,
    "engine_owner_getter": "owner() returns address(0)",
    "admin": false,
    "pause": false,
    "upgrade": false,
    "withdrawal": false,
    "setters": false,
    "payee": "immutable PROCEEDS_TO()",
    "bnb_settlement": "Collected cost forwarded to PROCEEDS_TO and excess refunded to caller in the same transaction; failure reverts. No BNB retained by normal sale paths. Forced BNB is not a sale payment.",
    "unknown_selectors": "revert NoSuchEntry(bytes4)",
    "reward_minter": "Only immutable SOURCE(), equal to the engine contract; not a public buyer mint",
    "reward_cap": "ORE_LIMIT() on reward",
    "reward_owner": "owner() returns address(0)",
    "reward_transfer_tax": false,
    "reward_blacklist": false,
    "pool_created": false
  },
  "eligibility": {
    "getter": "rigIdKey(address) returns (uint256 key,bool ok)",
    "key": "uint256(keccak256(bytes(HOLDER_BOOK.handleOf(wallet)))) with HOLDER_BOOK.ownerOf(key) == wallet",
    "free_allowance": "One per Agent ID, only while open and supply/wallet room remain; not daily",
    "wallet_allowance": "Cumulative mintedBy(wallet), including free engines, capped by MAX_PER_WALLET(); transfers do not reset it",
    "gift_variants": "Recipient receives NFT; caller's identity and allowance are used"
  },
  "live_getters": [
    "mintStartsAt()",
    "mintEndsAt()",
    "rigSaleOpen()",
    "MAX_SUPPLY()",
    "totalMinted()",
    "MAX_PER_WALLET()",
    "mintedBy(address)",
    "rigRoomOf(address)",
    "freeAvailable(address)",
    "freeTaken(uint256)",
    "rigIdKey(address)",
    "HOLDER_BOOK()",
    "PROCEEDS_TO()",
    "ORE()",
    "RIG_LIFE()",
    "CLAIM_BATCH()",
    "TIER_A_PRICE()",
    "TIER_B_PRICE()",
    "TIER_C_PRICE()",
    "SEED_LAG()",
    "HISTORY_SPAN()",
    "HISTORY()",
    "SWEEP_STEPS()",
    "MAX_LIFE()"
  ],
  "time": {
    "opened_at": "2026-11-21 09:45:43 (UTC+8)",
    "authoritative": "mintStartsAt() and mintEndsAt(); mintStartsAt <= block.timestamp < mintEndsAt",
    "origin": "deployment timestamp plus constructor durations",
    "harvest_after_close": true
  },
  "reference_snapshot_not_live": {
    "max_engines": 10000,
    "max_cumulative_engines_per_wallet": 30,
    "paid_tiers": [
      {
        "wallet_positions": "2-10",
        "price_wei": "300000000000000",
        "getter": "TIER_A_PRICE()"
      },
      {
        "wallet_positions": "11-20",
        "price_wei": "600000000000000",
        "getter": "TIER_B_PRICE()"
      },
      {
        "wallet_positions": "21-30",
        "price_wei": "900000000000000",
        "getter": "TIER_C_PRICE()"
      }
    ],
    "free_contract_fee_wei": "0",
    "harvest_contract_fee_wei": "0",
    "reveal_contract_fee_wei": "0",
    "network_gas_separate": true,
    "claim_batch": 50,
    "ore_cap_base_units": "1000000000000000000000000000"
  },
  "entries": [
    {
      "signature": "mintFree(uint256)",
      "selector": "0xa4146733",
      "mode": "by_value",
      "argument": "Own validated Agent ID key, not a handle or sequential ID",
      "effect": "Same settlement as mint(); unused free first, paid extras by value, same-transaction change; paid purchases still possible after free is used"
    },
    {
      "signature": "mint()",
      "selector": "0x1249c58b",
      "mode": "by_value"
    },
    {
      "signature": "claim()",
      "selector": "0x4e71d92d",
      "mode": "by_value",
      "note": "Mint entry, not harvest"
    },
    {
      "signature": "freeMint()",
      "selector": "0x5b70ea9f",
      "mode": "by_value"
    },
    {
      "signature": "mintFree()",
      "selector": "0x8ab53447",
      "mode": "by_value"
    },
    {
      "signature": "claimFree()",
      "selector": "0xf366afc9",
      "mode": "by_value"
    },
    {
      "signature": "publicMint()",
      "selector": "0x26092b83",
      "mode": "by_value"
    },
    {
      "signature": "agentMint()",
      "selector": "0x1be3587a",
      "mode": "by_value"
    },
    {
      "signature": "mint(uint256)",
      "selector": "0xa0712d68",
      "mode": "by_value",
      "quantity_argument": "quote hint only, never settlement cap"
    },
    {
      "signature": "freeMint(uint256)",
      "selector": "0x7c928fe9",
      "mode": "by_value",
      "quantity_argument": "quote hint only"
    },
    {
      "signature": "mint(uint256,address)",
      "selector": "0x94bf804d",
      "mode": "by_value",
      "recipient": "argument, caller quota applies"
    },
    {
      "signature": "mint(address)",
      "selector": "0x6a627842",
      "mode": "by_value",
      "recipient": "argument, caller quota applies"
    },
    {
      "signature": "receive()",
      "calldata": "0x",
      "mode": "by_value",
      "note": "Contract execution gas required"
    }
  ],
  "settlement": {
    "rule": "Unused free engine first, then maximum whole paid engines covered by value across the caller's ascending tier positions, within cumulative wallet and supply caps. Quantity arguments do not constrain output.",
    "quantity_quote": "rigsCost(address,uint256) returns cost; validates quantity/room but not sale-open or valid identity",
    "value_quote": "rigsForValue(address,uint256) returns (rigs,cost,refund)",
    "zero_quote_result": "Does NOT mean a successful refundable transaction; real closed/ineligible/exhausted/underpaid calls revert",
    "refund_recipient": "msg.sender, same transaction",
    "no_output_slippage_guard": true,
    "errors": [
      "IdentityMissing()",
      "WrongAgentId(uint256,uint256)",
      "OutsideWindow(uint256,uint256)",
      "AllRigsTaken(uint256)",
      "WalletFull(uint256)",
      "FreeUsed(uint256)",
      "PaymentShort(uint256,uint256)",
      "ProceedsRejected()",
      "RigChangeFailed()",
      "NoSuchEntry(bytes4)"
    ]
  },
  "examples_reference_values": [
    {
      "state": "Fresh Agent ID/wallet, open, ample room",
      "signature": "mint(uint256)",
      "quantity": "1",
      "value_wei": "600000000000000",
      "engines": 3,
      "refund_wei": "0"
    },
    {
      "state": "Free used, one previously minted, open, ample room",
      "signature": "mint(uint256)",
      "quantity": "5",
      "value_wei": "900000000000000",
      "engines": 3,
      "refund_wei": "0"
    },
    {
      "state": "Free used, tier A, room remains",
      "value_wei": "300000000000001",
      "engines": 1,
      "refund_wei": "1"
    },
    {
      "state": "Free used, tier A, room remains",
      "value_wei": "299999999999999",
      "revert": "PaymentShort"
    },
    {
      "state": "Fresh eligible free allowance",
      "signature": "mintFree(uint256)",
      "value_wei": "600000000000000",
      "engines": 3,
      "refund_wei": "0"
    }
  ],
  "reward": {
    "asset": "Own ERC-20 Ore (KFLDO), not BNB",
    "decimals": 18,
    "accrual": "ratePerDay(grade) * elapsed seconds / 86400, rounded down; from mint until bornAt+RIG_LIFE",
    "getters": [
      "rigInfo(uint256)",
      "oreDue(uint256)",
      "ratePerDay(uint8)",
      "ownerOf(uint256)"
    ],
    "grades_source_probabilities": [
      {
        "name": "Basic",
        "grade": 1,
        "probability": "65%",
        "reference_tokens_per_day": 100
      },
      {
        "name": "Boosted",
        "grade": 2,
        "probability": "25%",
        "reference_tokens_per_day": 220
      },
      {
        "name": "Turbo",
        "grade": 3,
        "probability": "9%",
        "reference_tokens_per_day": 500
      },
      {
        "name": "Apex",
        "grade": 4,
        "probability": "1%",
        "reference_tokens_per_day": 1500
      }
    ],
    "sealed_grade": 0,
    "randomness": "Hash of mint block+SEED_LAG() (reviewed +2), readable starting +3; block producer may influence slightly",
    "history": "BLOCKHASH 256 blocks, optional EIP-2935 HISTORY up to HISTORY_SPAN() (reviewed 8191); absent history after native window or expired history gives Basic. Not-yet-readable hashes stay sealed.",
    "unclaimed_follows_nft": true,
    "harvest": [
      {
        "signature": "claim(uint256)",
        "selector": "0x379607f5",
        "value_wei": "0",
        "note": "Not a mint entry"
      },
      {
        "signature": "claim(uint256[])",
        "selector": "0x6ba4c138",
        "value_wei": "0",
        "batch": "1..CLAIM_BATCH(), distinct owned IDs"
      }
    ],
    "grading": {
      "signature": "gradeRigs(uint256[])",
      "selector": "0x3d2253a3",
      "value_wei": "0",
      "permissionless": true,
      "batch_max_getter": "CLAIM_BATCH()"
    },
    "claim_errors": [
      "NotYourRig(uint256)",
      "NothingToClaim()",
      "TooManyIds(uint256)",
      "ClaimTakesNoValue()"
    ],
    "bnb_valuation": null,
    "returns_promised": false,
    "pool_created": false,
    "expired_seed": {
      "grade": 1,
      "name": "Basic",
      "reference_tokens_per_day": 100,
      "meaning": "Fallback after expired hash window or absent history contract after native BLOCKHASH window. It is not the timely-draw mean."
    },
    "harvest_value": "0; nonzero value explicitly reverts ClaimTakesNoValue()",
    "token_decimals_getter": "decimals() on the authoritative ORE() token; used to format all rate and pending base units",
    "token_getters": [
      "ORE_LIMIT()",
      "SOURCE()",
      "owner()",
      "name()",
      "symbol()",
      "decimals()",
      "totalSupply()",
      "balanceOf(address)"
    ]
  },
  "gas_limit": {
    "paid_or_mixed_mint": "260000 + 55000 * actualEngines",
    "harvest": "150000 + 14000 * numberOfIds",
    "grading": "estimate; UI provisional floor 150000 + 30000 * numberOfIds is not separately measured",
    "final": "max(recommendation, ceil(eth_estimateGas * 1.2)); simulate exact from/data/value first",
    "worst_mint_sweep_separately_measured": false,
    "value_zero_entry": "300000"
  },
  "workflow": [
    "Verify actual chain/code/source and both addresses",
    "Read eligibility/window/room and rigsCost",
    "Inspect rigsForValue output, cost and refund",
    "eth_call exact transaction",
    "eth_estimateGas and review full fields",
    "Recheck account/chain/quote and owner authorization",
    "Submit only reviewed transaction; no approvals or message signing",
    "Verify receipt status 1 and refresh balances/ownership"
  ],
  "limitations": [
    "quote is not a reservation; settlement can change before mining",
    "No guaranteed Ore market or BNB redemption value"
  ]
}
