Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
maxencerb committed Oct 10, 2024
1 parent fbff1b4 commit 974a16a
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 57 deletions.
4 changes: 4 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ src = "src"
out = "out"
libs = ["lib"]

[fmt]
tab_width = 2


# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
19 changes: 0 additions & 19 deletions script/Counter.s.sol

This file was deleted.

19 changes: 19 additions & 0 deletions script/MangrovePoints.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Script, console} from "forge-std/Script.sol";
import {MangrovePoints} from "../src/MangrovePoints.sol";

contract MangrovePointsScript is Script {
MangrovePoints public mangrovePoints;

function setUp() public {}

function run() public {
vm.startBroadcast();

mangrovePoints = new MangrovePoints();

vm.stopBroadcast();
}
}
14 changes: 0 additions & 14 deletions src/Counter.sol

This file was deleted.

14 changes: 14 additions & 0 deletions src/MangrovePoints.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

contract MangrovePoints {
uint256 public number;

function setNumber(uint256 newNumber) public {
number = newNumber;
}

function increment() public {
number++;
}
}
24 changes: 0 additions & 24 deletions test/Counter.t.sol

This file was deleted.

23 changes: 23 additions & 0 deletions test/MangrovePoints.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Test, console} from "forge-std/Test.sol";
import {MangrovePoints} from "../src/MangrovePoints.sol";

contract MangrovePointsTest is Test {
MangrovePoints public mangrovePoints;

function setUp() public {
mangrovePoints = new MangrovePoints();
}

function test_Increment() public {
mangrovePoints.increment();
assertEq(mangrovePoints.number(), 1);
}

function testFuzz_SetNumber(uint256 x) public {
mangrovePoints.setNumber(x);
assertEq(mangrovePoints.number(), x);
}
}

0 comments on commit 974a16a

Please sign in to comment.