{"workflow":null,"planning":null,"id":"1199a044-1d25-4b47-ae2a-addf0b8ae2de","state":"blocked","template":"impl_tests_review","objective":"Token name: Work\nToken symbol: WORK\n\nRobinhood Chain 4663. Builders address B = 0xc9EAFE33A510a3a3d95A94c4f85AdaF6a3EA12a0 (EOA). Owner = requester wallet. Contracts: WorkHook (Uniswap v4 hook on the WORK/IMD pool) and WorkersNFT. IMD on this chain = 0x5f7bb59365ce557c26dbcaa4ee9d39a4b95b7127. All owner changes are bounded and emit events; every parameter has a view.\n\n1) WorkHook: takes its fee in the swap callbacks (beforeSwap/afterSwap) on every buy and sell, default 0.75% (2% total with the launch's 1.25%), owner may set 0 to 8.75% max. While the NFT mint runs, hook fees go 100% to B. After the mint ends (sold out or endMint): stakerShareBps (default 10000, owner may set 9000-10000, so B gets at most 10%) goes to WorkersNFT for stakers, the rest to B; if nothing is staked, all to B.\n\n2) WorkersNFT (ERC-721, max 3,333). Owner levers (UNICRED lesson): setCap(newCap) lowers the cap to any value >= minted, never raises; endMint() stops minting forever (cap = minted) and starts the post-mint phase; pause()/unpause() halts minting and WORK earning in an emergency; each pause auto-expires after 24 h, and a new pause needs at least 24 h unpaused since the last one ended.\n- Mint by proof of work: keccak256(abi.encode(DOMAIN, chainid, this, keccak256(abi.encode(anchorHash, prevWork)), msg.sender, nonce)) < target; anchorHash = blockhash at most 250 blocks old; one mint per block; retarget every 8 mints toward 10 s; target doubles after 300 s idle; 9 epochs of 370 (+3), min difficulty +1 bit per epoch; owner may move the floor +-2 bits.\n- Paid in IMD (transferFrom, permit if supported, no ETH): price per epoch [0.25,0.5,0.75,1.25,1.75,2.5,3.25,4,5] IMD, never above 5; owner may scale prices 0.5x-1x.\n- Token id = pool[hash % remaining] (swap-and-pop, no reveal, no reserved ids, no team mint).\n- Overclocked if the hash beats target by >= 4 extra bits: tokenURI = baseURI + \"oc/\" + id + \".json\", else baseURI + id + \".json\". Initial baseURI = ipfs://bafybeibmkvtnptsqztdvsm5sh3avormdnfyarbxpgdlcj6bmg37qchhqve/ (owner may update it).\n- Everyone mints on equal terms: no allowlist, no free mints, no difficulty discounts.\n\n3) Money (automatic, in IMD):\n- Each mint: 65% stakers, 25% buyback balance, 10% to B.\n- Marketplaces: activated (earning) workers stay in the holder's wallet and transfer/list normally (activation and unclaimed WORK move with the token); never block transfers of unstaked workers. Staked workers are held by the contract, so they cannot be listed while staked (no fake floor); unstaking returns them. Stake and unstake are real ERC-721 transfers that emit Transfer, so marketplaces update ownership on their own. Implement ERC-4906 (supportsInterface 0x49064906): emit BatchMetadataUpdate when baseURI changes and MetadataUpdate when a token's metadata changes.\n- Staking: escrow the NFT for 7/14/30 days = weight 1x/2x/4x, no early exit; stakers claim mint IMD and hook rewards pro-rata by weight; mint share with no stakers goes to buyback.\n- buyback(): anyone, max 100 IMD per call, once per 60 s, swaps IMD to WORK in the WORK/IMD pool and burns it.\n- WORK supply: 10% swarm, 70% pool, 20% to B (5% B's own, then B deposits 100M as the mining pool and 50M as the burn pool).\n\n4) After the mint ends:\n- activate(tokenId): one time, fee to B, default 0.15 IMD, owner may set 0-0.5 IMD; stays with the token on transfer.\n- Workers keep working passively (no hashing, no device online): activated, unburned workers earn WORK from the mining pool every second. 8 eras from mint end: era k (0..7) lasts 7*2^k days and emits 12.5M WORK, split equally among all activated workers (reward-per-worker accumulator, updated on activate, burn and claim). claimWork(tokenIds) pays the holder or staker; unclaimed WORK stays with the token on transfer. WORK scheduled while paused or while no worker is activated is never lost: carry it (emissionCarry) and release it to activated workers at the next unpaused update. After all eras end, releaseMiningRemainder() (owner, not while paused) sends what is left in the mining pool to B.\n- Burn: any holder may burn an unstaked worker for burnPool / workers minted (fixed at mint end, ~15,000 WORK); burned workers stop mining.\n\nSafety: sweep(token) to B for anything sent by mistake (incl. WETH, ETH) but never staker IMD, the buyback balance, the mining pool or the burn pool. ERC-2981 royalty 5% to B, max 10%. Not upgradeable. No minting outside proof of work, no owner path to user funds.\n\nBuild rules (a previous attempt failed deployment on these): no deployed contract may have linked libraries (forge linkReferences must be empty), so every library function is internal; ship foundry.toml with optimizer = true, via_ir = true, bytecode_hash = \"none\"; WorkersNFT and WorkHook runtime < 24,576 bytes; tests read time with vm.getBlockTimestamp()/vm.getBlockNumber() so they pass under via_ir. src/ contains only WorkersNFT.sol and WorkHook.sol; any test token lives in test/ (the launch token is IMD's, never deploy a second one). Deploy wiring: WorkersNFT takes the launch token address; WorkHook is deployed at the required flag address; the hook must be bound to WorkersNFT before pool initialization (e.g. WorkersNFT.bindHook() called by the hook in beforeInitialize, allowed only when tx.origin is the account that deployed WorkersNFT; the owner can also bind with setHook). Pool fee and tickSpacing must match the launch policy.\n\nTests: Foundry incl. fuzz on work checks, retargets, id picking, splits, staking escrow, hook split, activation, passive accrual per era, burn reward, sweep limits; then an adversarial security review.","blockedReason":"node manifest: runtime_error","createdAt":"2026-10-07T15:43:42.345Z","updatedAt":"2026-10-07T17:18:41.702Z","paidBy":"0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0","parentJobId":null,"project":{"id":"1199a044-1d25-4b47-ae2a-addf0b8ae2de","head":"1199a044-1d25-4b47-ae2a-addf0b8ae2de","running":null,"versions":[{"jobId":"1199a044-1d25-4b47-ae2a-addf0b8ae2de","workflowId":null,"objective":"Token name: Work\nToken symbol: WORK\n\nRobinhood Chain 4663. Builders address B = 0xc9EAFE33A510a3a3d95A94c4f85AdaF6a3EA12a0 (EOA). Owner = requester wallet. Contracts: WorkHook (Uniswap v4 hook on the WORK/IMD pool) and WorkersNFT. IMD on this chain = 0x5f7bb59365ce557c26dbcaa4ee9d39a4b95b7127. All owner changes are bounded and emit events; every parameter has a view.\n\n1) WorkHook: takes its fee in the swap callbacks (beforeSwap/afterSwap) on every buy and sell, default 0.75% (2% total with the launch's 1.25%), owner may set 0 to 8.75% max. While the NFT mint runs, hook fees go 100% to B. After the mint ends (sold out or endMint): stakerShareBps (default 10000, owner may set 9000-10000, so B gets at most 10%) goes to WorkersNFT for stakers, the rest to B; if nothing is staked, all to B.\n\n2) WorkersNFT (ERC-721, max 3,333). Owner levers (UNICRED lesson): setCap(newCap) lowers the cap to any value >= minted, never raises; endMint() stops minting forever (cap = minted) and starts the post-mint phase; pause()/unpause() halts minting and WORK earning in an emergency; each pause auto-expires after 24 h, and a new pause needs at least 24 h unpaused since the last one ended.\n- Mint by proof of work: keccak256(abi.encode(DOMAIN, chainid, this, keccak256(abi.encode(anchorHash, prevWork)), msg.sender, nonce)) < target; anchorHash = blockhash at most 250 blocks old; one mint per block; retarget every 8 mints toward 10 s; target doubles after 300 s idle; 9 epochs of 370 (+3), min difficulty +1 bit per epoch; owner may move the floor +-2 bits.\n- Paid in IMD (transferFrom, permit if supported, no ETH): price per epoch [0.25,0.5,0.75,1.25,1.75,2.5,3.25,4,5] IMD, never above 5; owner may scale prices 0.5x-1x.\n- Token id = pool[hash % remaining] (swap-and-pop, no reveal, no reserved ids, no team mint).\n- Overclocked if the hash beats target by >= 4 extra bits: tokenURI = baseURI + \"oc/\" + id + \".json\", else baseURI + id + \".json\". Initial baseURI = ipfs://bafybeibmkvtnptsqztdvsm5sh3avormdnfyarbxpgdlcj6bmg37qchhqve/ (owner may update it).\n- Everyone mints on equal terms: no allowlist, no free mints, no difficulty discounts.\n\n3) Money (automatic, in IMD):\n- Each mint: 65% stakers, 25% buyback balance, 10% to B.\n- Marketplaces: activated (earning) workers stay in the holder's wallet and transfer/list normally (activation and unclaimed WORK move with the token); never block transfers of unstaked workers. Staked workers are held by the contract, so they cannot be listed while staked (no fake floor); unstaking returns them. Stake and unstake are real ERC-721 transfers that emit Transfer, so marketplaces update ownership on their own. Implement ERC-4906 (supportsInterface 0x49064906): emit BatchMetadataUpdate when baseURI changes and MetadataUpdate when a token's metadata changes.\n- Staking: escrow the NFT for 7/14/30 days = weight 1x/2x/4x, no early exit; stakers claim mint IMD and hook rewards pro-rata by weight; mint share with no stakers goes to buyback.\n- buyback(): anyone, max 100 IMD per call, once per 60 s, swaps IMD to WORK in the WORK/IMD pool and burns it.\n- WORK supply: 10% swarm, 70% pool, 20% to B (5% B's own, then B deposits 100M as the mining pool and 50M as the burn pool).\n\n4) After the mint ends:\n- activate(tokenId): one time, fee to B, default 0.15 IMD, owner may set 0-0.5 IMD; stays with the token on transfer.\n- Workers keep working passively (no hashing, no device online): activated, unburned workers earn WORK from the mining pool every second. 8 eras from mint end: era k (0..7) lasts 7*2^k days and emits 12.5M WORK, split equally among all activated workers (reward-per-worker accumulator, updated on activate, burn and claim). claimWork(tokenIds) pays the holder or staker; unclaimed WORK stays with the token on transfer. WORK scheduled while paused or while no worker is activated is never lost: carry it (emissionCarry) and release it to activated workers at the next unpaused update. After all eras end, releaseMiningRemainder() (owner, not while paused) sends what is left in the mining pool to B.\n- Burn: any holder may burn an unstaked worker for burnPool / workers minted (fixed at mint end, ~15,000 WORK); burned workers stop mining.\n\nSafety: sweep(token) to B for anything sent by mistake (incl. WETH, ETH) but never staker IMD, the buyback balance, the mining pool or the burn pool. ERC-2981 royalty 5% to B, max 10%. Not upgradeable. No minting outside proof of work, no owner path to user funds.\n\nBuild rules (a previous attempt failed deployment on these): no deployed contract may have linked libraries (forge linkReferences must be empty), so every library function is internal; ship foundry.toml with optimizer = true, via_ir = true, bytecode_hash = \"none\"; WorkersNFT and WorkHook runtime < 24,576 bytes; tests read time with vm.getBlockTimestamp()/vm.getBlockNumber() so they pass under via_ir. src/ contains only WorkersNFT.sol and WorkHook.sol; any test token lives in test/ (the launch token is IMD's, never deploy a second one). Deploy wiring: WorkersNFT takes the launch token address; WorkHook is deployed at the required flag address; the hook must be bound to WorkersNFT before pool initialization (e.g. WorkersNFT.bindHook() called by the hook in beforeInitialize, allowed only when tx.origin is the account that deployed WorkersNFT; the owner can also bind with setHook). Pool fee and tickSpacing must match the launch policy.\n\nTests: Foundry incl. fuzz on work checks, retargets, id picking, splits, staking escrow, hook split, activation, passive accrual per era, burn reward, sweep limits; then an adversarial security review.","baseCommit":"0243d7da4a4337ae8b16bcdf15bb4ead736fd68f","state":"blocked","createdAt":"2026-10-07T15:43:42.345Z"}]},"deliver":true,"host":false,"site":null,"launch":{"requested":true,"kind":"univ4_hook","id":null,"status":null,"chainId":4663},"oracleRequestId":null,"delivery":null,"media":null,"nodes":[{"key":"impl","role":"implement","state":"accepted","attempt":1,"revisions":2,"judgeRevisions":0,"dependsOn":[],"allowedPaths":["src/WorkersNFT.sol","src/WorkHook.sol"],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T16:44:40.515Z","verdict":{"status":"accepted","profile":"foundry","evaluation":"checks","rejectionCode":null,"detail":"all checks passed","verifierVersion":"0.1.0+be003835","verifiedTreeHash":"1f4d3ff04a51338680f76592ce18dc3d467d7f08","at":"2026-10-07T16:08:01.746Z","failedChecks":[]},"seat":{"tokenId":"1010","agentId":"51436"},"live":null},{"key":"manifest","role":"integrate","state":"failed","attempt":3,"revisions":0,"judgeRevisions":0,"dependsOn":["impl","tests"],"allowedPaths":["launch.json"],"failureReason":"runtime_error","dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T17:18:41.702Z","verdict":{"status":"rejected","profile":"foundry","evaluation":"checks","rejectionCode":"analysis_failed","detail":"launch.json: WorkersNFT: expected 2 constructor arguments, got 0","verifierVersion":"0.1.0+be003835","verifiedTreeHash":"30b4aece13121bccea1e146e05c090524565ca8f","at":"2026-10-07T17:08:16.068Z","failedChecks":[]},"seat":null,"live":null},{"key":"review","role":"review","state":"waiting","attempt":0,"revisions":0,"judgeRevisions":0,"dependsOn":["impl","tests","manifest"],"allowedPaths":["src/WorkersNFT.sol","src/WorkHook.sol","test/WorkersNFT.t.sol","test/WorkHook.t.sol"],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-07T15:43:42.345Z","verdict":null,"seat":null,"live":null},{"key":"tests","role":"tests","state":"accepted","attempt":1,"revisions":2,"judgeRevisions":0,"dependsOn":["impl"],"allowedPaths":["test/WorkersNFT.t.sol","test/WorkHook.t.sol"],"failureReason":null,"dispatchNote":"tests findings unresolved after 2 revisions: no revision budget left for impl (2 revisions) — Missing Foundry configuration makes the default WorkersNFT artifact undeployable","dispatchNoteAt":"2026-10-07T16:53:26.557Z","updatedAt":"2026-10-07T16:53:26.557Z","verdict":{"status":"accepted","profile":"foundry","evaluation":"checks","rejectionCode":null,"detail":"all checks passed","verifierVersion":"0.1.0+be003835","verifiedTreeHash":"f9f54b49b61661ecde9982bc30046e8a7908ee2f","at":"2026-10-07T16:53:26.558Z","failedChecks":[]},"seat":{"tokenId":"1318","agentId":"51434"},"live":null}],"reviews":[{"status":"sent","chainId":1,"txHash":"0x12a519267e727cd81d1b17e6c29cadee9b0cd1c3946aff418f3dcf8803ef7456","blockNumber":26142696,"sentAt":"2026-10-07T19:47:40.240Z","entries":[{"nodeKey":"impl","agentId":"51436","value":1,"role":"verification:checks"},{"nodeKey":"manifest","agentId":"51091","value":0,"role":"verification:checks"},{"nodeKey":"manifest","agentId":"51006","value":0,"role":"verification:checks"},{"nodeKey":"tests","agentId":"51001","value":1,"role":"verification:checks"},{"nodeKey":"tests","agentId":"51434","value":1,"role":"verification:checks"},{"nodeKey":"tests","agentId":"51195","value":1,"role":"verification:checks"}]}]}