{"workflow":null,"planning":null,"id":"09d157d4-92ff-4035-859e-0187f4cc6d02","state":"completed","template":"shape:chain","objective":"Token name: Work\nToken symbol: WORK\nWrite these files EXACTLY as given (tested; formatting only, never change logic; launch.json must keep its notes string). foundry.toml: solc 0.8.26, evm_version cancun, optimizer true, optimizer_runs 200, via_ir true, bytecode_hash \"none\"; vendor Uniswap v4-core v4.0.0 at lib/v4-core and OpenZeppelin v5 at lib/openzeppelin-contracts, remappings v4-core/=lib/v4-core/ and @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/. Hook deploys at a CREATE2 address with flags 0x2044. Fees: snipe guard 50% sliding to 2% over 15 min after pool init, then 2%, to the treasury 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 via permissionless sweep. Admin: that address may only set the standing fee within 0-10%. Tests against the real PoolManager.\nlaunch.json:\n{\"kind\":\"univ4_hook\",\"hook\":{\"contract\":\"WorkLaunchHook3\",\"constructorArgs\":[\"$poolManager\",\"$token\"],\"permissions\":[\"beforeInitialize\",\"afterSwap\",\"afterSwapReturnDelta\"]},\"token\":{\"contract\":\"Work\",\"name\":\"Work\",\"symbol\":\"WORK\",\"decimals\":18},\"pool\":{\"pairedCurrency\":\"0x5f7bb59365ce557c26dbcaa4ee9d39a4b95b7127\",\"fee\":12500,\"tickSpacing\":60,\"initialPrice\":\"79228162514264337593543950336\"},\"notes\":\"Work (WORK) is a plain fixed-supply OpenZeppelin ERC-20: 1,000,000,000 with 18 decimals minted once to msg.sender, no admin. WorkLaunchHook(PoolManager, token) accepts exactly one IMD/WORK pool (fee 12500, tickSpacing 60) and records openedAt at initialize. Every swap pays a hook fee equal to the same share of what the trader pays or receives in both swap modes (exact-out fees are grossed up): 50% at openedAt sliding linearly to the standing fee over 900 s, then the standing fee (2%; 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 may set 0-10%). Fees accrue as PoolManager claims and go to 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 via a permissionless sweep() with independent IMD and WORK legs and no native-ETH leg. Flags 0x2044. No other admin, no upgrades.\"}\nsrc/Work.sol:\npragma solidity 0.8.26;import{ERC20}from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";contract Work is ERC20{constructor()ERC20(\"Work\",\"WORK\"){_mint(msg.sender,1_000_000_000 ether);}}\nsrc/WorkLaunchHook3.sol:\n// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;import{IPoolManager}from \"v4-core/src/interfaces/IPoolManager.sol\";import{IHooks}from \"v4-core/src/interfaces/IHooks.sol\";import{Hooks}from \"v4-core/src/libraries/Hooks.sol\";import{PoolKey}from \"v4-core/src/types/PoolKey.sol\";import{Currency}from \"v4-core/src/types/Currency.sol\";import{BalanceDelta}from \"v4-core/src/types/BalanceDelta.sol\";contract WorkLaunchHook3{address public constant IMD=0x5F7Bb59365ce557C26dbcAa4EE9d39A4b95B7127;address public constant B=0xc9EAFE33A510a3a3d95A94c4f85AdaF6a3EA12a0;IPoolManager public immutable poolManager;address public immutable token;uint256 public openedAt;uint256 public standingFee=200;event StandingFee(uint256 fee);event SweepFailed(address token);constructor(IPoolManager m,address t){require(t!=IMD&&t!=address(0));poolManager=m;token=t;Hooks.validateHookPermissions(IHooks(address(this)),getHookPermissions());}function getHookPermissions()public pure returns(Hooks.Permissions memory p){p.beforeInitialize=true;p.afterSwap=true;p.afterSwapReturnDelta=true;}modifier onlyPM(){require(msg.sender==address(poolManager));_;}function beforeInitialize(address,PoolKey calldata k,uint160)external onlyPM returns(bytes4){address a=Currency.unwrap(k.currency0);address b=Currency.unwrap(k.currency1);require(openedAt==0&&((a==IMD&&b==token)||(a==token&&b==IMD))&&k.fee==12500&&k.tickSpacing==60&&address(k.hooks)==address(this));openedAt=block.timestamp;return IHooks.beforeInitialize.selector;}function feeNow()public view returns(uint256){uint256 t=openedAt;uint256 s=standingFee;if(t==0||block.timestamp<=t)return 5000;t=block.timestamp-t;return t<900?s+(5000-s)*(900-t)/900:s;}function setStandingFee(uint256 f)external{require(msg.sender==B&&f<=1000);standingFee=f;emit StandingFee(f);}function afterSwap(address,PoolKey calldata k,IPoolManager.SwapParams calldata p,BalanceDelta d,bytes calldata)external onlyPM returns(bytes4,int128){bool u1=(p.amountSpecified<0)==p.zeroForOne;int128 a=u1?d.amount1():d.amount0();uint256 r=feeNow();uint256 f=a<0?uint256(int256(-a))*r/(10000-r):uint256(int256(a))*r/10000;if(f>0)poolManager.mint(address(this),(u1?k.currency1:k.currency0).toId(),f);return(IHooks.afterSwap.selector,int128(int256(f)));}function sweep()external{for(uint256 i;i<2;++i){address x=i==0?IMD:token;try poolManager.unlock(abi.encode(x)){}catch{emit SweepFailed(x);}uint256 v=Currency.wrap(x).balanceOfSelf();if(v>0){(bool ok,bytes memory r)=x.call(abi.encodeWithSignature(\"transfer(address,uint256)\",B,v));if(!ok||(r.length>0&&!abi.decode(r,(bool))))emit SweepFailed(x);}}}function unlockCallback(bytes calldata d)external onlyPM returns(bytes memory){Currency x=Currency.wrap(abi.decode(d,(address)));uint256 v=poolManager.balanceOf(address(this),x.toId());if(v>0){poolManager.burn(address(this),x.toId(),v);poolManager.take(x,B,v);}return \"\";}}\n","blockedReason":null,"createdAt":"2026-10-08T06:05:57.456Z","updatedAt":"2026-10-08T06:43:10.270Z","paidBy":"0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0","parentJobId":null,"project":{"id":"09d157d4-92ff-4035-859e-0187f4cc6d02","head":"09d157d4-92ff-4035-859e-0187f4cc6d02","running":null,"versions":[{"jobId":"09d157d4-92ff-4035-859e-0187f4cc6d02","workflowId":null,"objective":"Token name: Work\nToken symbol: WORK\nWrite these files EXACTLY as given (tested; formatting only, never change logic; launch.json must keep its notes string). foundry.toml: solc 0.8.26, evm_version cancun, optimizer true, optimizer_runs 200, via_ir true, bytecode_hash \"none\"; vendor Uniswap v4-core v4.0.0 at lib/v4-core and OpenZeppelin v5 at lib/openzeppelin-contracts, remappings v4-core/=lib/v4-core/ and @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/. Hook deploys at a CREATE2 address with flags 0x2044. Fees: snipe guard 50% sliding to 2% over 15 min after pool init, then 2%, to the treasury 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 via permissionless sweep. Admin: that address may only set the standing fee within 0-10%. Tests against the real PoolManager.\nlaunch.json:\n{\"kind\":\"univ4_hook\",\"hook\":{\"contract\":\"WorkLaunchHook3\",\"constructorArgs\":[\"$poolManager\",\"$token\"],\"permissions\":[\"beforeInitialize\",\"afterSwap\",\"afterSwapReturnDelta\"]},\"token\":{\"contract\":\"Work\",\"name\":\"Work\",\"symbol\":\"WORK\",\"decimals\":18},\"pool\":{\"pairedCurrency\":\"0x5f7bb59365ce557c26dbcaa4ee9d39a4b95b7127\",\"fee\":12500,\"tickSpacing\":60,\"initialPrice\":\"79228162514264337593543950336\"},\"notes\":\"Work (WORK) is a plain fixed-supply OpenZeppelin ERC-20: 1,000,000,000 with 18 decimals minted once to msg.sender, no admin. WorkLaunchHook(PoolManager, token) accepts exactly one IMD/WORK pool (fee 12500, tickSpacing 60) and records openedAt at initialize. Every swap pays a hook fee equal to the same share of what the trader pays or receives in both swap modes (exact-out fees are grossed up): 50% at openedAt sliding linearly to the standing fee over 900 s, then the standing fee (2%; 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 may set 0-10%). Fees accrue as PoolManager claims and go to 0xc9eafe33a510a3a3d95a94c4f85adaf6a3ea12a0 via a permissionless sweep() with independent IMD and WORK legs and no native-ETH leg. Flags 0x2044. No other admin, no upgrades.\"}\nsrc/Work.sol:\npragma solidity 0.8.26;import{ERC20}from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";contract Work is ERC20{constructor()ERC20(\"Work\",\"WORK\"){_mint(msg.sender,1_000_000_000 ether);}}\nsrc/WorkLaunchHook3.sol:\n// SPDX-License-Identifier: MIT\npragma solidity 0.8.26;import{IPoolManager}from \"v4-core/src/interfaces/IPoolManager.sol\";import{IHooks}from \"v4-core/src/interfaces/IHooks.sol\";import{Hooks}from \"v4-core/src/libraries/Hooks.sol\";import{PoolKey}from \"v4-core/src/types/PoolKey.sol\";import{Currency}from \"v4-core/src/types/Currency.sol\";import{BalanceDelta}from \"v4-core/src/types/BalanceDelta.sol\";contract WorkLaunchHook3{address public constant IMD=0x5F7Bb59365ce557C26dbcAa4EE9d39A4b95B7127;address public constant B=0xc9EAFE33A510a3a3d95A94c4f85AdaF6a3EA12a0;IPoolManager public immutable poolManager;address public immutable token;uint256 public openedAt;uint256 public standingFee=200;event StandingFee(uint256 fee);event SweepFailed(address token);constructor(IPoolManager m,address t){require(t!=IMD&&t!=address(0));poolManager=m;token=t;Hooks.validateHookPermissions(IHooks(address(this)),getHookPermissions());}function getHookPermissions()public pure returns(Hooks.Permissions memory p){p.beforeInitialize=true;p.afterSwap=true;p.afterSwapReturnDelta=true;}modifier onlyPM(){require(msg.sender==address(poolManager));_;}function beforeInitialize(address,PoolKey calldata k,uint160)external onlyPM returns(bytes4){address a=Currency.unwrap(k.currency0);address b=Currency.unwrap(k.currency1);require(openedAt==0&&((a==IMD&&b==token)||(a==token&&b==IMD))&&k.fee==12500&&k.tickSpacing==60&&address(k.hooks)==address(this));openedAt=block.timestamp;return IHooks.beforeInitialize.selector;}function feeNow()public view returns(uint256){uint256 t=openedAt;uint256 s=standingFee;if(t==0||block.timestamp<=t)return 5000;t=block.timestamp-t;return t<900?s+(5000-s)*(900-t)/900:s;}function setStandingFee(uint256 f)external{require(msg.sender==B&&f<=1000);standingFee=f;emit StandingFee(f);}function afterSwap(address,PoolKey calldata k,IPoolManager.SwapParams calldata p,BalanceDelta d,bytes calldata)external onlyPM returns(bytes4,int128){bool u1=(p.amountSpecified<0)==p.zeroForOne;int128 a=u1?d.amount1():d.amount0();uint256 r=feeNow();uint256 f=a<0?uint256(int256(-a))*r/(10000-r):uint256(int256(a))*r/10000;if(f>0)poolManager.mint(address(this),(u1?k.currency1:k.currency0).toId(),f);return(IHooks.afterSwap.selector,int128(int256(f)));}function sweep()external{for(uint256 i;i<2;++i){address x=i==0?IMD:token;try poolManager.unlock(abi.encode(x)){}catch{emit SweepFailed(x);}uint256 v=Currency.wrap(x).balanceOfSelf();if(v>0){(bool ok,bytes memory r)=x.call(abi.encodeWithSignature(\"transfer(address,uint256)\",B,v));if(!ok||(r.length>0&&!abi.decode(r,(bool))))emit SweepFailed(x);}}}function unlockCallback(bytes calldata d)external onlyPM returns(bytes memory){Currency x=Currency.wrap(abi.decode(d,(address)));uint256 v=poolManager.balanceOf(address(this),x.toId());if(v>0){poolManager.burn(address(this),x.toId(),v);poolManager.take(x,B,v);}return \"\";}}\n","baseCommit":"0243d7da4a4337ae8b16bcdf15bb4ead736fd68f","state":"completed","createdAt":"2026-10-08T06:05:57.456Z"}]},"deliver":true,"host":false,"site":null,"launch":{"requested":true,"kind":"univ4_hook","id":"cce19797-a905-488f-9dd3-ee558d4ccb50","status":"live","chainId":4663},"oracleRequestId":null,"delivery":{"repoUrl":"https://github.com/identity-md-launches/launch-1015-src-work-sol-src-worklaunchhook3-sol","pullRequestUrl":"https://github.com/identity-md-launches/launch-1015-src-work-sol-src-worklaunchhook3-sol/pull/1","commit":"f67b812be1d993a88a80dff4904464bf1e4542b1","deliveredAt":"2026-10-08T06:43:45.489Z","media":null},"media":null,"nodes":[{"key":"audit_economics","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:31:39.425Z","verdict":null,"seat":{"tokenId":"22","agentId":"52391"},"live":null},{"key":"audit_flow","role":"review","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:30:33.381Z","verdict":null,"seat":{"tokenId":"1082","agentId":"50981"},"live":null},{"key":"audit_judge","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project","write_foundry_tests","manifest","audit_math","audit_permissions","audit_economics","audit_flow"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:43:10.270Z","verdict":null,"seat":{"tokenId":"125","agentId":"51154"},"live":null},{"key":"audit_math","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:28:35.227Z","verdict":null,"seat":{"tokenId":"967","agentId":"52396"},"live":null},{"key":"audit_permissions","role":"review","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:28:16.062Z","verdict":null,"seat":{"tokenId":"1731","agentId":"50955"},"live":null},{"key":"build_contract_project","role":"implement","state":"accepted","attempt":2,"revisions":0,"judgeRevisions":0,"dependsOn":[],"allowedPaths":[],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:21:08.253Z","verdict":{"status":"accepted","profile":"foundry","evaluation":"checks","rejectionCode":null,"detail":"all checks passed","verifierVersion":"0.1.0+ad90ce4c","verifiedTreeHash":"f55a83418e2041fce2d3b10638d423ca56863d06","at":"2026-10-08T06:21:08.252Z","failedChecks":[]},"seat":{"tokenId":"820","agentId":"52185"},"live":null},{"key":"manifest","role":"integrate","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":["launch.json"],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:25:05.423Z","verdict":{"status":"accepted","profile":"foundry","evaluation":"checks","rejectionCode":null,"detail":"all checks passed","verifierVersion":"0.1.0+ad90ce4c","verifiedTreeHash":"526ffbd45bca332949f11fb7f66951b449731c0a","at":"2026-10-08T06:25:05.729Z","failedChecks":[]},"seat":{"tokenId":"167","agentId":"51080"},"live":null},{"key":"write_foundry_tests","role":"tests","state":"accepted","attempt":1,"revisions":0,"judgeRevisions":0,"dependsOn":["build_contract_project"],"allowedPaths":["test","test/**"],"failureReason":null,"dispatchNote":null,"dispatchNoteAt":null,"updatedAt":"2026-10-08T06:34:08.835Z","verdict":{"status":"accepted","profile":"foundry","evaluation":"checks","rejectionCode":null,"detail":"all checks passed","verifierVersion":"0.1.0+ad90ce4c","verifiedTreeHash":"80a1da52533d752907ce83bc852a419421ac3416","at":"2026-10-08T06:34:08.844Z","failedChecks":[]},"seat":{"tokenId":"211","agentId":"51060"},"live":null}],"reviews":[{"status":"queued","chainId":1,"txHash":null,"blockNumber":null,"sentAt":null,"entries":[{"nodeKey":"audit_economics","agentId":"52391","value":1,"role":"review:submission"},{"nodeKey":"audit_flow","agentId":"50981","value":1,"role":"review:submission"},{"nodeKey":"audit_judge","agentId":"51154","value":1,"role":"review:submission"},{"nodeKey":"audit_math","agentId":"52396","value":1,"role":"review:submission"},{"nodeKey":"audit_permissions","agentId":"50955","value":1,"role":"review:submission"},{"nodeKey":"build_contract_project","agentId":"52185","value":1,"role":"verification:checks"},{"nodeKey":"manifest","agentId":"51080","value":1,"role":"verification:checks"},{"nodeKey":"write_foundry_tests","agentId":"51060","value":1,"role":"verification:checks"}]}]}