Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
0xrajath committed Dec 8, 2023
1 parent 0d956f6 commit b3e13e8
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions test/token-voting/LlamaTokenVotingTestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ pragma solidity ^0.8.23;
import {Test, console2} from "forge-std/Test.sol";
import {Vm} from "forge-std/Vm.sol";

import {ERC20Votes} from "@openzeppelin/token/ERC20/extensions/ERC20Votes.sol";
import {ERC721Votes} from "@openzeppelin/token/ERC721/extensions/ERC721Votes.sol";

import {MockERC20Votes} from "test/mock/MockERC20Votes.sol";
import {MockERC721Votes} from "test/mock/MockERC721Votes.sol";
import {LlamaPeripheryTestSetup} from "test/LlamaPeripheryTestSetup.sol";
Expand All @@ -24,11 +21,9 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
uint256 public constant ERC721_MIN_APPROVAL_PCT = 1;
uint256 public constant ERC721_MIN_DISAPPROVAL_PCT = 1;

// Tokens
MockERC20Votes public mockERC20Votes;
ERC20Votes public erc20VotesToken;
MockERC721Votes public mockERC721Votes;
ERC721Votes public erc721VotesToken;
// Votes Tokens
MockERC20Votes public erc20VotesToken;
MockERC721Votes public erc721VotesToken;

function setUp() public virtual override {
LlamaPeripheryTestSetup.setUp();
Expand All @@ -37,20 +32,18 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
DeployLlamaTokenVotingFactory.run();

// Deploy the ERC20 and ERC721 tokens.
mockERC20Votes = new MockERC20Votes();
erc20VotesToken = ERC20Votes(address(mockERC20Votes));
mockERC721Votes = new MockERC721Votes();
erc721VotesToken = ERC721Votes(address(mockERC721Votes));
erc20VotesToken = new MockERC20Votes();
erc721VotesToken = new MockERC721Votes();

// Mint tokens to core team members.
mockERC20Votes.mint(coreTeam1, 100);
mockERC20Votes.mint(coreTeam2, 100);
mockERC20Votes.mint(coreTeam3, 100);
mockERC20Votes.mint(coreTeam4, 100);
mockERC721Votes.mint(coreTeam1, 0);
mockERC721Votes.mint(coreTeam2, 1);
mockERC721Votes.mint(coreTeam3, 2);
mockERC721Votes.mint(coreTeam4, 3);
erc20VotesToken.mint(coreTeam1, 100);
erc20VotesToken.mint(coreTeam2, 100);
erc20VotesToken.mint(coreTeam3, 100);
erc20VotesToken.mint(coreTeam4, 100);
erc721VotesToken.mint(coreTeam1, 0);
erc721VotesToken.mint(coreTeam2, 1);
erc721VotesToken.mint(coreTeam3, 2);
erc721VotesToken.mint(coreTeam4, 3);

// Mine block so that the ERC20 and ERC721 supply will be available when doing a past timestamp check.
mineBlock();
Expand Down

0 comments on commit b3e13e8

Please sign in to comment.