diff --git a/.gitmodules b/.gitmodules index 2d6ead9..6f89275 100644 --- a/.gitmodules +++ b/.gitmodules @@ -3,4 +3,4 @@ url = https://github.com/foundry-rs/forge-std [submodule "lib/flexible-voting"] path = lib/flexible-voting - url = https://github.com/ScopeLift/flexible-voting + url = https://github.com/scopelift/flexible-voting diff --git a/lib/flexible-voting b/lib/flexible-voting index bdb472e..d71c4e0 160000 --- a/lib/flexible-voting +++ b/lib/flexible-voting @@ -1 +1 @@ -Subproject commit bdb472e4cdca4eea648a4d3594c7ef776ec11afe +Subproject commit d71c4e02256d4ef6c9067b947d398753402afdd2 diff --git a/test/GuineaPigGovernor.t.sol b/test/GuineaPigGovernor.t.sol index 80b567b..5982a94 100644 --- a/test/GuineaPigGovernor.t.sol +++ b/test/GuineaPigGovernor.t.sol @@ -3,20 +3,35 @@ pragma solidity 0.8.22; import {Test, console2} from "forge-std/Test.sol"; import {GuineaPigGovernor, IVotes, TimelockController} from "src/GuineaPigGovernor.sol"; +import {GuineaPigToken} from "src/GuineaPigToken.sol"; contract GuineaPigGovernorTest is Test { GuineaPigGovernor governor; - IVotes token = IVotes(address(0x01b)); - TimelockController timelock = TimelockController(payable(address(0x01c))); + IVotes token; + TimelockController timelock; uint256 INITIAL_VOTING_DELAY = 50; uint256 INITIAL_VOTING_PERIOD = 7200; uint256 INITIAL_PROPOSAL_THRESHOLD = 100_000e18; function setUp() public { - governor = - new GuineaPigGovernor(token, INITIAL_VOTING_DELAY, INITIAL_VOTING_PERIOD, INITIAL_PROPOSAL_THRESHOLD, timelock); + timelock = new TimelockController( + 100, + new address[](0), + new address[](0), + address(this) + ); + + token = new GuineaPigToken(address(timelock), address(0xcafe), 100e18); + + governor = new GuineaPigGovernor( + token, + INITIAL_VOTING_DELAY, + INITIAL_VOTING_PERIOD, + INITIAL_PROPOSAL_THRESHOLD, + timelock + ); } }