Skip to content

Commit

Permalink
feat: remove no needed code on the setup contact
Browse files Browse the repository at this point in the history
  • Loading branch information
clauBv23 committed May 10, 2024
1 parent db790e2 commit 5ccf42f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions packages/contracts/src/TokenVotingSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,7 @@ contract TokenVotingSetup is PluginUpgradeableSetup {
revert WrongHelpersArrayLength({length: helperLength});
}

// token can be either GovernanceERC20, GovernanceWrappedERC20, or IVotesUpgradeable, which
// does not follow the GovernanceERC20 and GovernanceWrappedERC20 standard.
address token = _payload.currentHelpers[0];

bool[] memory supportedIds = _getTokenInterfaceIds(token);

bool isGovernanceERC20 = supportedIds[0] && supportedIds[1] && !supportedIds[2];

permissions = new PermissionLib.MultiTargetPermission[](isGovernanceERC20 ? 3 : 2);
permissions = new PermissionLib.MultiTargetPermission[](2);

// Set permissions to be Revoked.
permissions[0] = PermissionLib.MultiTargetPermission({
Expand Down

0 comments on commit 5ccf42f

Please sign in to comment.