{
  "sources": [
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/src/FiveWords.sol",
      "quote": "    constructor(IIntake intake_, IERC20 imd_, bytes32 action_) ERC721(\"fivewords\", \"FIVE\") {\n        if (address(intake_) == address(0) || address(imd_) == address(0)) revert ZeroAddress();\n        if (action_ == bytes32(0)) revert ZeroAction();\n        intake = intake_;\n        imd = imd_;\n        action = action_;\n        _images[1].opensAt = uint40(block.timestamp);\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/src/FiveWords.sol",
      "quote": "        hasWord[image][msg.sender] = true;\n        img.words[slot - 1] = word;\n        img.wordCount = uint8(slot);\n        if (last) {\n            // Exactly the price leaves; anything collected above it stays for the next image.\n            pot = held + due - price;\n            imagesOrdered = image;\n            img.orderedAt = uint40(block.timestamp);\n            if (image < IMAGES) _images[image + 1].opensAt = uint40(block.timestamp + ROUND_INTERVAL);\n        } else {"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/launch.json",
      "quote": "      \"contract\": \"FiveWords\",\n      \"constructorArgs\": [\n        \"0xa43e6F75ee006411F79Ac1C84120606C2330DE82\",\n        \"0xD34a99Bc0f67aE1bbd63C660e6d0b0dd03E263B7\",\n        \"0x6a6f622e6f70656e406a6f622d31000000000000000000000000000000000000\"\n      ]"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/src/FiveWords.sol",
      "quote": "    function _price() private view returns (uint256 price) {\n        price = intake.priceOf(action, address(imd));\n        if (price == 0) revert NotSold();\n    }\n\n    function _due(uint256 price, uint256 held, bool last) private pure returns (uint256) {\n        if (!last) return price / WORDS_PER_IMAGE;\n        return price > held ? price - held : 0;\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/src/FiveWords.sol",
      "quote": "    function _checkWord(string calldata word) private pure {\n        bytes calldata b = bytes(word);\n        uint256 length = b.length;\n        if (length == 0 || length > MAX_WORD_LENGTH) revert BadWord();\n        for (uint256 i; i < length; ++i) {\n            uint256 c = uint8(b[i]);\n            if (c < 0x61 || c > 0x7a) revert BadWord();\n        }\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/mocks/MockERC20.sol",
      "quote": "contract MockERC20 is ERC20 {\n    constructor() ERC20(\"Identity.md\", \"IMD\") {}\n\n    function mint(address to, uint256 amount) external {\n        _mint(to, amount);\n    }\n}"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/README.md",
      "quote": "- A fork test against mainnet state (run locally, not part of the delivered suite because the\n  verifier has no network): five words written, the live Intake took the order and exactly 0.5 IMD\n  and emitted its `Requested` event with this contract as payer and callback target; the live\n  writer's `complete` then reached `onResult` (status 0) and, separately, `onFailure` (status 2),"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWords.t.sol",
      "quote": "        nft.addWord(\"clouds\");\n        assertEq(imd.balanceOf(treasury), 0.3 ether);\n        assertEq(nft.pot(), 0.1 ether);\n        assertEq(imd.balanceOf(address(nft)), 0.1 ether);\n        assertEq(imd.allowance(address(nft), address(intake)), 0);\n\n        vm.warp(nft.imageInfo(2).opensAt);\n        _addWords(2, 1, 4);\n        assertEq(nft.pot(), 0.1 ether + 4 * 0.06 ether);\n        assertEq(nft.amountDue(), 0);"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsMetadata.t.sol",
      "quote": "    function test_thereIsNoOwnerAndNoWayToTakeIMDOut() public {\n        string[6] memory absent = [\n            \"owner()\",\n            \"transferOwnership(address)\",\n            \"renounceOwnership()\",\n            \"withdraw()\",\n            \"pause()\",\n            \"upgradeTo(address)\"\n        ];\n        for (uint256 i; i < absent.length; ++i) {"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsEdges.t.sol",
      "quote": "        vm.warp(orderedAt + 5 hours - 1);\n        vm.prank(user);\n        vm.expectRevert(abi.encodeWithSelector(FiveWords.NotOpenYet.selector, 2, orderedAt + 5 hours));\n        nft.addWord(\"early\");\n\n        vm.warp(orderedAt + 5 hours);\n        vm.prank(user);\n        assertEq(nft.addWord(\"early\"), 6);"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsCallbacks.t.sol",
      "quote": "        _retry(stranger, 1);\n        assertEq(nft.pot(), 2 * SHARE);\n        assertEq(imd.balanceOf(address(nft)), 2 * SHARE);\n        assertEq(nft.currentImage(), 2);\n        assertEq(nft.imageInfo(2).wordCount, 2);\n        assertEq(nft.imageInfo(2).opensAt, opensAt);\n        assertEq(nft.amountDue(), SHARE);"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsInvariant.t.sol",
      "quote": "    function invariant_supplyFollowsTheWords() public view {\n        uint256 ordered = nft.imagesOrdered();\n        uint256 supply = nft.totalSupply();\n        assertLe(ordered, 5);\n        assertLe(supply, 25);\n        assertEq(supply, handler.ghostMints());\n        uint256 open = ordered < 5 ? nft.imageInfo(ordered + 1).wordCount : 0;\n        assertLt(open, 5);\n        assertEq(supply, ordered * 5 + open);\n        assertEq(nft.currentImage(), ordered < 5 ? ordered + 1 : 0);\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsBase.sol",
      "quote": "    function setUp() public virtual {\n        vm.warp(1_800_000_000);\n        intake = new MockIntake(treasury, writer);\n        imd = new MockERC20();\n        intake.setPrice(ACTION, address(imd), PRICE);\n        nft = new FiveWords(IIntake(address(intake)), imd, ACTION);\n        deployedAt = block.timestamp;\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/FiveWordsWalletGas.t.sol",
      "quote": "    function test_theFifthWordMintsAndOrdersAtAWalletsGas() public {\n        _addWords(1, 1, 4);\n        address user = _user(1, 5);\n        _fund(user, nft.amountDue());"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/test/mocks/MockIntake.sol",
      "quote": "        requestId = mode == Mode.SameId ? lastRequestId : keccak256(abi.encode(block.chainid, address(this), ++nonce));\n        requests[requestId] = Request(msg.sender, callback.target, callback.selector, onFailure, true);\n        lastRequestId = requestId;\n        lastBody = body;\n        if (mode != Mode.NotPulling) require(IERC20(asset).transferFrom(msg.sender, treasury, amount), \"pull failed\");"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/README.md",
      "quote": "The suite passes with test isolation on and off and with the verifier's fuzz seed."
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol",
      "quote": "        address previousOwner = _update(to, tokenId, _msgSender());\n        if (previousOwner != from) {\n            revert ERC721IncorrectOwner(from, tokenId, previousOwner);\n        }\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol",
      "quote": "    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));\n    }"
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/foundry.toml",
      "quote": "solc = \"0.8.26\"\nevm_version = \"cancun\"\noptimizer = true\noptimizer_runs = 200\nbytecode_hash = \"none\""
    },
    {
      "url": "https://raw.githubusercontent.com/identity-md-launches/launch-3460-workflow-contract-stage-context/29c4264743a89978beb3af53dc78fcded3ffe804/docs/abi/FiveWords.json",
      "quote": "  },\n  {\n    \"type\": \"function\",\n    \"name\": \"addWord\",\n    \"inputs\": [\n      {\n        \"name\": \"word\","
    }
  ]
}
