diff --git a/src/Counter.sol b/src/Counter.sol index f1c987a..62cdcc3 100644 --- a/src/Counter.sol +++ b/src/Counter.sol @@ -2,10 +2,10 @@ pragma solidity ^0.8.20; contract Counter { - uint public count; + uint256 public count; // Funcion to get the current count - function get() public view returns (uint) { + function get() public view returns (uint256) { return count; } diff --git a/src/Imports.sol b/src/Imports.sol index 73102e0..267b698 100644 --- a/src/Imports.sol +++ b/src/Imports.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.20; import "solmate/tokens/ERC20.sol"; -contract Token is ERC20("name", "symbol", 18){} +contract Token is ERC20("name", "symbol", 18) {} import "@openzeppelin/contracts/access/Ownable.sol"; diff --git a/test/Counter.t.sol b/test/Counter.t.sol index 3f25b99..e5c0c9c 100644 --- a/test/Counter.t.sol +++ b/test/Counter.t.sol @@ -19,7 +19,7 @@ contract CounterTest is Test { function testFailDec() public { counter.dec(); } - + function testDecUnderFlow() public { vm.expectRevert(stdError.arithmeticError); counter.dec(); diff --git a/test/HelloWorld.t.sol b/test/HelloWorld.t.sol index 606262f..45cc1ab 100644 --- a/test/HelloWorld.t.sol +++ b/test/HelloWorld.t.sol @@ -12,10 +12,6 @@ contract CounterTest is Test { } function testGreet() public { - assertEq( - helloWorld.greet(), - "Hello World!" - ); + assertEq(helloWorld.greet(), "Hello World!"); } - }