diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index d9f629c..0476b10 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -5,6 +5,5 @@ pragma solidity 0.8.22; import {Script} from "forge-std/Script.sol"; contract Deploy is Script { - - function run() public { } + function run() public {} } diff --git a/src/GuineaPigGovernor.sol b/src/GuineaPigGovernor.sol index 43c76ed..3ff6849 100644 --- a/src/GuineaPigGovernor.sol +++ b/src/GuineaPigGovernor.sol @@ -1,6 +1,4 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.22; -contract GuineaPigGovernor { - -} +contract GuineaPigGovernor {} diff --git a/src/GuineaPigToken.sol b/src/GuineaPigToken.sol new file mode 100644 index 0000000..6f105d1 --- /dev/null +++ b/src/GuineaPigToken.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.22; + +import { + ERC20Votes, + ERC20Permit, + ERC20 +} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; + +contract GuineaPigToken is ERC20Votes { + constructor() ERC20("Guinea Pig DAO Token", "GPDT") ERC20Permit("Guinea Pig DAO Token") {} +} diff --git a/test/GuineaPigGovernor.t.sol b/test/GuineaPigGovernor.t.sol index 618cbc8..f01c07d 100644 --- a/test/GuineaPigGovernor.t.sol +++ b/test/GuineaPigGovernor.t.sol @@ -4,10 +4,7 @@ pragma solidity 0.8.22; import {Test, console2} from "forge-std/Test.sol"; contract GuineaPigGovernorTest is Test { - function setUp() public { - } + function setUp() public {} } -contract Deployment is GuineaPigGovernorTest { - -} +contract Deployment is GuineaPigGovernorTest {} diff --git a/test/GuineaPigToken.t.sol b/test/GuineaPigToken.t.sol new file mode 100644 index 0000000..498a0fe --- /dev/null +++ b/test/GuineaPigToken.t.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.22; + +import {Test, console2} from "forge-std/Test.sol"; +import {GuineaPigToken} from "src/GuineaPigToken.sol"; + +contract GuineaPigTokenTest is Test { + GuineaPigToken gpdToken; + + function setUp() public { + gpdToken = new GuineaPigToken(); + } +} + +contract Constructor is GuineaPigTokenTest { + function test_ConstructedCorrectly() public { + assertEq(gpdToken.name(), "Guinea Pig DAO Token"); + assertEq(gpdToken.symbol(), "GPDT"); + } +}