{
  "component": "site",
  "summary": "Implemented the responsive static Sepolia staking website in site/** as plain HTML/CSS/JS with no build step and no CDN/runtime library dependency. ABI calldata is built by hand in site/lib.js (pure logic, no DOM) with function selectors precomputed offline and cross-checked against well-known public 4-byte signatures; site/app.js wires this to window.ethereum for wallet connect, Sepolia enforcement, deployment validation, faucet, approve-then-stake, and withdrawal. site/deployment.json ships as the required not-deployed placeholder and is the only address source; actions stay disabled until it validates and on-chain checks pass.",
  "files": [
    "site/index.html",
    "site/styles.css",
    "site/lib.js",
    "site/app.js",
    "site/deployment.json",
    "site/deploy.html",
    "site/deploy.js",
    "site/README.md",
    "site/tests/lib.test.js",
    "site/tests/app.test.js",
    "site/tests/run.js"
  ],
  "serveCommand": "cd site && python3 -m http.server 8080",
  "tests": [
    {
      "command": "node site/tests/lib.test.js",
      "expected": "all assertions pass (exact decimal parse/format, deployment validation, address validation, ABI encode/decode, selector table)",
      "actual": "22 passed, 0 failed",
      "pass": true
    },
    {
      "command": "node site/tests/app.test.js",
      "expected": "all assertions pass for wallet/chain/deployment/transaction scenarios run against a hand-built DOM + window.ethereum mock (no jsdom)",
      "actual": "15 passed, 0 failed: absent wallet, null deployment addresses, malformed deployment.json, deployment.json fetch failure, wrong chain, valid deployment + chain enables actions, staking contract not bound to token, address with no contract code, accountsChanged to empty, accountsChanged to new account, insufficient balance blocks stake pre-send, insufficient allowance triggers approve-then-stake, user-rejected tx (code 4001), reverted tx, confirmed withdraw refreshes balances",
      "pass": true
    },
    {
      "command": "node site/tests/run.js",
      "expected": "both test files pass, combined runner exits 0",
      "actual": "lib.test.js: 22 passed, 0 failed; app.test.js: 15 passed, 0 failed; exit code 0",
      "pass": true
    },
    {
      "command": "cd site && python3 -m http.server 8099 (background) && curl -s http://localhost:8099/index.html and /deployment.json",
      "expected": "both files serve with HTTP 200 and deployment.json is the not-deployed placeholder",
      "actual": "index.html: 200, deployment.json: 200, body {\"chainId\":11155111,\"token\":null,\"staking\":null}",
      "pass": true
    }
  ],
  "interfaceUsed": {
    "chainId": 11155111,
    "chainIdHex": "0xaa36a7",
    "token": { "name": "test", "symbol": "test", "decimals": 18, "methods": ["mint(uint256)", "balanceOf(address)", "approve(address,uint256)", "allowance(address,address)", "decimals()"] },
    "staking": { "constructorArg": "address token", "methods": ["stake(uint256)", "withdraw(uint256)", "token()", "totalStaked()", "stakedOf(address)", "pointsOf(address)"] },
    "pointsRule": "1 point per second split by active stake share; empty periods earn nothing; withdrawals preserve already-earned points; pointsOf returns 1e18 units per point",
    "selectorDerivation": "Selectors precomputed offline with a self-written pure-JS keccak-256 (Keccak-f[1600], pad10*1, not NIST SHA3) validated against the known value keccak256('')=c5d24601...; resulting selectors for balanceOf/approve/transfer/mint/stake/withdraw matched well-known public values exactly, giving confidence in totalStaked()/stakedOf(address)/pointsOf(address)/token() as well. Hardcoded as constants in site/lib.js; no hashing code or library ships at runtime."
  },
  "dependencySources": "None. No runtime library is bundled; app.js talks to window.ethereum via raw JSON-RPC (eth_call, eth_sendTransaction, eth_getCode, eth_getTransactionReceipt, eth_chainId, wallet_switchEthereumChain/wallet_addEthereumChain) and ABI encoding/decoding is hand-rolled in site/lib.js. No CDN script tags. Tests use only Node's built-in assert/vm/child_process modules.",
  "blockers": null,
  "deploymentStatus": "not_deployed",
  "publishedUrl": null,
  "notes": "token/staking deployment addresses in site/deployment.json are null as required (shared deployment item not yet landed). The shipped page shows 'Not deployed yet' and disables every contract action by default; no balances, addresses, or deployment success are invented. All invented/mocked wallet and chain data lives only inside site/tests/*.test.js and is clearly scoped there. deploy.html/deploy.js are left as inert placeholders for a later assembly wave per the brief. Only site/** was created or modified; no other repository paths were touched."
}
