diff --git a/coverage.txt b/coverage.txt new file mode 100644 index 0000000..feaa01d --- /dev/null +++ b/coverage.txt @@ -0,0 +1,1223 @@ +Compiling 47 files with Solc 0.8.19 +Solc 0.8.19 finished in 3.78s +Compiler run successful! +Analysing contracts... +Running tests... + +Ran 7 tests for test/unit/RaffleTest.t.sol:RaffleTest +[PASS] testCheckUpKeepReturnsFalseIfNoBalance() (gas: 27602) +[PASS] testCheckUpKeepReturnsFalseIfRaffleNotOpen() (gas: 235838) +[PASS] testEnteringRaffleEmitsEvent() (gas: 69813) +[PASS] testNotAllowEntranceWhileRaffleIsCalculating() (gas: 236630) +[PASS] testRaffleInitializesInOpenState() (gas: 8023) +[PASS] testRaffleRecordsPlayersWhenTheyEnter() (gas: 69577) +[PASS] testRaffleRevertsWhenNotEnoughFunds() (gas: 11172) +Suite result: ok. 7 passed; 0 failed; 0 skipped; finished in 457.63ms (5.96ms CPU time) + +Ran 1 test suite in 458.21ms (457.63ms CPU time): 7 tests passed, 0 failed, 0 skipped (7 total tests) +Uncovered for script/DeployRaffle.s.sol: +- Function "run" (location: source ID 41, line 10, chars 330-385, hits: 0) +- Line (location: source ID 41, line 11, chars 362-378, hits: 0) +- Statement (location: source ID 41, line 11, chars 362-378, hits: 0) + +Uncovered for script/HelperConfig.s.sol: +- Function "getConfigByChainId" (location: source ID 42, line 38, chars 1104-1494, hits: 0) +- Branch (branch: 0, path: 0) (location: source ID 42, line 41, chars 1269-1324, hits: 0) +- Branch (branch: 0, path: 1) (location: source ID 42, line 41, chars 1211-1430, hits: 0) +- Line (location: source ID 42, line 42, chars 1283-1313, hits: 0) +- Statement (location: source ID 42, line 42, chars 1283-1313, hits: 0) +- Branch (branch: 1, path: 1) (location: source ID 42, line 43, chars 1330-1457, hits: 0) +- Line (location: source ID 42, line 46, chars 1440-1477, hits: 0) +- Statement (location: source ID 42, line 46, chars 1440-1477, hits: 0) +- Function "getOrCreateAnvilEthConfig" (location: source ID 42, line 67, chars 2252-3295, hits: 0) + +Uncovered for script/Interactions.s.sol: +- Function "createSubscriptionUsingConfig" (location: source ID 43, line 11, chars 455-768, hits: 0) +- Line (location: source ID 43, line 12, chars 540-586, hits: 0) +- Statement (location: source ID 43, line 12, chars 540-586, hits: 0) +- Statement (location: source ID 43, line 12, chars 568-586, hits: 0) +- Line (location: source ID 43, line 13, chars 596-660, hits: 0) +- Statement (location: source ID 43, line 13, chars 596-660, hits: 0) +- Line (location: source ID 43, line 14, chars 670-721, hits: 0) +- Statement (location: source ID 43, line 14, chars 670-721, hits: 0) +- Statement (location: source ID 43, line 14, chars 687-721, hits: 0) +- Line (location: source ID 43, line 15, chars 731-761, hits: 0) +- Statement (location: source ID 43, line 15, chars 731-761, hits: 0) +- Function "run" (location: source ID 43, line 36, chars 1322-1392, hits: 0) +- Line (location: source ID 43, line 37, chars 1354-1385, hits: 0) +- Statement (location: source ID 43, line 37, chars 1354-1385, hits: 0) +- Function "fundSubscriptionUsingConfig" (location: source ID 43, line 44, chars 1515-1901, hits: 0) +- Line (location: source ID 43, line 45, chars 1571-1617, hits: 0) +- Statement (location: source ID 43, line 45, chars 1571-1617, hits: 0) +- Statement (location: source ID 43, line 45, chars 1599-1617, hits: 0) +- Line (location: source ID 43, line 46, chars 1627-1691, hits: 0) +- Statement (location: source ID 43, line 46, chars 1627-1691, hits: 0) +- Line (location: source ID 43, line 47, chars 1701-1765, hits: 0) +- Statement (location: source ID 43, line 47, chars 1701-1765, hits: 0) +- Line (location: source ID 43, line 48, chars 1775-1824, hits: 0) +- Statement (location: source ID 43, line 48, chars 1775-1824, hits: 0) +- Line (location: source ID 43, line 50, chars 1835-1894, hits: 0) +- Statement (location: source ID 43, line 50, chars 1835-1894, hits: 0) +- Branch (branch: 0, path: 1) (location: source ID 43, line 62, chars 2226-2697, hits: 0) +- Line (location: source ID 43, line 70, chars 2503-2522, hits: 0) +- Statement (location: source ID 43, line 70, chars 2503-2522, hits: 0) +- Line (location: source ID 43, line 71, chars 2536-2691, hits: 0) +- Statement (location: source ID 43, line 71, chars 2536-2691, hits: 0) +- Line (location: source ID 43, line 76, chars 2705-2723, hits: 0) +- Statement (location: source ID 43, line 76, chars 2705-2723, hits: 0) +- Function "run" (location: source ID 43, line 80, chars 2746-2814, hits: 0) +- Line (location: source ID 43, line 81, chars 2778-2807, hits: 0) +- Statement (location: source ID 43, line 81, chars 2778-2807, hits: 0) +- Function "addConsumerUsingConfig" (location: source ID 43, line 86, chars 2855-3192, hits: 0) +- Line (location: source ID 43, line 87, chars 2934-2980, hits: 0) +- Statement (location: source ID 43, line 87, chars 2934-2980, hits: 0) +- Statement (location: source ID 43, line 87, chars 2962-2980, hits: 0) +- Line (location: source ID 43, line 88, chars 2990-3054, hits: 0) +- Statement (location: source ID 43, line 88, chars 2990-3054, hits: 0) +- Line (location: source ID 43, line 89, chars 3064-3119, hits: 0) +- Statement (location: source ID 43, line 89, chars 3064-3119, hits: 0) +- Line (location: source ID 43, line 90, chars 3129-3185, hits: 0) +- Statement (location: source ID 43, line 90, chars 3129-3185, hits: 0) +- Function "run" (location: source ID 43, line 110, chars 3692-3915, hits: 0) +- Line (location: source ID 43, line 111, chars 3726-3854, hits: 0) +- Statement (location: source ID 43, line 111, chars 3726-3854, hits: 0) +- Statement (location: source ID 43, line 111, chars 3757-3854, hits: 0) +- Line (location: source ID 43, line 115, chars 3864-3908, hits: 0) +- Statement (location: source ID 43, line 115, chars 3864-3908, hits: 0) + +Uncovered for src/Raffle.sol: +- Line (location: source ID 44, line 136, chars 4574-4756, hits: 0) +- Branch (branch: 2, path: 0) (location: source ID 44, line 136, chars 4574-4756, hits: 0) +- Statement (location: source ID 44, line 136, chars 4588-4745, hits: 0) +- Function "fulfillRandomWords" (location: source ID 44, line 164, chars 5526-6289, hits: 0) +- Line (location: source ID 44, line 171, chars 5730-5787, hits: 0) +- Statement (location: source ID 44, line 171, chars 5730-5787, hits: 0) +- Statement (location: source ID 44, line 171, chars 5754-5787, hits: 0) +- Line (location: source ID 44, line 172, chars 5797-5852, hits: 0) +- Statement (location: source ID 44, line 172, chars 5797-5852, hits: 0) +- Line (location: source ID 44, line 173, chars 5862-5891, hits: 0) +- Statement (location: source ID 44, line 173, chars 5862-5891, hits: 0) +- Line (location: source ID 44, line 174, chars 5901-5937, hits: 0) +- Statement (location: source ID 44, line 174, chars 5901-5937, hits: 0) +- Line (location: source ID 44, line 175, chars 5947-5979, hits: 0) +- Statement (location: source ID 44, line 175, chars 5947-5979, hits: 0) +- Line (location: source ID 44, line 176, chars 5989-6022, hits: 0) +- Statement (location: source ID 44, line 176, chars 5989-6022, hits: 0) +- Line (location: source ID 44, line 177, chars 6032-6065, hits: 0) +- Statement (location: source ID 44, line 177, chars 6032-6065, hits: 0) +- Line (location: source ID 44, line 178, chars 6075-6145, hits: 0) +- Statement (location: source ID 44, line 178, chars 6075-6145, hits: 0) +- Statement (location: source ID 44, line 178, chars 6094-6145, hits: 0) +- Line (location: source ID 44, line 181, chars 6217-6225, hits: 0) +- Statement (location: source ID 44, line 181, chars 6217-6225, hits: 0) +- Line (location: source ID 44, line 182, chars 6227-6283, hits: 0) +- Branch (branch: 3, path: 0) (location: source ID 44, line 182, chars 6227-6283, hits: 0) +- Statement (location: source ID 44, line 182, chars 6241-6272, hits: 0) +- Function "getEntranceFee" (location: source ID 44, line 189, chars 6335-6430, hits: 0) +- Line (location: source ID 44, line 190, chars 6403-6423, hits: 0) +- Statement (location: source ID 44, line 190, chars 6403-6423, hits: 0) +- Function "getNumberOfPlayers" (location: source ID 44, line 201, chars 6669-6769, hits: 0) +- Line (location: source ID 44, line 202, chars 6739-6762, hits: 0) +- Statement (location: source ID 44, line 202, chars 6739-6762, hits: 0) + +Uncovered for test/mocks/LinkToken.sol: +- Function "mint" (location: source ID 45, line 23, chars 559-640, hits: 0) +- Line (location: source ID 45, line 24, chars 617-633, hits: 0) +- Statement (location: source ID 45, line 24, chars 617-633, hits: 0) +- Function "transferAndCall" (location: source ID 45, line 40, chars 1063-1474, hits: 0) +- Line (location: source ID 45, line 45, chars 1215-1242, hits: 0) +- Statement (location: source ID 45, line 45, chars 1215-1242, hits: 0) +- Line (location: source ID 45, line 47, chars 1310-1355, hits: 0) +- Statement (location: source ID 45, line 47, chars 1310-1355, hits: 0) +- Line (location: source ID 45, line 48, chars 1369-1384, hits: 0) +- Statement (location: source ID 45, line 48, chars 1369-1384, hits: 0) +- Branch (branch: 0, path: 0) (location: source ID 45, line 48, chars 1386-1447, hits: 0) +- Line (location: source ID 45, line 49, chars 1400-1436, hits: 0) +- Statement (location: source ID 45, line 49, chars 1400-1436, hits: 0) +- Line (location: source ID 45, line 51, chars 1456-1467, hits: 0) +- Statement (location: source ID 45, line 51, chars 1456-1467, hits: 0) +- Function "contractFallback" (location: source ID 45, line 56, chars 1496-1732, hits: 0) +- Line (location: source ID 45, line 61, chars 1619-1664, hits: 0) +- Statement (location: source ID 45, line 61, chars 1619-1664, hits: 0) +- Line (location: source ID 45, line 62, chars 1674-1725, hits: 0) +- Statement (location: source ID 45, line 62, chars 1674-1725, hits: 0) +- Function "isContract" (location: source ID 45, line 65, chars 1738-1937, hits: 0) +- Line (location: source ID 45, line 66, chars 1819-1833, hits: 0) +- Statement (location: source ID 45, line 66, chars 1819-1833, hits: 0) +- Line (location: source ID 45, line 68, chars 1866-1894, hits: 0) +- Statement (location: source ID 45, line 68, chars 1866-1894, hits: 0) +- Line (location: source ID 45, line 70, chars 1913-1930, hits: 0) +- Statement (location: source ID 45, line 70, chars 1913-1930, hits: 0) +- Statement (location: source ID 45, line 70, chars 1920-1930, hits: 0) + +Anchors for Contract "IMulticall3" (solc 0.8.19, source ID 34): + +Anchors for Contract "ERC677Receiver" (solc 0.8.19, source ID 45): + +Anchors for Contract "safeconsole" (solc 0.8.19, source ID 37): + +Anchors for Contract "CodeConstants" (solc 0.8.19, source ID 42): + +Anchors for Contract "StdChains" (solc 0.8.19, source ID 17): + +Anchors for Contract "AggregatorV3Interface" (solc 0.8.19, source ID 2): + +Anchors for Contract "MockERC721" (solc 0.8.19, source ID 36): + +Anchors for Contract "console" (solc 0.8.19, source ID 29): + +Anchors for Contract "IERC721TokenReceiver" (solc 0.8.19, source ID 36): + +Anchors for Contract "IERC721TokenReceiver" (solc 0.8.19, source ID 33): + +Anchors for Contract "VRFCoordinatorV2_5Mock" (solc 0.8.19, source ID 13): + +Anchors for Contract "ConfirmedOwnerWithProposal" (solc 0.8.19, source ID 1): + +Anchors for Contract "VRFV2PlusClient" (solc 0.8.19, source ID 12): + +Anchors for Contract "StringUtils" (solc 0.8.19, source ID 39): + +Anchors for Contract "stdStorage" (solc 0.8.19, source ID 23): + +Anchors for Contract "StdAssertions" (solc 0.8.19, source ID 16): + +Anchors for Contract "IVRFMigratableConsumerV2Plus" (solc 0.8.19, source ID 10): + +Anchors for Contract "StdCheatsSafe" (solc 0.8.19, source ID 18): + +Anchors for Contract "IERC721" (solc 0.8.19, source ID 33): + +Anchors for Contract "AddConsumer" (solc 0.8.19, source ID 43): +- IC 119 -> Item 99 +- Creation code + - Refers to item: Function "addConsumerUsingConfig" (location: source ID 43, line 86, chars 2855-3192, hits: 0) +- IC 777 -> Item 100 +- Creation code + - Refers to item: Line (location: source ID 43, line 87, chars 2934-2980, hits: 0) +- IC 777 -> Item 101 +- Creation code + - Refers to item: Statement (location: source ID 43, line 87, chars 2934-2980, hits: 0) +- IC 779 -> Item 102 +- Creation code + - Refers to item: Statement (location: source ID 43, line 87, chars 2962-2980, hits: 0) +- IC 825 -> Item 103 +- Creation code + - Refers to item: Line (location: source ID 43, line 88, chars 2990-3054, hits: 0) +- IC 825 -> Item 104 +- Creation code + - Refers to item: Statement (location: source ID 43, line 88, chars 2990-3054, hits: 0) +- IC 949 -> Item 105 +- Creation code + - Refers to item: Line (location: source ID 43, line 89, chars 3064-3119, hits: 0) +- IC 949 -> Item 106 +- Creation code + - Refers to item: Statement (location: source ID 43, line 89, chars 3064-3119, hits: 0) +- IC 1073 -> Item 107 +- Creation code + - Refers to item: Line (location: source ID 43, line 90, chars 3129-3185, hits: 0) +- IC 1073 -> Item 108 +- Creation code + - Refers to item: Statement (location: source ID 43, line 90, chars 3129-3185, hits: 0) +- IC 87 -> Item 109 +- Creation code + - Refers to item: Function "addConsumer" (location: source ID 43, line 93, chars 3198-3686, hits: 7) +- IC 198 -> Item 110 +- Creation code + - Refers to item: Line (location: source ID 43, line 98, chars 3331-3390, hits: 7) +- IC 198 -> Item 111 +- Creation code + - Refers to item: Statement (location: source ID 43, line 98, chars 3331-3390, hits: 7) +- IC 263 -> Item 112 +- Creation code + - Refers to item: Line (location: source ID 43, line 99, chars 3400-3450, hits: 7) +- IC 263 -> Item 113 +- Creation code + - Refers to item: Statement (location: source ID 43, line 99, chars 3400-3450, hits: 7) +- IC 328 -> Item 114 +- Creation code + - Refers to item: Line (location: source ID 43, line 100, chars 3460-3502, hits: 7) +- IC 328 -> Item 115 +- Creation code + - Refers to item: Statement (location: source ID 43, line 100, chars 3460-3502, hits: 7) +- IC 429 -> Item 116 +- Creation code + - Refers to item: Line (location: source ID 43, line 102, chars 3513-3532, hits: 7) +- IC 429 -> Item 117 +- Creation code + - Refers to item: Statement (location: source ID 43, line 102, chars 3513-3532, hits: 7) +- IC 526 -> Item 118 +- Creation code + - Refers to item: Line (location: source ID 43, line 103, chars 3542-3651, hits: 7) +- IC 526 -> Item 119 +- Creation code + - Refers to item: Statement (location: source ID 43, line 103, chars 3542-3651, hits: 7) +- IC 675 -> Item 120 +- Creation code + - Refers to item: Line (location: source ID 43, line 107, chars 3661-3679, hits: 7) +- IC 675 -> Item 121 +- Creation code + - Refers to item: Statement (location: source ID 43, line 107, chars 3661-3679, hits: 7) +- IC 151 -> Item 122 +- Creation code + - Refers to item: Function "run" (location: source ID 43, line 110, chars 3692-3915, hits: 0) +- IC 1092 -> Item 123 +- Creation code + - Refers to item: Line (location: source ID 43, line 111, chars 3726-3854, hits: 0) +- IC 1092 -> Item 124 +- Creation code + - Refers to item: Statement (location: source ID 43, line 111, chars 3726-3854, hits: 0) +- IC 1094 -> Item 125 +- Creation code + - Refers to item: Statement (location: source ID 43, line 111, chars 3757-3854, hits: 0) +- IC 1161 -> Item 126 +- Creation code + - Refers to item: Line (location: source ID 43, line 115, chars 3864-3908, hits: 0) +- IC 1161 -> Item 127 +- Creation code + - Refers to item: Statement (location: source ID 43, line 115, chars 3864-3908, hits: 0) + +Anchors for Contract "IVRFCoordinatorV2Plus" (solc 0.8.19, source ID 9): + +Anchors for Contract "StdInvariant" (solc 0.8.19, source ID 20): + +Anchors for Contract "DevOpsTools" (solc 0.8.19, source ID 38): + +Anchors for Contract "LinkToken" (solc 0.8.19, source ID 45): +- IC 5 -> Item 0 +- Runtime code + - Refers to item: Function "" (location: source ID 45, line 19, chars 452-553, hits: 7) +- IC 213 -> Item 1 +- Runtime code + - Refers to item: Line (location: source ID 45, line 20, chars 513-546, hits: 7) +- IC 213 -> Item 2 +- Runtime code + - Refers to item: Statement (location: source ID 45, line 20, chars 513-546, hits: 7) +- IC 544 -> Item 3 +- Creation code + - Refers to item: Function "mint" (location: source ID 45, line 23, chars 559-640, hits: 0) +- IC 2117 -> Item 4 +- Creation code + - Refers to item: Line (location: source ID 45, line 24, chars 617-633, hits: 0) +- IC 2117 -> Item 5 +- Creation code + - Refers to item: Statement (location: source ID 45, line 24, chars 617-633, hits: 0) +- IC 496 -> Item 6 +- Creation code + - Refers to item: Function "transferAndCall" (location: source ID 45, line 40, chars 1063-1474, hits: 0) +- IC 1966 -> Item 7 +- Creation code + - Refers to item: Line (location: source ID 45, line 45, chars 1215-1242, hits: 0) +- IC 1966 -> Item 8 +- Creation code + - Refers to item: Statement (location: source ID 45, line 45, chars 1215-1242, hits: 0) +- IC 1977 -> Item 9 +- Creation code + - Refers to item: Line (location: source ID 45, line 47, chars 1310-1355, hits: 0) +- IC 1977 -> Item 10 +- Creation code + - Refers to item: Statement (location: source ID 45, line 47, chars 1310-1355, hits: 0) +- IC 2080 -> Item 11 +- Creation code + - Refers to item: Line (location: source ID 45, line 48, chars 1369-1384, hits: 0) +- IC 2080 -> Item 12 +- Creation code + - Refers to item: Statement (location: source ID 45, line 48, chars 1369-1384, hits: 0) +- IC 2094 -> Item 13 +- Creation code + - Refers to item: Branch (branch: 0, path: 0) (location: source ID 45, line 48, chars 1386-1447, hits: 0) +- IC 2094 -> Item 14 +- Creation code + - Refers to item: Line (location: source ID 45, line 49, chars 1400-1436, hits: 0) +- IC 2094 -> Item 15 +- Creation code + - Refers to item: Statement (location: source ID 45, line 49, chars 1400-1436, hits: 0) +- IC 2106 -> Item 16 +- Creation code + - Refers to item: Line (location: source ID 45, line 51, chars 1456-1467, hits: 0) +- IC 2106 -> Item 17 +- Creation code + - Refers to item: Statement (location: source ID 45, line 51, chars 1456-1467, hits: 0) +- IC 3559 -> Item 18 +- Creation code + - Refers to item: Function "contractFallback" (location: source ID 45, line 56, chars 1496-1732, hits: 0) +- IC 3560 -> Item 19 +- Creation code + - Refers to item: Line (location: source ID 45, line 61, chars 1619-1664, hits: 0) +- IC 3560 -> Item 20 +- Creation code + - Refers to item: Statement (location: source ID 45, line 61, chars 1619-1664, hits: 0) +- IC 3565 -> Item 21 +- Creation code + - Refers to item: Line (location: source ID 45, line 62, chars 1674-1725, hits: 0) +- IC 3565 -> Item 22 +- Creation code + - Refers to item: Statement (location: source ID 45, line 62, chars 1674-1725, hits: 0) +- IC 3540 -> Item 23 +- Creation code + - Refers to item: Function "isContract" (location: source ID 45, line 65, chars 1738-1937, hits: 0) +- IC 3543 -> Item 24 +- Creation code + - Refers to item: Line (location: source ID 45, line 66, chars 1819-1833, hits: 0) +- IC 3543 -> Item 25 +- Creation code + - Refers to item: Statement (location: source ID 45, line 66, chars 1819-1833, hits: 0) +- IC 3544 -> Item 26 +- Creation code + - Refers to item: Line (location: source ID 45, line 68, chars 1866-1894, hits: 0) +- IC 3544 -> Item 27 +- Creation code + - Refers to item: Statement (location: source ID 45, line 68, chars 1866-1894, hits: 0) +- IC 3548 -> Item 28 +- Creation code + - Refers to item: Line (location: source ID 45, line 70, chars 1913-1930, hits: 0) +- IC 3548 -> Item 29 +- Creation code + - Refers to item: Statement (location: source ID 45, line 70, chars 1913-1930, hits: 0) +- IC 3548 -> Item 30 +- Creation code + - Refers to item: Statement (location: source ID 45, line 70, chars 1920-1930, hits: 0) + +Anchors for Contract "TestBase" (solc 0.8.19, source ID 14): + +Anchors for Contract "LinkTokenInterface" (solc 0.8.19, source ID 5): + +Anchors for Contract "ScriptBase" (solc 0.8.19, source ID 14): + +Anchors for Contract "MockERC20" (solc 0.8.19, source ID 35): + +Anchors for Contract "VmSafe" (solc 0.8.19, source ID 28): + +Anchors for Contract "IERC165" (solc 0.8.19, source ID 31): + +Anchors for Contract "CreateSubscription" (solc 0.8.19, source ID 43): +- IC 99 -> Item 31 +- Creation code + - Refers to item: Function "createSubscriptionUsingConfig" (location: source ID 43, line 11, chars 455-768, hits: 0) +- IC 241 -> Item 32 +- Creation code + - Refers to item: Line (location: source ID 43, line 12, chars 540-586, hits: 0) +- IC 241 -> Item 33 +- Creation code + - Refers to item: Statement (location: source ID 43, line 12, chars 540-586, hits: 0) +- IC 243 -> Item 34 +- Creation code + - Refers to item: Statement (location: source ID 43, line 12, chars 568-586, hits: 0) +- IC 289 -> Item 35 +- Creation code + - Refers to item: Line (location: source ID 43, line 13, chars 596-660, hits: 0) +- IC 289 -> Item 36 +- Creation code + - Refers to item: Statement (location: source ID 43, line 13, chars 596-660, hits: 0) +- IC 413 -> Item 37 +- Creation code + - Refers to item: Line (location: source ID 43, line 14, chars 670-721, hits: 0) +- IC 413 -> Item 38 +- Creation code + - Refers to item: Statement (location: source ID 43, line 14, chars 670-721, hits: 0) +- IC 415 -> Item 39 +- Creation code + - Refers to item: Statement (location: source ID 43, line 14, chars 687-721, hits: 0) +- IC 429 -> Item 40 +- Creation code + - Refers to item: Line (location: source ID 43, line 15, chars 731-761, hits: 0) +- IC 429 -> Item 41 +- Creation code + - Refers to item: Statement (location: source ID 43, line 15, chars 731-761, hits: 0) +- IC 134 -> Item 42 +- Creation code + - Refers to item: Function "createSubscription" (location: source ID 43, line 18, chars 774-1316, hits: 7) +- IC 445 -> Item 43 +- Creation code + - Refers to item: Line (location: source ID 43, line 21, chars 884-947, hits: 7) +- IC 445 -> Item 44 +- Creation code + - Refers to item: Statement (location: source ID 43, line 21, chars 884-947, hits: 7) +- IC 518 -> Item 45 +- Creation code + - Refers to item: Line (location: source ID 43, line 23, chars 958-977, hits: 7) +- IC 518 -> Item 46 +- Creation code + - Refers to item: Statement (location: source ID 43, line 23, chars 958-977, hits: 7) +- IC 615 -> Item 47 +- Creation code + - Refers to item: Line (location: source ID 43, line 24, chars 987-1075, hits: 7) +- IC 615 -> Item 48 +- Creation code + - Refers to item: Statement (location: source ID 43, line 24, chars 987-1075, hits: 7) +- IC 617 -> Item 49 +- Creation code + - Refers to item: Statement (location: source ID 43, line 24, chars 1003-1075, hits: 7) +- IC 771 -> Item 50 +- Creation code + - Refers to item: Line (location: source ID 43, line 26, chars 1085-1103, hits: 7) +- IC 771 -> Item 51 +- Creation code + - Refers to item: Statement (location: source ID 43, line 26, chars 1085-1103, hits: 7) +- IC 868 -> Item 52 +- Creation code + - Refers to item: Line (location: source ID 43, line 28, chars 1114-1161, hits: 7) +- IC 868 -> Item 53 +- Creation code + - Refers to item: Statement (location: source ID 43, line 28, chars 1114-1161, hits: 7) +- IC 933 -> Item 54 +- Creation code + - Refers to item: Line (location: source ID 43, line 29, chars 1171-1268, hits: 7) +- IC 933 -> Item 55 +- Creation code + - Refers to item: Statement (location: source ID 43, line 29, chars 1171-1268, hits: 7) +- IC 969 -> Item 56 +- Creation code + - Refers to item: Line (location: source ID 43, line 33, chars 1279-1309, hits: 7) +- IC 969 -> Item 57 +- Creation code + - Refers to item: Statement (location: source ID 43, line 33, chars 1279-1309, hits: 7) +- IC 87 -> Item 58 +- Creation code + - Refers to item: Function "run" (location: source ID 43, line 36, chars 1322-1392, hits: 0) +- IC 224 -> Item 59 +- Creation code + - Refers to item: Line (location: source ID 43, line 37, chars 1354-1385, hits: 0) +- IC 224 -> Item 60 +- Creation code + - Refers to item: Statement (location: source ID 43, line 37, chars 1354-1385, hits: 0) + +Anchors for Contract "IERC20" (solc 0.8.19, source ID 32): + +Anchors for Contract "EnumerableSet" (solc 0.8.19, source ID 6): + +Anchors for Contract "IOwnable" (solc 0.8.19, source ID 4): + +Anchors for Contract "StdCheats" (solc 0.8.19, source ID 18): + +Anchors for Contract "IVRFSubscriptionV2Plus" (solc 0.8.19, source ID 11): + +Anchors for Contract "IERC677Receiver" (solc 0.8.19, source ID 3): + +Anchors for Contract "IERC721Enumerable" (solc 0.8.19, source ID 33): + +Anchors for Contract "FundSubscription" (solc 0.8.19, source ID 43): +- IC 165 -> Item 61 +- Creation code + - Refers to item: Function "fundSubscriptionUsingConfig" (location: source ID 43, line 44, chars 1515-1901, hits: 0) +- IC 1281 -> Item 62 +- Creation code + - Refers to item: Line (location: source ID 43, line 45, chars 1571-1617, hits: 0) +- IC 1281 -> Item 63 +- Creation code + - Refers to item: Statement (location: source ID 43, line 45, chars 1571-1617, hits: 0) +- IC 1283 -> Item 64 +- Creation code + - Refers to item: Statement (location: source ID 43, line 45, chars 1599-1617, hits: 0) +- IC 1329 -> Item 65 +- Creation code + - Refers to item: Line (location: source ID 43, line 46, chars 1627-1691, hits: 0) +- IC 1329 -> Item 66 +- Creation code + - Refers to item: Statement (location: source ID 43, line 46, chars 1627-1691, hits: 0) +- IC 1453 -> Item 67 +- Creation code + - Refers to item: Line (location: source ID 43, line 47, chars 1701-1765, hits: 0) +- IC 1453 -> Item 68 +- Creation code + - Refers to item: Statement (location: source ID 43, line 47, chars 1701-1765, hits: 0) +- IC 1577 -> Item 69 +- Creation code + - Refers to item: Line (location: source ID 43, line 48, chars 1775-1824, hits: 0) +- IC 1577 -> Item 70 +- Creation code + - Refers to item: Statement (location: source ID 43, line 48, chars 1775-1824, hits: 0) +- IC 1701 -> Item 71 +- Creation code + - Refers to item: Line (location: source ID 43, line 50, chars 1835-1894, hits: 0) +- IC 1701 -> Item 72 +- Creation code + - Refers to item: Statement (location: source ID 43, line 50, chars 1835-1894, hits: 0) +- IC 133 -> Item 73 +- Creation code + - Refers to item: Function "fundSubscription" (location: source ID 43, line 53, chars 1907-2740, hits: 7) +- IC 236 -> Item 74 +- Creation code + - Refers to item: Line (location: source ID 43, line 58, chars 2047-2100, hits: 7) +- IC 236 -> Item 75 +- Creation code + - Refers to item: Statement (location: source ID 43, line 58, chars 2047-2100, hits: 7) +- IC 301 -> Item 76 +- Creation code + - Refers to item: Line (location: source ID 43, line 59, chars 2110-2163, hits: 7) +- IC 301 -> Item 77 +- Creation code + - Refers to item: Statement (location: source ID 43, line 59, chars 2110-2163, hits: 7) +- IC 366 -> Item 78 +- Creation code + - Refers to item: Line (location: source ID 43, line 60, chars 2173-2215, hits: 7) +- IC 366 -> Item 79 +- Creation code + - Refers to item: Statement (location: source ID 43, line 60, chars 2173-2215, hits: 7) +- IC 434 -> Item 80 +- Creation code + - Refers to item: Line (location: source ID 43, line 62, chars 2230-2261, hits: 7) +- IC 434 -> Item 81 +- Creation code + - Refers to item: Statement (location: source ID 43, line 62, chars 2230-2261, hits: 7) +- IC 477 -> Item 82 +- Creation code + - Refers to item: Branch (branch: 0, path: 0) (location: source ID 43, line 62, chars 2263-2483, hits: 7) +- IC 1102 -> Item 83 +- Creation code + - Refers to item: Branch (branch: 0, path: 1) (location: source ID 43, line 62, chars 2226-2697, hits: 0) +- IC 477 -> Item 84 +- Creation code + - Refers to item: Line (location: source ID 43, line 63, chars 2277-2296, hits: 7) +- IC 477 -> Item 85 +- Creation code + - Refers to item: Statement (location: source ID 43, line 63, chars 2277-2296, hits: 7) +- IC 574 -> Item 86 +- Creation code + - Refers to item: Line (location: source ID 43, line 64, chars 2310-2440, hits: 7) +- IC 574 -> Item 87 +- Creation code + - Refers to item: Statement (location: source ID 43, line 64, chars 2310-2440, hits: 7) +- IC 731 -> Item 88 +- Creation code + - Refers to item: Line (location: source ID 43, line 68, chars 2454-2472, hits: 7) +- IC 731 -> Item 89 +- Creation code + - Refers to item: Statement (location: source ID 43, line 68, chars 2454-2472, hits: 7) +- IC 870 -> Item 90 +- Creation code + - Refers to item: Line (location: source ID 43, line 70, chars 2503-2522, hits: 0) +- IC 870 -> Item 91 +- Creation code + - Refers to item: Statement (location: source ID 43, line 70, chars 2503-2522, hits: 0) +- IC 967 -> Item 92 +- Creation code + - Refers to item: Line (location: source ID 43, line 71, chars 2536-2691, hits: 0) +- IC 967 -> Item 93 +- Creation code + - Refers to item: Statement (location: source ID 43, line 71, chars 2536-2691, hits: 0) +- IC 1178 -> Item 94 +- Creation code + - Refers to item: Line (location: source ID 43, line 76, chars 2705-2723, hits: 0) +- IC 1178 -> Item 95 +- Creation code + - Refers to item: Statement (location: source ID 43, line 76, chars 2705-2723, hits: 0) +- IC 177 -> Item 96 +- Creation code + - Refers to item: Function "run" (location: source ID 43, line 80, chars 2746-2814, hits: 0) +- IC 1720 -> Item 97 +- Creation code + - Refers to item: Line (location: source ID 43, line 81, chars 2778-2807, hits: 0) +- IC 1720 -> Item 98 +- Creation code + - Refers to item: Statement (location: source ID 43, line 81, chars 2778-2807, hits: 0) + +Anchors for Contract "Script" (solc 0.8.19, source ID 15): + +Anchors for Contract "stdStorageSafe" (solc 0.8.19, source ID 23): + +Anchors for Contract "ERC20" (solc 0.8.19, source ID 40): + +Anchors for Contract "CommonBase" (solc 0.8.19, source ID 14): + +Anchors for Contract "Test" (solc 0.8.19, source ID 27): + +Anchors for Contract "IERC721Metadata" (solc 0.8.19, source ID 33): + +Anchors for Contract "VRFConsumerBaseV2Plus" (solc 0.8.19, source ID 8): + +Anchors for Contract "stdToml" (solc 0.8.19, source ID 25): + +Anchors for Contract "console2" (solc 0.8.19, source ID 30): + +Anchors for Contract "StdStyle" (solc 0.8.19, source ID 24): + +Anchors for Contract "ConfirmedOwner" (solc 0.8.19, source ID 0): + +Anchors for Contract "RaffleTest" (solc 0.8.19, source ID 46): + +Anchors for Contract "StdUtils" (solc 0.8.19, source ID 26): + +Anchors for Contract "SubscriptionAPI" (solc 0.8.19, source ID 7): + +Anchors for Contract "Vm" (solc 0.8.19, source ID 28): + +Anchors for Contract "stdMath" (solc 0.8.19, source ID 22): + +Anchors for Contract "HelperConfig" (solc 0.8.19, source ID 42): +- IC 179 -> Item 165 +- Runtime code + - Refers to item: Function "" (location: source ID 42, line 34, chars 1007-1098, hits: 7) +- IC 192 -> Item 166 +- Runtime code + - Refers to item: Line (location: source ID 42, line 35, chars 1031-1091, hits: 7) +- IC 192 -> Item 167 +- Runtime code + - Refers to item: Statement (location: source ID 42, line 35, chars 1031-1091, hits: 7) +- IC 456 -> Item 188 +- Runtime code + - Refers to item: Function "getSepoliaEthConfig" (location: source ID 42, line 54, chars 1622-2246, hits: 7) +- IC 465 -> Item 189 +- Runtime code + - Refers to item: Line (location: source ID 42, line 55, chars 1706-2239, hits: 7) +- IC 465 -> Item 190 +- Runtime code + - Refers to item: Statement (location: source ID 42, line 55, chars 1706-2239, hits: 7) +- IC 175 -> Item 168 +- Creation code + - Refers to item: Function "getConfigByChainId" (location: source ID 42, line 38, chars 1104-1494, hits: 0) +- IC 1890 -> Item 169 +- Creation code + - Refers to item: Line (location: source ID 42, line 41, chars 1215-1267, hits: 14) +- IC 1890 -> Item 170 +- Creation code + - Refers to item: Statement (location: source ID 42, line 41, chars 1215-1267, hits: 14) +- IC 1997 -> Item 171 +- Creation code + - Refers to item: Branch (branch: 0, path: 0) (location: source ID 42, line 41, chars 1269-1324, hits: 0) +- IC 2312 -> Item 172 +- Creation code + - Refers to item: Branch (branch: 0, path: 1) (location: source ID 42, line 41, chars 1211-1430, hits: 0) +- IC 1997 -> Item 173 +- Creation code + - Refers to item: Line (location: source ID 42, line 42, chars 1283-1313, hits: 0) +- IC 1997 -> Item 174 +- Creation code + - Refers to item: Statement (location: source ID 42, line 42, chars 1283-1313, hits: 0) +- IC 2288 -> Item 175 +- Creation code + - Refers to item: Line (location: source ID 42, line 43, chars 1334-1359, hits: 14) +- IC 2288 -> Item 176 +- Creation code + - Refers to item: Statement (location: source ID 42, line 43, chars 1334-1359, hits: 14) +- IC 2295 -> Item 177 +- Creation code + - Refers to item: Branch (branch: 1, path: 0) (location: source ID 42, line 43, chars 1361-1420, hits: 14) +- IC 2312 -> Item 178 +- Creation code + - Refers to item: Branch (branch: 1, path: 1) (location: source ID 42, line 43, chars 1330-1457, hits: 0) +- IC 2295 -> Item 179 +- Creation code + - Refers to item: Line (location: source ID 42, line 44, chars 1375-1409, hits: 14) +- IC 2295 -> Item 180 +- Creation code + - Refers to item: Statement (location: source ID 42, line 44, chars 1375-1409, hits: 14) +- IC 2295 -> Item 181 +- Creation code + - Refers to item: Statement (location: source ID 42, line 44, chars 1382-1409, hits: 14) +- IC 2313 -> Item 182 +- Creation code + - Refers to item: Line (location: source ID 42, line 46, chars 1440-1477, hits: 0) +- IC 2313 -> Item 183 +- Creation code + - Refers to item: Statement (location: source ID 42, line 46, chars 1440-1477, hits: 0) +- IC 329 -> Item 184 +- Creation code + - Refers to item: Function "getConfig" (location: source ID 42, line 50, chars 1500-1616, hits: 14) +- IC 2652 -> Item 185 +- Creation code + - Refers to item: Line (location: source ID 42, line 51, chars 1569-1609, hits: 14) +- IC 2652 -> Item 186 +- Creation code + - Refers to item: Statement (location: source ID 42, line 51, chars 1569-1609, hits: 14) +- IC 2652 -> Item 187 +- Creation code + - Refers to item: Statement (location: source ID 42, line 51, chars 1576-1609, hits: 14) +- IC 363 -> Item 188 +- Creation code + - Refers to item: Function "getSepoliaEthConfig" (location: source ID 42, line 54, chars 1622-2246, hits: 7) +- IC 2678 -> Item 189 +- Creation code + - Refers to item: Line (location: source ID 42, line 55, chars 1706-2239, hits: 7) +- IC 2678 -> Item 190 +- Creation code + - Refers to item: Statement (location: source ID 42, line 55, chars 1706-2239, hits: 7) +- IC 141 -> Item 191 +- Creation code + - Refers to item: Function "getOrCreateAnvilEthConfig" (location: source ID 42, line 67, chars 2252-3295, hits: 0) +- IC 442 -> Item 192 +- Creation code + - Refers to item: Line (location: source ID 42, line 69, chars 2386-2433, hits: 14) +- IC 442 -> Item 193 +- Creation code + - Refers to item: Statement (location: source ID 42, line 69, chars 2386-2433, hits: 14) +- IC 532 -> Item 194 +- Creation code + - Refers to item: Branch (branch: 2, path: 0) (location: source ID 42, line 69, chars 2435-2485, hits: 7) +- IC 532 -> Item 195 +- Creation code + - Refers to item: Line (location: source ID 42, line 70, chars 2449-2474, hits: 7) +- IC 532 -> Item 196 +- Creation code + - Refers to item: Statement (location: source ID 42, line 70, chars 2449-2474, hits: 7) +- IC 839 -> Item 197 +- Creation code + - Refers to item: Line (location: source ID 42, line 74, chars 2534-2553, hits: 7) +- IC 839 -> Item 198 +- Creation code + - Refers to item: Statement (location: source ID 42, line 74, chars 2534-2553, hits: 7) +- IC 936 -> Item 199 +- Creation code + - Refers to item: Line (location: source ID 42, line 75, chars 2563-2735, hits: 7) +- IC 936 -> Item 200 +- Creation code + - Refers to item: Statement (location: source ID 42, line 75, chars 2563-2735, hits: 7) +- IC 938 -> Item 201 +- Creation code + - Refers to item: Statement (location: source ID 42, line 75, chars 2603-2735, hits: 7) +- IC 1054 -> Item 202 +- Creation code + - Refers to item: Line (location: source ID 42, line 82, chars 2775-2812, hits: 7) +- IC 1054 -> Item 203 +- Creation code + - Refers to item: Statement (location: source ID 42, line 82, chars 2775-2812, hits: 7) +- IC 1056 -> Item 204 +- Creation code + - Refers to item: Statement (location: source ID 42, line 82, chars 2797-2812, hits: 7) +- IC 1138 -> Item 205 +- Creation code + - Refers to item: Line (location: source ID 42, line 83, chars 2822-2840, hits: 7) +- IC 1138 -> Item 206 +- Creation code + - Refers to item: Statement (location: source ID 42, line 83, chars 2822-2840, hits: 7) +- IC 1235 -> Item 207 +- Creation code + - Refers to item: Line (location: source ID 42, line 85, chars 2851-3252, hits: 7) +- IC 1235 -> Item 208 +- Creation code + - Refers to item: Statement (location: source ID 42, line 85, chars 2851-3252, hits: 7) +- IC 1609 -> Item 209 +- Creation code + - Refers to item: Line (location: source ID 42, line 95, chars 3263-3288, hits: 7) +- IC 1609 -> Item 210 +- Creation code + - Refers to item: Statement (location: source ID 42, line 95, chars 3263-3288, hits: 7) + +Anchors for Contract "Raffle" (solc 0.8.19, source ID 44): +- IC 6 -> Item 211 +- Runtime code + - Refers to item: Function "" (location: source ID 44, line 70, chars 1822-2292, hits: 7) +- IC 482 -> Item 212 +- Runtime code + - Refers to item: Line (location: source ID 44, line 78, chars 2065-2092, hits: 7) +- IC 482 -> Item 213 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 78, chars 2065-2092, hits: 7) +- IC 490 -> Item 214 +- Runtime code + - Refers to item: Line (location: source ID 44, line 79, chars 2102-2123, hits: 7) +- IC 490 -> Item 215 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 79, chars 2102-2123, hits: 7) +- IC 498 -> Item 216 +- Runtime code + - Refers to item: Line (location: source ID 44, line 80, chars 2133-2152, hits: 7) +- IC 498 -> Item 217 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 80, chars 2133-2152, hits: 7) +- IC 506 -> Item 218 +- Runtime code + - Refers to item: Line (location: source ID 44, line 81, chars 2162-2195, hits: 7) +- IC 506 -> Item 219 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 81, chars 2162-2195, hits: 7) +- IC 514 -> Item 220 +- Runtime code + - Refers to item: Line (location: source ID 44, line 82, chars 2205-2242, hits: 7) +- IC 514 -> Item 221 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 82, chars 2205-2242, hits: 7) +- IC 535 -> Item 222 +- Runtime code + - Refers to item: Line (location: source ID 44, line 83, chars 2252-2285, hits: 7) +- IC 535 -> Item 223 +- Runtime code + - Refers to item: Statement (location: source ID 44, line 83, chars 2252-2285, hits: 7) +- IC 326 -> Item 224 +- Creation code + - Refers to item: Function "enterRaffle" (location: source ID 44, line 86, chars 2298-3071, hits: 6) +- IC 996 -> Item 225 +- Creation code + - Refers to item: Line (location: source ID 44, line 88, chars 2469-2494, hits: 6) +- IC 996 -> Item 226 +- Creation code + - Refers to item: Statement (location: source ID 44, line 88, chars 2469-2494, hits: 6) +- IC 1036 -> Item 227 +- Creation code + - Refers to item: Branch (branch: 0, path: 0) (location: source ID 44, line 88, chars 2496-2559, hits: 1) +- IC 1036 -> Item 228 +- Creation code + - Refers to item: Line (location: source ID 44, line 89, chars 2510-2548, hits: 1) +- IC 1036 -> Item 229 +- Creation code + - Refers to item: Statement (location: source ID 44, line 89, chars 2510-2548, hits: 1) +- IC 1086 -> Item 230 +- Creation code + - Refers to item: Line (location: source ID 44, line 92, chars 2573-2606, hits: 5) +- IC 1086 -> Item 231 +- Creation code + - Refers to item: Statement (location: source ID 44, line 92, chars 2573-2606, hits: 5) +- IC 1145 -> Item 232 +- Creation code + - Refers to item: Branch (branch: 1, path: 0) (location: source ID 44, line 92, chars 2608-2663, hits: 1) +- IC 1145 -> Item 233 +- Creation code + - Refers to item: Line (location: source ID 44, line 93, chars 2622-2652, hits: 1) +- IC 1145 -> Item 234 +- Creation code + - Refers to item: Statement (location: source ID 44, line 93, chars 2622-2652, hits: 1) +- IC 1195 -> Item 235 +- Creation code + - Refers to item: Line (location: source ID 44, line 96, chars 2838-2873, hits: 4) +- IC 1195 -> Item 236 +- Creation code + - Refers to item: Statement (location: source ID 44, line 96, chars 2838-2873, hits: 4) +- IC 1294 -> Item 237 +- Creation code + - Refers to item: Line (location: source ID 44, line 99, chars 3034-3064, hits: 4) +- IC 1294 -> Item 238 +- Creation code + - Refers to item: Statement (location: source ID 44, line 99, chars 3034-3064, hits: 4) +- IC 377 -> Item 239 +- Creation code + - Refers to item: Function "checkUpKeep" (location: source ID 44, line 112, chars 3471-4156, hits: 2) +- IC 1900 -> Item 240 +- Creation code + - Refers to item: Line (location: source ID 44, line 115, chars 3619-3667, hits: 4) +- IC 1900 -> Item 241 +- Creation code + - Refers to item: Statement (location: source ID 44, line 115, chars 3619-3667, hits: 4) +- IC 1902 -> Item 242 +- Creation code + - Refers to item: Statement (location: source ID 44, line 115, chars 3634-3667, hits: 4) +- IC 1959 -> Item 243 +- Creation code + - Refers to item: Line (location: source ID 44, line 116, chars 3677-3745, hits: 4) +- IC 1959 -> Item 244 +- Creation code + - Refers to item: Statement (location: source ID 44, line 116, chars 3677-3745, hits: 4) +- IC 2011 -> Item 245 +- Creation code + - Refers to item: Line (location: source ID 44, line 117, chars 3755-3793, hits: 4) +- IC 2011 -> Item 246 +- Creation code + - Refers to item: Statement (location: source ID 44, line 117, chars 3755-3793, hits: 4) +- IC 2013 -> Item 247 +- Creation code + - Refers to item: Statement (location: source ID 44, line 117, chars 3773-3793, hits: 4) +- IC 2023 -> Item 248 +- Creation code + - Refers to item: Line (location: source ID 44, line 118, chars 3803-3846, hits: 4) +- IC 2023 -> Item 249 +- Creation code + - Refers to item: Statement (location: source ID 44, line 118, chars 3803-3846, hits: 4) +- IC 2025 -> Item 250 +- Creation code + - Refers to item: Statement (location: source ID 44, line 118, chars 3821-3846, hits: 4) +- IC 2030 -> Item 251 +- Creation code + - Refers to item: Line (location: source ID 44, line 120, chars 3857-3888, hits: 4) +- IC 2030 -> Item 252 +- Creation code + - Refers to item: Statement (location: source ID 44, line 120, chars 3857-3888, hits: 4) +- IC 2093 -> Item 253 +- Creation code + - Refers to item: Line (location: source ID 44, line 121, chars 3898-3937, hits: 4) +- IC 2093 -> Item 254 +- Creation code + - Refers to item: Statement (location: source ID 44, line 121, chars 3898-3937, hits: 4) +- IC 2156 -> Item 255 +- Creation code + - Refers to item: Line (location: source ID 44, line 122, chars 3947-3986, hits: 4) +- IC 2156 -> Item 256 +- Creation code + - Refers to item: Statement (location: source ID 44, line 122, chars 3947-3986, hits: 4) +- IC 2219 -> Item 257 +- Creation code + - Refers to item: Line (location: source ID 44, line 123, chars 3996-4035, hits: 4) +- IC 2219 -> Item 258 +- Creation code + - Refers to item: Statement (location: source ID 44, line 123, chars 3996-4035, hits: 4) +- IC 2282 -> Item 259 +- Creation code + - Refers to item: Line (location: source ID 44, line 125, chars 4046-4111, hits: 4) +- IC 2282 -> Item 260 +- Creation code + - Refers to item: Statement (location: source ID 44, line 125, chars 4046-4111, hits: 4) +- IC 2312 -> Item 261 +- Creation code + - Refers to item: Line (location: source ID 44, line 126, chars 4121-4149, hits: 4) +- IC 2312 -> Item 262 +- Creation code + - Refers to item: Statement (location: source ID 44, line 126, chars 4121-4149, hits: 4) +- IC 336 -> Item 263 +- Creation code + - Refers to item: Function "performUpkeep" (location: source ID 44, line 132, chars 4378-5470, hits: 2) +- IC 1363 -> Item 264 +- Creation code + - Refers to item: Line (location: source ID 44, line 134, chars 4506-4545, hits: 2) +- IC 1363 -> Item 265 +- Creation code + - Refers to item: Statement (location: source ID 44, line 134, chars 4506-4545, hits: 2) +- IC 1365 -> Item 266 +- Creation code + - Refers to item: Statement (location: source ID 44, line 134, chars 4530-4545, hits: 2) +- IC 1392 -> Item 267 +- Creation code + - Refers to item: Line (location: source ID 44, line 135, chars 4559-4572, hits: 2) +- IC 1392 -> Item 268 +- Creation code + - Refers to item: Statement (location: source ID 44, line 135, chars 4559-4572, hits: 2) +- IC 1397 -> Item 269 +- Creation code + - Refers to item: Line (location: source ID 44, line 136, chars 4574-4756, hits: 0) +- IC 1397 -> Item 270 +- Creation code + - Refers to item: Branch (branch: 2, path: 0) (location: source ID 44, line 136, chars 4574-4756, hits: 0) +- IC 1397 -> Item 271 +- Creation code + - Refers to item: Statement (location: source ID 44, line 136, chars 4588-4745, hits: 0) +- IC 1500 -> Item 272 +- Creation code + - Refers to item: Line (location: source ID 44, line 146, chars 4866-4905, hits: 2) +- IC 1500 -> Item 273 +- Creation code + - Refers to item: Statement (location: source ID 44, line 146, chars 4866-4905, hits: 2) +- IC 1543 -> Item 274 +- Creation code + - Refers to item: Line (location: source ID 44, line 148, chars 4916-5408, hits: 2) +- IC 1543 -> Item 275 +- Creation code + - Refers to item: Statement (location: source ID 44, line 148, chars 4916-5408, hits: 2) +- IC 1731 -> Item 276 +- Creation code + - Refers to item: Line (location: source ID 44, line 160, chars 5419-5463, hits: 2) +- IC 1731 -> Item 277 +- Creation code + - Refers to item: Statement (location: source ID 44, line 160, chars 5419-5463, hits: 2) +- IC 3449 -> Item 278 +- Creation code + - Refers to item: Function "fulfillRandomWords" (location: source ID 44, line 164, chars 5526-6289, hits: 0) +- IC 3450 -> Item 279 +- Creation code + - Refers to item: Line (location: source ID 44, line 171, chars 5730-5787, hits: 0) +- IC 3450 -> Item 280 +- Creation code + - Refers to item: Statement (location: source ID 44, line 171, chars 5730-5787, hits: 0) +- IC 3452 -> Item 281 +- Creation code + - Refers to item: Statement (location: source ID 44, line 171, chars 5754-5787, hits: 0) +- IC 3497 -> Item 282 +- Creation code + - Refers to item: Line (location: source ID 44, line 172, chars 5797-5852, hits: 0) +- IC 3497 -> Item 283 +- Creation code + - Refers to item: Statement (location: source ID 44, line 172, chars 5797-5852, hits: 0) +- IC 3564 -> Item 284 +- Creation code + - Refers to item: Line (location: source ID 44, line 173, chars 5862-5891, hits: 0) +- IC 3564 -> Item 285 +- Creation code + - Refers to item: Statement (location: source ID 44, line 173, chars 5862-5891, hits: 0) +- IC 3629 -> Item 286 +- Creation code + - Refers to item: Line (location: source ID 44, line 174, chars 5901-5937, hits: 0) +- IC 3629 -> Item 287 +- Creation code + - Refers to item: Statement (location: source ID 44, line 174, chars 5901-5937, hits: 0) +- IC 3725 -> Item 288 +- Creation code + - Refers to item: Line (location: source ID 44, line 175, chars 5947-5979, hits: 0) +- IC 3725 -> Item 289 +- Creation code + - Refers to item: Statement (location: source ID 44, line 175, chars 5947-5979, hits: 0) +- IC 3768 -> Item 290 +- Creation code + - Refers to item: Line (location: source ID 44, line 176, chars 5989-6022, hits: 0) +- IC 3768 -> Item 291 +- Creation code + - Refers to item: Statement (location: source ID 44, line 176, chars 5989-6022, hits: 0) +- IC 3775 -> Item 292 +- Creation code + - Refers to item: Line (location: source ID 44, line 177, chars 6032-6065, hits: 0) +- IC 3775 -> Item 293 +- Creation code + - Refers to item: Statement (location: source ID 44, line 177, chars 6032-6065, hits: 0) +- IC 3876 -> Item 294 +- Creation code + - Refers to item: Line (location: source ID 44, line 178, chars 6075-6145, hits: 0) +- IC 3876 -> Item 295 +- Creation code + - Refers to item: Statement (location: source ID 44, line 178, chars 6075-6145, hits: 0) +- IC 3878 -> Item 296 +- Creation code + - Refers to item: Statement (location: source ID 44, line 178, chars 6094-6145, hits: 0) +- IC 3984 -> Item 297 +- Creation code + - Refers to item: Line (location: source ID 44, line 181, chars 6217-6225, hits: 0) +- IC 3984 -> Item 298 +- Creation code + - Refers to item: Statement (location: source ID 44, line 181, chars 6217-6225, hits: 0) +- IC 3989 -> Item 299 +- Creation code + - Refers to item: Line (location: source ID 44, line 182, chars 6227-6283, hits: 0) +- IC 3989 -> Item 300 +- Creation code + - Refers to item: Branch (branch: 3, path: 0) (location: source ID 44, line 182, chars 6227-6283, hits: 0) +- IC 3989 -> Item 301 +- Creation code + - Refers to item: Statement (location: source ID 44, line 182, chars 6241-6272, hits: 0) +- IC 199 -> Item 302 +- Creation code + - Refers to item: Function "getEntranceFee" (location: source ID 44, line 189, chars 6335-6430, hits: 0) +- IC 737 -> Item 303 +- Creation code + - Refers to item: Line (location: source ID 44, line 190, chars 6403-6423, hits: 0) +- IC 737 -> Item 304 +- Creation code + - Refers to item: Statement (location: source ID 44, line 190, chars 6403-6423, hits: 0) +- IC 242 -> Item 305 +- Creation code + - Refers to item: Function "getRaffleState" (location: source ID 44, line 193, chars 6436-6535, hits: 1) +- IC 777 -> Item 306 +- Creation code + - Refers to item: Line (location: source ID 44, line 194, chars 6508-6528, hits: 1) +- IC 777 -> Item 307 +- Creation code + - Refers to item: Statement (location: source ID 44, line 194, chars 6508-6528, hits: 1) +- IC 589 -> Item 308 +- Creation code + - Refers to item: Function "getPlayer" (location: source ID 44, line 197, chars 6541-6663, hits: 1) +- IC 3347 -> Item 309 +- Creation code + - Refers to item: Line (location: source ID 44, line 198, chars 6625-6656, hits: 1) +- IC 3347 -> Item 310 +- Creation code + - Refers to item: Statement (location: source ID 44, line 198, chars 6625-6656, hits: 1) +- IC 691 -> Item 311 +- Creation code + - Refers to item: Function "getNumberOfPlayers" (location: source ID 44, line 201, chars 6669-6769, hits: 0) +- IC 3439 -> Item 312 +- Creation code + - Refers to item: Line (location: source ID 44, line 202, chars 6739-6762, hits: 0) +- IC 3439 -> Item 313 +- Creation code + - Refers to item: Statement (location: source ID 44, line 202, chars 6739-6762, hits: 0) + +Anchors for Contract "stdError" (solc 0.8.19, source ID 19): + +Anchors for Contract "stdJson" (solc 0.8.19, source ID 21): + +Anchors for Contract "DeployRaffle" (solc 0.8.19, source ID 41): +- IC 110 -> Item 128 +- Creation code + - Refers to item: Function "run" (location: source ID 41, line 10, chars 330-385, hits: 0) +- IC 1307 -> Item 129 +- Creation code + - Refers to item: Line (location: source ID 41, line 11, chars 362-378, hits: 0) +- IC 1307 -> Item 130 +- Creation code + - Refers to item: Statement (location: source ID 41, line 11, chars 362-378, hits: 0) +- IC 75 -> Item 131 +- Creation code + - Refers to item: Function "deployContract" (location: source ID 41, line 15, chars 392-1745, hits: 7) +- IC 160 -> Item 132 +- Creation code + - Refers to item: Line (location: source ID 41, line 16, chars 466-512, hits: 7) +- IC 160 -> Item 133 +- Creation code + - Refers to item: Statement (location: source ID 41, line 16, chars 466-512, hits: 7) +- IC 162 -> Item 134 +- Creation code + - Refers to item: Statement (location: source ID 41, line 16, chars 494-512, hits: 7) +- IC 208 -> Item 135 +- Creation code + - Refers to item: Line (location: source ID 41, line 18, chars 573-640, hits: 7) +- IC 208 -> Item 136 +- Creation code + - Refers to item: Statement (location: source ID 41, line 18, chars 573-640, hits: 7) +- IC 210 -> Item 137 +- Creation code + - Refers to item: Statement (location: source ID 41, line 18, chars 616-640, hits: 7) +- IC 328 -> Item 138 +- Creation code + - Refers to item: Line (location: source ID 41, line 20, chars 655-681, hits: 7) +- IC 328 -> Item 139 +- Creation code + - Refers to item: Statement (location: source ID 41, line 20, chars 655-681, hits: 7) +- IC 341 -> Item 140 +- Creation code + - Refers to item: Branch (branch: 0, path: 0) (location: source ID 41, line 20, chars 683-1213, hits: 7) +- IC 341 -> Item 141 +- Creation code + - Refers to item: Line (location: source ID 41, line 23, chars 733-797, hits: 7) +- IC 341 -> Item 142 +- Creation code + - Refers to item: Statement (location: source ID 41, line 23, chars 733-797, hits: 7) +- IC 343 -> Item 143 +- Creation code + - Refers to item: Statement (location: source ID 41, line 23, chars 773-797, hits: 7) +- IC 389 -> Item 144 +- Creation code + - Refers to item: Line (location: source ID 41, line 24, chars 811-937, hits: 7) +- IC 389 -> Item 145 +- Creation code + - Refers to item: Statement (location: source ID 41, line 24, chars 811-937, hits: 7) +- IC 583 -> Item 146 +- Creation code + - Refers to item: Line (location: source ID 41, line 28, chars 976-1034, hits: 7) +- IC 583 -> Item 147 +- Creation code + - Refers to item: Statement (location: source ID 41, line 28, chars 976-1034, hits: 7) +- IC 585 -> Item 148 +- Creation code + - Refers to item: Statement (location: source ID 41, line 28, chars 1012-1034, hits: 7) +- IC 631 -> Item 149 +- Creation code + - Refers to item: Line (location: source ID 41, line 29, chars 1048-1202, hits: 7) +- IC 631 -> Item 150 +- Creation code + - Refers to item: Statement (location: source ID 41, line 29, chars 1048-1202, hits: 7) +- IC 797 -> Item 151 +- Creation code + - Refers to item: Line (location: source ID 41, line 36, chars 1223-1242, hits: 7) +- IC 797 -> Item 152 +- Creation code + - Refers to item: Statement (location: source ID 41, line 36, chars 1223-1242, hits: 7) +- IC 894 -> Item 153 +- Creation code + - Refers to item: Line (location: source ID 41, line 37, chars 1252-1484, hits: 7) +- IC 894 -> Item 154 +- Creation code + - Refers to item: Statement (location: source ID 41, line 37, chars 1252-1484, hits: 7) +- IC 896 -> Item 155 +- Creation code + - Refers to item: Statement (location: source ID 41, line 37, chars 1268-1484, hits: 7) +- IC 1025 -> Item 156 +- Creation code + - Refers to item: Line (location: source ID 41, line 45, chars 1494-1512, hits: 7) +- IC 1025 -> Item 157 +- Creation code + - Refers to item: Statement (location: source ID 41, line 45, chars 1494-1512, hits: 7) +- IC 1122 -> Item 158 +- Creation code + - Refers to item: Line (location: source ID 41, line 47, chars 1523-1566, hits: 7) +- IC 1122 -> Item 159 +- Creation code + - Refers to item: Statement (location: source ID 41, line 47, chars 1523-1566, hits: 7) +- IC 1124 -> Item 160 +- Creation code + - Refers to item: Statement (location: source ID 41, line 47, chars 1549-1566, hits: 7) +- IC 1170 -> Item 161 +- Creation code + - Refers to item: Line (location: source ID 41, line 49, chars 1612-1698, hits: 7) +- IC 1170 -> Item 162 +- Creation code + - Refers to item: Statement (location: source ID 41, line 49, chars 1612-1698, hits: 7) +- IC 1293 -> Item 163 +- Creation code + - Refers to item: Line (location: source ID 41, line 51, chars 1709-1738, hits: 7) +- IC 1293 -> Item 164 +- Creation code + - Refers to item: Statement (location: source ID 41, line 51, chars 1709-1738, hits: 7) + diff --git a/script/DeployRaffle.s.sol b/script/DeployRaffle.s.sol index 4bc620e..0a76178 100644 --- a/script/DeployRaffle.s.sol +++ b/script/DeployRaffle.s.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {Script, console} from "forge-std/Script.sol"; +import {Script} from "forge-std/Script.sol"; import {Raffle} from "src/Raffle.sol"; import {HelperConfig} from "script/HelperConfig.s.sol"; import {CreateSubscription, FundSubscription, AddConsumer} from "script/Interactions.s.sol"; @@ -10,7 +10,7 @@ contract DeployRaffle is Script { function run() public { deployContract(); } - + function deployContract() public returns (Raffle, HelperConfig) { HelperConfig helperConfig = new HelperConfig(); diff --git a/src/Raffle.sol b/src/Raffle.sol index c1bec2f..877c9cb 100644 --- a/src/Raffle.sol +++ b/src/Raffle.sol @@ -111,16 +111,16 @@ contract Raffle is VRFConsumerBaseV2Plus { function checkUpKeep( bytes memory /* checkData */ - ) public view returns (bool upKeepNeeded, bytes memory /* performData */) { - bool isOpen = RaffleState.OPEN == s_raffleState; + ) public view returns (bool upKeepNeeded, bytes memory /* performData */) { + bool isOpen = RaffleState.OPEN == s_raffleState; bool timePassed = ((block.timestamp - s_lastTimeStamp) > i_interval); bool hasPlayers = s_players.length > 0; bool hasBalance = address(this).balance > 0; - console.log("isOpen: ", isOpen); - console.log("timePassed: ", timePassed); - console.log("hasPlayers: ", hasPlayers); - console.log("hasBalance: ", hasBalance); + // console.log("isOpen: ", isOpen); + // console.log("timePassed: ", timePassed); + // console.log("hasPlayers: ", hasPlayers); + // console.log("hasBalance: ", hasBalance); upKeepNeeded = (isOpen && timePassed && hasPlayers && hasBalance); return (upKeepNeeded, "0x0"); @@ -129,7 +129,7 @@ contract Raffle is VRFConsumerBaseV2Plus { // 1. Get a random number ✅ // 2. Use the generated random number to pick winner ✅ // 3. Call the pickWinner again after the lottery closes (typical part as smart contracts are not easily automated!) - function performUpkeep(bytes calldata /* performData */) external { + function performUpkeep(bytes calldata /* performData */) external { // check to see if enough time has passed! (bool upKeepNeeded, ) = checkUpKeep(""); if (!upKeepNeeded) { diff --git a/test/unit/RaffleTest.t.sol b/test/unit/RaffleTest.t.sol index 1fb3c7d..9f68118 100644 --- a/test/unit/RaffleTest.t.sol +++ b/test/unit/RaffleTest.t.sol @@ -98,5 +98,93 @@ contract RaffleTest is Test { CHECKUPKEEP //////////////////////////////////////////////////////////////*/ - + function testCheckUpKeepReturnsFalseIfNoBalance() public { + // Arrange + vm.warp(block.timestamp + interval + 1); + vm.roll(block.number + 1); //only a best practice to do this + + // Act + (bool upkeepNeeded, ) = raffle.checkUpKeep(""); + + // Assert + assert(!upkeepNeeded); + } + + function testCheckUpKeepReturnsFalseIfRaffleNotOpen() public { + // Arrange + vm.prank(PLAYER); + raffle.enterRaffle{value: entranceFee}(); + vm.warp(block.timestamp + interval + 1); + vm.roll(block.number + 1); //only a best practice to do this + raffle.performUpkeep(""); + + // Act + (bool upkeepNeeded, ) = raffle.checkUpKeep(""); + + // Assert + assert(!upkeepNeeded); + } + + /*////////////////////////////////////////////////////////////// + PERFORM UPKEEP + //////////////////////////////////////////////////////////////*/ + + function testPerformUpkeepCanOnlyRunIfCheckUpKeepIsTrue() public { + // Arrange + vm.prank(PLAYER); + raffle.enterRaffle{value: entranceFee}(); + vm.warp(block.timestamp + interval + 1); + vm.roll(block.number + 1); + // Act + // Assert + raffle.performUpkeep(""); + } + + function testPerformUpkeepRevertsIfCheckUpkeepIsFalse() public { + // Arrange + uint256 currentBalance = 0; + uint256 numPlayers = 0; + Raffle.RaffleState rState = raffle.getRaffleState(); + + vm.prank(PLAYER); + raffle.enterRaffle{value: entranceFee}(); + currentBalance = entranceFee + currentBalance; + numPlayers = 1; + + // Act + // Assert + vm.expectRevert( + abi.encodeWithSelector( + Raffle.Raffle__UpKeepNotNeeded.selector, + currentBalance, + numPlayers, + rState + ) + ); + raffle.performUpkeep(""); + } + + /*////////////////////////////////////////////////////////////// + GETTER FUNCTIONS + //////////////////////////////////////////////////////////////*/ + + function testGetEntranceFee() public view { + assert(raffle.getEntranceFee() == entranceFee); + } + + function testGetNumberOfPlayers() public { + // Arrange + + // Act + // Assert + assert(raffle.getNumberOfPlayers() == 0); + + // Arrange + vm.prank(PLAYER); + vm.deal(PLAYER, entranceFee); + raffle.enterRaffle{value: entranceFee}(); + + // Act/ Assert + assert(raffle.getNumberOfPlayers() == 1); + } }