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

refactor: caster initializes with caster config #69

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a3d9e07
added set quorum fns
dd0sxx Dec 12, 2023
af9c1ef
SetQuorumPct
dd0sxx Dec 12, 2023
2bb3f4e
SetQuorumPct 721
dd0sxx Dec 12, 2023
cbce3da
compiles without tests
dd0sxx Dec 13, 2023
b48750e
tests work
dd0sxx Dec 13, 2023
cccded6
fmt
dd0sxx Dec 13, 2023
8f59376
pushing changes
dd0sxx Dec 13, 2023
c16d10e
builds w no tests
dd0sxx Dec 14, 2023
264218e
got rid of hardcoded 1/3 / 2/3 periods
dd0sxx Dec 14, 2023
228f830
added internal fn
dd0sxx Dec 14, 2023
83825c6
init to default value
dd0sxx Dec 14, 2023
66d1bdc
Merge branch 'main' into theo/update-submission-period
dd0sxx Dec 14, 2023
62e48c6
uint48
dd0sxx Dec 14, 2023
8e06643
added view fns
dd0sxx Dec 14, 2023
69117cf
so close
dd0sxx Dec 15, 2023
1550514
5 MOORE
dd0sxx Dec 15, 2023
aba8341
CLOSER
dd0sxx Dec 15, 2023
d2e978c
YES
dd0sxx Dec 15, 2023
1f2823f
new tests added
dd0sxx Dec 15, 2023
abe2676
Merge branch 'main' into theo/update-submission-period
dd0sxx Dec 15, 2023
a109d5d
fix
dd0sxx Dec 15, 2023
6dd31ff
comment
dd0sxx Dec 15, 2023
f028e5f
Update PeriodPctCheckpoints.sol
dd0sxx Dec 15, 2023
6960a96
Update PeriodPctCheckpoints.sol
dd0sxx Dec 15, 2023
84b362f
Update src/lib/QuorumCheckpoints.sol
0xrajath Dec 15, 2023
448bc49
delayPeriodTimestamp weight
dd0sxx Dec 15, 2023
3a4c010
added weight test
dd0sxx Dec 15, 2023
88946da
tests
dd0sxx Dec 15, 2023
a000c44
test
dd0sxx Dec 15, 2023
4eaf6a1
test
dd0sxx Dec 15, 2023
0d50295
comments and insert return fn
dd0sxx Dec 15, 2023
8e546f6
comments
dd0sxx Dec 15, 2023
ddd9839
fixed
dd0sxx Dec 15, 2023
a968f38
config
dd0sxx Dec 15, 2023
982eeb3
fix
dd0sxx Dec 15, 2023
9d98d61
fix
dd0sxx Dec 15, 2023
b3e60bc
Merge branch 'main' into theo/caster-config
dd0sxx Dec 15, 2023
474ebc4
comment
dd0sxx Dec 15, 2023
04d3310
Update src/token-voting/LlamaTokenCaster.sol
dd0sxx Dec 15, 2023
8d8fc6b
fmt
dd0sxx Dec 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/lib/Structs.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ struct Action {
uint96 totalDisapprovals; // The total quantity of policyholder disapprovals.
}

/// @dev Quorum and period data for token voting caster contracts.
struct CasterConfig {
uint16 voteQuorumPct;
uint16 vetoQuorumPct;
uint16 delayPeriodPct;
uint16 castingPeriodPct;
uint16 submissionPeriodPct;
}

/// @dev Data that represents a permission.
struct PermissionData {
address target; // Contract being called by an action.
Expand Down
9 changes: 4 additions & 5 deletions src/token-voting/LlamaERC20TokenCaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.23;
import {ERC20Votes} from "@openzeppelin/token/ERC20/extensions/ERC20Votes.sol";

import {ILlamaCore} from "src/interfaces/ILlamaCore.sol";
import {CasterConfig} from "src/lib/Structs.sol";
import {ILlamaTokenClockAdapter} from "src/token-voting/ILlamaTokenClockAdapter.sol";
import {LlamaTokenCaster} from "src/token-voting/LlamaTokenCaster.sol";

Expand All @@ -27,17 +28,15 @@ contract LlamaERC20TokenCaster is LlamaTokenCaster {
/// @param _token The ERC20 token to be used for voting.
/// @param _llamaCore The `LlamaCore` contract for this Llama instance.
/// @param _role The role used by this contract to cast approvals and disapprovals.
/// @param _voteQuorumPct The minimum % of votes required to submit an approval to `LlamaCore`.
/// @param _vetoQuorumPct The minimum % of vetoes required to submit a disapproval to `LlamaCore`.
/// @param casterConfig Contains the quorum and period pct values to initialize the contract with.
function initialize(
ERC20Votes _token,
ILlamaCore _llamaCore,
ILlamaTokenClockAdapter _clockAdapter,
uint8 _role,
uint16 _voteQuorumPct,
uint16 _vetoQuorumPct
CasterConfig memory casterConfig
) external initializer {
__initializeLlamaTokenCasterMinimalProxy(_llamaCore, _clockAdapter, _role, _voteQuorumPct, _vetoQuorumPct);
__initializeLlamaTokenCasterMinimalProxy(_llamaCore, _clockAdapter, _role, casterConfig);
token = _token;
uint256 totalSupply = token.getPastTotalSupply(_currentTimepointMinusOne());
if (totalSupply == 0) revert InvalidTokenAddress();
Expand Down
9 changes: 4 additions & 5 deletions src/token-voting/LlamaERC721TokenCaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {ERC721Votes} from "@openzeppelin/token/ERC721/extensions/ERC721Votes.sol
import {IERC721} from "@openzeppelin/token/ERC721/IERC721.sol";

import {ILlamaCore} from "src/interfaces/ILlamaCore.sol";
import {CasterConfig} from "src/lib/Structs.sol";
import {ILlamaTokenClockAdapter} from "src/token-voting/ILlamaTokenClockAdapter.sol";
import {LlamaTokenCaster} from "src/token-voting/LlamaTokenCaster.sol";
/// @title LlamaERC721TokenCaster
Expand All @@ -28,17 +29,15 @@ contract LlamaERC721TokenCaster is LlamaTokenCaster {
/// @param _token The ERC721 token to be used for voting.
/// @param _llamaCore The `LlamaCore` contract for this Llama instance.
/// @param _role The role used by this contract to cast approvals and disapprovals.
/// @param _voteQuorumPct The minimum % of votes required to submit an approval to `LlamaCore`.
/// @param _vetoQuorumPct The minimum % of vetoes required to submit a disapproval to `LlamaCore`.
/// @param casterConfig Contains the quorum and period pct values to initialize the contract with.
function initialize(
ERC721Votes _token,
ILlamaCore _llamaCore,
ILlamaTokenClockAdapter _clockAdapter,
uint8 _role,
uint16 _voteQuorumPct,
uint16 _vetoQuorumPct
CasterConfig memory casterConfig
) external initializer {
__initializeLlamaTokenCasterMinimalProxy(_llamaCore, _clockAdapter, _role, _voteQuorumPct, _vetoQuorumPct);
__initializeLlamaTokenCasterMinimalProxy(_llamaCore, _clockAdapter, _role, casterConfig);
token = _token;
if (!token.supportsInterface(type(IERC721).interfaceId)) revert InvalidTokenAddress();
uint256 totalSupply = token.getPastTotalSupply(_currentTimepointMinusOne());
Expand Down
12 changes: 6 additions & 6 deletions src/token-voting/LlamaTokenCaster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {ILlamaCore} from "src/interfaces/ILlamaCore.sol";
import {ILlamaTokenClockAdapter} from "src/token-voting/ILlamaTokenClockAdapter.sol";
import {ActionState, VoteType} from "src/lib/Enums.sol";
import {LlamaUtils} from "src/lib/LlamaUtils.sol";
import {CasterConfig} from "src/lib/Structs.sol";
import {PeriodPctCheckpoints} from "src/lib/PeriodPctCheckpoints.sol";
import {QuorumCheckpoints} from "src/lib/QuorumCheckpoints.sol";
import {Action, ActionInfo} from "src/lib/Structs.sol";
Expand Down Expand Up @@ -197,23 +198,22 @@ abstract contract LlamaTokenCaster is Initializable {
/// @dev This will be called by the `initialize` of the inheriting contract.
/// @param _llamaCore The `LlamaCore` contract for this Llama instance.
/// @param _role The role used by this contract to cast approvals and disapprovals.
/// @param _voteQuorumPct The minimum % of votes required to submit an approval to `LlamaCore`.
/// @param _vetoQuorumPct The minimum % of vetoes required to submit a disapproval to `LlamaCore`.
/// @param casterConfig Contains the quorum and period pct values to initialize the contract with.
function __initializeLlamaTokenCasterMinimalProxy(
ILlamaCore _llamaCore,
ILlamaTokenClockAdapter _clockAdapter,
uint8 _role,
uint16 _voteQuorumPct,
uint16 _vetoQuorumPct
CasterConfig memory casterConfig
) internal {
if (_llamaCore.actionsCount() < 0) revert InvalidLlamaCoreAddress();
if (_role > _llamaCore.policy().numRoles()) revert RoleNotInitialized(_role);

llamaCore = _llamaCore;
clockAdapter = _clockAdapter;
role = _role;
_setQuorumPct(_voteQuorumPct, _vetoQuorumPct);
_setPeriodPcts(2500, 5000, 2500); // default to 25% delay, 50% casting, 25% submission periods
_setQuorumPct(casterConfig.voteQuorumPct, casterConfig.vetoQuorumPct);
_setPeriodPcts(casterConfig.delayPeriodPct, casterConfig.castingPeriodPct, casterConfig.submissionPeriodPct); // default
// to 25% delay, 50% casting, 25% submission periods
dd0sxx marked this conversation as resolved.
Show resolved Hide resolved
}

// ===========================================
Expand Down
25 changes: 9 additions & 16 deletions src/token-voting/LlamaTokenVotingFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {ERC20Votes} from "@openzeppelin/token/ERC20/extensions/ERC20Votes.sol";
import {ERC721Votes} from "@openzeppelin/token/ERC721/extensions/ERC721Votes.sol";

import {ILlamaCore} from "src/interfaces/ILlamaCore.sol";
import {CasterConfig} from "src/lib/Structs.sol";
import {ILlamaTokenClockAdapter} from "src/token-voting/ILlamaTokenClockAdapter.sol";
import {LlamaERC20TokenActionCreator} from "src/token-voting/LlamaERC20TokenActionCreator.sol";
import {LlamaERC20TokenCaster} from "src/token-voting/LlamaERC20TokenCaster.sol";
Expand Down Expand Up @@ -64,8 +65,7 @@ contract LlamaTokenVotingFactory {
///@param actionCreatorRole The role required by the `LlamaTokenActionCreator` to create an action.
///@param casterRole The role required by the `LlamaTokenCaster` to cast approvals and disapprovals.
///@param creationThreshold The number of tokens required to create an action.
///@param voteQuorumPct The minimum percentage of tokens required to approve an action.
///@param vetoQuorumPct The minimum percentage of tokens required to disapprove an action.
///@param casterConfig Contains the quorum and period pct values to initialize the contract with.
function deploy(
ILlamaCore llamaCore,
address token,
Expand All @@ -75,8 +75,7 @@ contract LlamaTokenVotingFactory {
uint8 actionCreatorRole,
uint8 casterRole,
uint256 creationThreshold,
uint16 voteQuorumPct,
uint16 vetoQuorumPct
CasterConfig memory casterConfig
) external returns (address actionCreator, address caster) {
if (isERC20) {
actionCreator = address(
Expand All @@ -85,9 +84,7 @@ contract LlamaTokenVotingFactory {
)
);
caster = address(
_deployLlamaERC20TokenCaster(
ERC20Votes(token), llamaCore, clockAdapter, nonce, casterRole, voteQuorumPct, vetoQuorumPct
)
_deployLlamaERC20TokenCaster(ERC20Votes(token), llamaCore, clockAdapter, nonce, casterRole, casterConfig)
);
} else {
actionCreator = address(
Expand All @@ -96,9 +93,7 @@ contract LlamaTokenVotingFactory {
)
);
caster = address(
_deployLlamaERC721TokenCaster(
ERC721Votes(token), llamaCore, clockAdapter, nonce, casterRole, voteQuorumPct, vetoQuorumPct
)
_deployLlamaERC721TokenCaster(ERC721Votes(token), llamaCore, clockAdapter, nonce, casterRole, casterConfig)
);
}

Expand Down Expand Up @@ -164,16 +159,15 @@ contract LlamaTokenVotingFactory {
ILlamaTokenClockAdapter clockAdapter,
uint256 nonce,
uint8 role,
uint16 voteQuorumPct,
uint16 vetoQuorumPct
CasterConfig memory casterConfig
) internal returns (LlamaERC20TokenCaster caster) {
caster = LlamaERC20TokenCaster(
Clones.cloneDeterministic(
address(ERC20_TOKEN_CASTER_LOGIC),
keccak256(abi.encodePacked(msg.sender, address(llamaCore), address(token), nonce))
)
);
caster.initialize(token, llamaCore, clockAdapter, role, voteQuorumPct, vetoQuorumPct);
caster.initialize(token, llamaCore, clockAdapter, role, casterConfig);
}

/// @dev Deploys and initiliazes a new `LlamaERC721TokenCaster` clone.
Expand All @@ -183,15 +177,14 @@ contract LlamaTokenVotingFactory {
ILlamaTokenClockAdapter clockAdapter,
uint256 nonce,
uint8 role,
uint16 voteQuorumPct,
uint16 vetoQuorumPct
CasterConfig memory casterConfig
) internal returns (LlamaERC721TokenCaster caster) {
caster = LlamaERC721TokenCaster(
Clones.cloneDeterministic(
address(ERC721_TOKEN_CASTER_LOGIC),
keccak256(abi.encodePacked(msg.sender, address(llamaCore), address(token), nonce))
)
);
caster.initialize(token, llamaCore, clockAdapter, role, voteQuorumPct, vetoQuorumPct);
caster.initialize(token, llamaCore, clockAdapter, role, casterConfig);
}
}
8 changes: 4 additions & 4 deletions test/token-voting/LlamaERC20TokenCaster.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ contract CastVote is LlamaERC20TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC20_VOTE_QUORUM_PCT, ERC20_VETO_QUORUM_PCT
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);

vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
Expand Down Expand Up @@ -332,7 +332,7 @@ contract CastVeto is LlamaERC20TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC20_VOTE_QUORUM_PCT, ERC20_VETO_QUORUM_PCT
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);

vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
Expand Down Expand Up @@ -594,7 +594,7 @@ contract SubmitApprovals is LlamaERC20TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC20_VOTE_QUORUM_PCT, ERC20_VETO_QUORUM_PCT
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);
vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
casterWithWrongRole.submitApproval(actionInfo);
Expand Down Expand Up @@ -679,7 +679,7 @@ contract SubmitDisapprovals is LlamaERC20TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC20_VOTE_QUORUM_PCT, ERC20_VETO_QUORUM_PCT
erc20VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);
vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
casterWithWrongRole.submitDisapproval(actionInfo);
Expand Down
8 changes: 4 additions & 4 deletions test/token-voting/LlamaERC721TokenCaster.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ contract CastVote is LlamaERC721TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC721_VOTE_QUORUM_PCT, ERC721_VETO_QUORUM_PCT
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);

vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
Expand Down Expand Up @@ -332,7 +332,7 @@ contract CastVeto is LlamaERC721TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC721_VOTE_QUORUM_PCT, ERC721_VETO_QUORUM_PCT
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);

vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
Expand Down Expand Up @@ -592,7 +592,7 @@ contract SubmitApprovals is LlamaERC721TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC721_VOTE_QUORUM_PCT, ERC721_VETO_QUORUM_PCT
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);
vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
casterWithWrongRole.submitApproval(actionInfo);
Expand Down Expand Up @@ -677,7 +677,7 @@ contract SubmitDisapprovals is LlamaERC721TokenCasterTest {
)
);
casterWithWrongRole.initialize(
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, ERC721_VOTE_QUORUM_PCT, ERC721_VETO_QUORUM_PCT
erc721VotesToken, CORE, LLAMA_TOKEN_TIMESTAMP_ADAPTER, madeUpRole, defaultCasterConfig
);
vm.expectRevert(abi.encodeWithSelector(ILlamaRelativeStrategyBase.InvalidRole.selector, tokenVotingCasterRole));
casterWithWrongRole.submitDisapproval(actionInfo);
Expand Down
15 changes: 5 additions & 10 deletions test/token-voting/LlamaTokenVotingFactory.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ contract DeployTokenVotingModule is LlamaTokenVotingFactoryTest {
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC20_CREATION_THRESHOLD,
ERC20_VOTE_QUORUM_PCT,
ERC20_VETO_QUORUM_PCT
defaultCasterConfig
);
ActionInfo memory actionInfo = _setPermissionCreateApproveAndQueueAction(data);

Expand Down Expand Up @@ -168,8 +167,7 @@ contract DeployTokenVotingModule is LlamaTokenVotingFactoryTest {
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC721_CREATION_THRESHOLD,
ERC721_VOTE_QUORUM_PCT,
ERC721_VETO_QUORUM_PCT
defaultCasterConfig
);
ActionInfo memory actionInfo = _setPermissionCreateApproveAndQueueAction(data);

Expand Down Expand Up @@ -271,8 +269,7 @@ contract DeployTokenVotingModule is LlamaTokenVotingFactoryTest {
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC20_CREATION_THRESHOLD,
ERC20_VOTE_QUORUM_PCT,
ERC20_VETO_QUORUM_PCT
defaultCasterConfig
);

assertEq(address(llamaERC20TokenActionCreator.token()), address(erc20VotesToken));
Expand Down Expand Up @@ -303,8 +300,7 @@ contract DeployTokenVotingModule is LlamaTokenVotingFactoryTest {
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC20_CREATION_THRESHOLD,
ERC20_VOTE_QUORUM_PCT,
ERC20_VETO_QUORUM_PCT
defaultCasterConfig
);

ActionInfo memory actionInfo = _setPermissionCreateApproveAndQueueAction(data);
Expand Down Expand Up @@ -357,8 +353,7 @@ contract DeployTokenVotingModule is LlamaTokenVotingFactoryTest {
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC20_CREATION_THRESHOLD,
ERC20_VOTE_QUORUM_PCT,
ERC20_VETO_QUORUM_PCT
defaultCasterConfig
);

actionInfo = _setPermissionCreateApproveAndQueueAction(data);
Expand Down
18 changes: 13 additions & 5 deletions test/token-voting/LlamaTokenVotingTestSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {LlamaPeripheryTestSetup} from "test/LlamaPeripheryTestSetup.sol";

import {DeployLlamaTokenVotingFactory} from "script/DeployLlamaTokenVotingFactory.s.sol";

import {ActionInfo} from "src/lib/Structs.sol";
import {ActionInfo, CasterConfig} from "src/lib/Structs.sol";
import {ILlamaPolicy} from "src/interfaces/ILlamaPolicy.sol";
import {ILlamaRelativeStrategyBase} from "src/interfaces/ILlamaRelativeStrategyBase.sol";
import {ILlamaStrategy} from "src/interfaces/ILlamaStrategy.sol";
Expand Down Expand Up @@ -46,6 +46,8 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
MockERC20Votes public erc20VotesToken;
MockERC721Votes public erc721VotesToken;

CasterConfig public defaultCasterConfig;

// Token Voting Roles
uint8 tokenVotingActionCreatorRole;
uint8 tokenVotingCasterRole;
Expand Down Expand Up @@ -73,6 +75,14 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
erc20VotesToken = new MockERC20Votes();
erc721VotesToken = new MockERC721Votes();

defaultCasterConfig = CasterConfig({
voteQuorumPct: ERC20_VOTE_QUORUM_PCT,
vetoQuorumPct: ERC20_VETO_QUORUM_PCT,
delayPeriodPct: uint16(ONE_QUARTER_IN_BPS),
castingPeriodPct: uint16(TWO_QUARTERS_IN_BPS),
submissionPeriodPct: uint16(ONE_QUARTER_IN_BPS)
});

//Deploy

// Setting up tokenholder addresses and private keys.
Expand Down Expand Up @@ -112,8 +122,7 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC20_CREATION_THRESHOLD,
ERC20_VOTE_QUORUM_PCT,
ERC20_VETO_QUORUM_PCT
defaultCasterConfig
);
// Assign roles to Token Voting Modules
POLICY.setRoleHolder(
Expand All @@ -140,8 +149,7 @@ contract LlamaTokenVotingTestSetup is LlamaPeripheryTestSetup, DeployLlamaTokenV
tokenVotingActionCreatorRole,
tokenVotingCasterRole,
ERC721_CREATION_THRESHOLD,
ERC721_VOTE_QUORUM_PCT,
ERC721_VETO_QUORUM_PCT
defaultCasterConfig
);
// Assign roles to Token Voting Modules
POLICY.setRoleHolder(
Expand Down
Loading