Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkeating committed Sep 25, 2023
1 parent bfd4906 commit 83f655e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/L2VoteAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract contract L2VoteAggregator is EIP712 {
/// @param _votingToken The token used to vote on proposals.
/// @param _governorMetadata The `GovernorMetadata` contract that provides proposal information.
/// @param _l1BlockAddress The address of the L1Block contract.
constructor(address _votingToken, address _governorMetadata, address _l1BlockAddress) {
constructor(address _votingToken, address _governorMetadata, address _l1BlockAddress) EIP712("L2VoteAggregator", "1") {
VOTING_TOKEN = ERC20Votes(_votingToken);
GOVERNOR_METADATA = L2GovernorMetadata(_governorMetadata);
L1_BLOCK = IL1Block(_l1BlockAddress);
Expand Down Expand Up @@ -237,6 +237,7 @@ abstract contract L2VoteAggregator is EIP712 {
revert InvalidVoteType();
}
emit VoteCast(voter, proposalId, support, weight, reason);
return weight;
}

function proposalVoteActive(uint256 proposalId) public view returns (bool active) {
Expand Down
8 changes: 4 additions & 4 deletions test/WormholeL2VoteAggregator.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ contract L2VoteAggregatorTest is Constants, WormholeRelayerBasicTest {
L1Block l1Block;
bytes32 l2VoteAggregatorWormholeAddress;

event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight);
event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);

constructor() {
setForkChains(TESTNET, L2_CHAIN.wormholeChainId, L1_CHAIN.wormholeChainId);
Expand Down Expand Up @@ -238,7 +238,7 @@ contract CastVote is L2VoteAggregatorTest {

vm.roll(l2Proposal.voteStart + 1);
vm.expectEmit();
emit VoteCast(address(this), 1, 0, _amount);
emit VoteCast(address(this), 1, 0, _amount, "");

l2VoteAggregator.castVote(1, L2VoteAggregator.VoteType.Against);
(uint256 against,,) = l2VoteAggregator.proposalVotes(1);
Expand All @@ -254,7 +254,7 @@ contract CastVote is L2VoteAggregatorTest {

vm.roll(l2Proposal.voteStart + 1);
vm.expectEmit();
emit VoteCast(address(this), 1, 2, _amount);
emit VoteCast(address(this), 1, 2, _amount, "");

l2VoteAggregator.castVote(1, L2VoteAggregator.VoteType.Abstain);
(,, uint256 abstain) = l2VoteAggregator.proposalVotes(1);
Expand All @@ -271,7 +271,7 @@ contract CastVote is L2VoteAggregatorTest {

vm.roll(l2Proposal.voteStart + 1);
vm.expectEmit();
emit VoteCast(address(this), 1, 1, _amount);
emit VoteCast(address(this), 1, 1, _amount, "");

l2VoteAggregator.castVote(1, L2VoteAggregator.VoteType.For);
(, uint256 forVotes,) = l2VoteAggregator.proposalVotes(1);
Expand Down

0 comments on commit 83f655e

Please sign in to comment.