Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions foundry.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"lib/forge-std": {
"tag": {
"name": "v1.11.0",
"rev": "8e40513d678f392f398620b3ef2b418648b33e89"
}
}
}
6 changes: 2 additions & 4 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import {Script} from "forge-std/Script.sol";
import {Counter} from "src/Counter.sol";

contract Deploy is Script {
Counter counter;

function run() public {
function run() public returns (Counter _counter) {
vm.broadcast();
counter = new Counter();
_counter = new Counter();
}
}
8 changes: 6 additions & 2 deletions test/Counter.t.sol
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.30;

import {Test, console2} from "forge-std/Test.sol";
/// forge-lint: disable-next-line(unused-import)
import {console2} from "forge-std/Test.sol";
import {Test} from "forge-std/Test.sol";
import {Deploy} from "script/Deploy.s.sol";
import {Counter} from "src/Counter.sol";

contract CounterTest is Test, Deploy {
Counter counter;

function setUp() public {
Deploy.run();
counter = Deploy.run();
}
}

Expand Down
Loading