{
  "component": "contracts",
  "deploymentStatus": "not_deployed",
  "chainId": 11155111,
  "files": ["src/TestToken.sol","src/TestStaking.sol","test/contracts/Base.sol","test/contracts/TestToken.t.sol","test/contracts/TestStaking.t.sol","contract-artifacts/TestToken.json","contract-artifacts/TestStaking.json","contract-artifacts/generate.sh","docs/contracts.md"],
  "changed": "Added ownerless ERC-20 TestToken (name/symbol 'test', 18 decimals, 1,000,000e18 minted to the deploying msg.sender, public faucet mint(amount) with 0<amount<=1000e18 per call) and TestStaking (immutable token, stake/withdraw/token/totalStaked/stakedOf/pointsOf, 1 point/sec split pro rata, 1e36 accumulator, settle-before-change, reentrancy lock, checked transfers, Staked/Withdrawn events, no admin/fee/lock/upgrade). Self-contained tests (no forge-std), artifacts from real compilation, regeneration script, docs. No config files touched.",
  "buildCommands": ["forge test --offline --use 0.8.28 --match-path 'test/contracts/*'", "bash contract-artifacts/generate.sh"],
  "tests": [
    {"command": "forge test --offline --use 0.8.28 --match-path 'test/contracts/*'", "expected": "all tests pass", "actual": "43 tests passed, 0 failed, 0 skipped (17 TestToken, 26 TestStaking incl. 256-run fuzz)", "result": "pass"},
    {"command": "bash contract-artifacts/generate.sh (run twice)", "expected": "artifacts with abi, bytecode, deployedBytecode, metadata; identical hashes", "actual": "both runs produced identical sha256 for both artifacts; compiler 0.8.28+commit.7893614a; only forge lint notes (block-timestamp), no errors", "result": "pass"}
  ],
  "testCoverage": ["metadata/supply to deployer","faucet 1 wei, max, repeat, zero and above-limit reverts","transfer/approve/transferFrom/infinite allowance/insufficient balance & allowance","proportional accrual and changing shares","empty intervals before first stake and between stakes","partial and full withdrawal preserving points","restake and top-up","multiple events in the same timestamp","unauthorized/over-withdraw reverts","rounding never over-issues, bounded dust","100-year overflow check","false-returning token and reentrancy on stake/withdraw rejected","fuzz conservation/pro-rata"],
  "issuesFoundAndFixed": ["test_fullWithdrawPreservesPoints initially expected exactly 30e18 but got 30e18-1 (rounding down 30e54/7e18); assertion changed to <= and within 1 base unit, which is the documented rounding behavior"],
  "artifactPaths": ["contract-artifacts/TestToken.json","contract-artifacts/TestStaking.json"],
  "artifactHashes": {
    "src/TestToken.sol": "sha256:e241bcc04d7e6f8a90607d07985b15657a5f24c96d83f5a84ba535e8a0ad73e6",
    "src/TestStaking.sol": "sha256:fa86dc825cbdc73fc6a76c4b727956811872e1d8443946c85d75b7d034b312af",
    "contract-artifacts/TestToken.json": "sha256:6c72dc9bcf4d23735c103b1aee16cf6ef5d075209964cb004e680fae26822604",
    "contract-artifacts/TestStaking.json": "sha256:e4f4e7a1a895a4957ca4c7a5891fb3f80d1c551f2c0d6ad8e272c592d8415898"
  },
  "designDecisions": [
    "Faucet mint is a deliberate testnet choice: permissionless, per-call cap 1000e18, no cooldown; token has no value.",
    "Initial 1,000,000e18 supply goes to msg.sender of the constructor, i.e. the account that actually deploys; no address hard-coded.",
    "Points: global accPointsPerToken += dt*1e18*1e36/totalStaked; user points += stake*(acc-userSnapshot)/1e36. Using a per-user snapshot (not stake*acc debt) bounds products by elapsed*1e54, avoiding overflow.",
    "Rounding is down everywhere, so issued points never exceed 1 point/sec; pointsOf view equals settled value.",
    "State updated before token calls plus a nonReentrant lock; token call result checked (revert or false -> TransferFailed).",
    "Constructor requires token to have code; zero-amount stake/withdraw rejected; withdraw limited to caller's own stake.",
    "Exact pragma 0.8.28, Foundry default settings (optimizer off, evm prague) since no foundry.toml exists and config may not be changed; pass --use 0.8.28 on the command line."
  ],
  "blockers": [],
  "notes": "Repository has no foundry.toml; commands rely on Foundry defaults plus CLI flags. Committed on main as one commit (author set per-command, git config unchanged); build output (out/, cache/) removed and not committed."
}
