Skip to content

Commit 98407fc

Browse files
committed
Improving the constructor docs
1 parent 4ed3454 commit 98407fc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/TokenVoting.sol

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ contract TokenVoting is IMembership, MajorityVotingBase {
4646
/// @dev This method is required to support [ERC-1822](https://eips.ethereum.org/EIPS/eip-1822).
4747
/// @param _dao The IDAO interface of the associated DAO.
4848
/// @param _votingSettings The voting settings.
49-
/// @param _token The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token used for voting.
49+
/// @param _token The [ERC-20](https://eips.ethereum.org/EIPS/eip-20) token to use for voting.
50+
/// If the given token implements https://eips.ethereum.org/EIPS/eip-6372,
51+
/// then `CLOCK_MODE()` or `clock()` will determine the clock type used by the plugin.
52+
/// The token will be assumed to use a block number based clock otherwise.
5053
/// @param _targetConfig Configuration for the execution target, specifying the target address and operation type
5154
/// (either `Call` or `DelegateCall`). Defined by `TargetConfig` in the `IPlugin` interface,
5255
/// part of the `osx-commons-contracts` package, added in build 3.
@@ -66,8 +69,8 @@ contract TokenVoting is IMembership, MajorityVotingBase {
6669
votingToken = _token;
6770

6871
// Check if the given token indexes past voting power by blocks or by timestamp
69-
try IERC6372Upgradeable(address(_token)).CLOCK_MODE() returns (string memory ms) {
70-
if (keccak256(bytes(ms)) == keccak256(bytes("mode=timestamp"))) {
72+
try IERC6372Upgradeable(address(_token)).CLOCK_MODE() returns (string memory clockMode) {
73+
if (keccak256(bytes(clockMode)) == keccak256(bytes("mode=timestamp"))) {
7174
tokenIndexedByTimestamp = true;
7275
}
7376
} catch {

0 commit comments

Comments
 (0)