Skip to content

Commit ca766d7

Browse files
committed
fix code to match new rules
1 parent 101f119 commit ca766d7

File tree

13 files changed

+25
-22
lines changed

13 files changed

+25
-22
lines changed

contracts/governance/Governor.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
653653
* in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake.
654654
* Note that if the executor is simply the governor itself, use of `relay` is redundant.
655655
*/
656-
function relay(address target, uint256 value, bytes calldata data) external payable virtual onlyGovernance {
656+
function relay(address target, uint256 value, bytes calldata data) public payable virtual onlyGovernance {
657657
(bool success, bytes memory returndata) = target.call{value: value}(data);
658658
Address.verifyCallResult(success, returndata);
659659
}

contracts/governance/TimelockController.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder {
2626
bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE");
2727
bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE");
2828
bytes32 public constant CANCELLER_ROLE = keccak256("CANCELLER_ROLE");
29-
uint256 internal constant _DONE_TIMESTAMP = uint256(1);
29+
uint256 internal constant DONE_TIMESTAMP = uint256(1);
3030

3131
mapping(bytes32 id => uint256) private _timestamps;
3232
uint256 private _minDelay;
@@ -207,7 +207,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder {
207207
uint256 timestamp = getTimestamp(id);
208208
if (timestamp == 0) {
209209
return OperationState.Unset;
210-
} else if (timestamp == _DONE_TIMESTAMP) {
210+
} else if (timestamp == DONE_TIMESTAMP) {
211211
return OperationState.Done;
212212
} else if (timestamp > block.timestamp) {
213213
return OperationState.Waiting;
@@ -432,7 +432,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder {
432432
if (!isOperationReady(id)) {
433433
revert TimelockUnexpectedOperationState(id, _encodeStateBitmap(OperationState.Ready));
434434
}
435-
_timestamps[id] = _DONE_TIMESTAMP;
435+
_timestamps[id] = DONE_TIMESTAMP;
436436
}
437437

438438
/**
@@ -445,7 +445,7 @@ contract TimelockController is AccessControl, ERC721Holder, ERC1155Holder {
445445
* - the caller must be the timelock itself. This can only be achieved by scheduling and later executing
446446
* an operation where the timelock is the target and the data is the ABI-encoded call to this function.
447447
*/
448-
function updateDelay(uint256 newDelay) external virtual {
448+
function updateDelay(uint256 newDelay) public virtual {
449449
address sender = _msgSender();
450450
if (sender != address(this)) {
451451
revert TimelockUnauthorizedCaller(sender);

contracts/governance/extensions/GovernorTimelockCompound.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ abstract contract GovernorTimelockCompound is Governor {
136136
/**
137137
* @dev Accept admin right over the timelock.
138138
*/
139-
// solhint-disable-next-line private-vars-leading-underscore
139+
// solhint-disable-next-line openzeppelin/leading-underscore
140140
function __acceptAdmin() public {
141141
_timelock.acceptAdmin();
142142
}
@@ -154,7 +154,7 @@ abstract contract GovernorTimelockCompound is Governor {
154154
155155
* CAUTION: It is not recommended to change the timelock while there are other queued governance proposals.
156156
*/
157-
function updateTimelock(ICompoundTimelock newTimelock) external virtual onlyGovernance {
157+
function updateTimelock(ICompoundTimelock newTimelock) public virtual onlyGovernance {
158158
_updateTimelock(newTimelock);
159159
}
160160

contracts/governance/extensions/GovernorTimelockControl.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ abstract contract GovernorTimelockControl is Governor {
146146
*
147147
* CAUTION: It is not recommended to change the timelock while there are other queued governance proposals.
148148
*/
149-
function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance {
149+
function updateTimelock(TimelockController newTimelock) public virtual onlyGovernance {
150150
_updateTimelock(newTimelock);
151151
}
152152

contracts/governance/extensions/GovernorVotesQuorumFraction.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes {
7373
* - Must be called through a governance proposal.
7474
* - New numerator must be smaller or equal to the denominator.
7575
*/
76-
function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance {
76+
function updateQuorumNumerator(uint256 newQuorumNumerator) public virtual onlyGovernance {
7777
_updateQuorumNumerator(newQuorumNumerator);
7878
}
7979

contracts/metatx/ERC2771Forwarder.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ contract ERC2771Forwarder is EIP712, Nonces {
6161
bytes signature;
6262
}
6363

64-
bytes32 internal constant _FORWARD_REQUEST_TYPEHASH =
64+
bytes32 internal constant FORWARD_REQUEST_TYPEHASH =
6565
keccak256(
6666
"ForwardRequest(address from,address to,uint256 value,uint256 gas,uint256 nonce,uint48 deadline,bytes data)"
6767
);
@@ -222,7 +222,7 @@ contract ERC2771Forwarder is EIP712, Nonces {
222222
(address recovered, ECDSA.RecoverError err, ) = _hashTypedDataV4(
223223
keccak256(
224224
abi.encode(
225-
_FORWARD_REQUEST_TYPEHASH,
225+
FORWARD_REQUEST_TYPEHASH,
226226
request.from,
227227
request.to,
228228
request.value,

contracts/mocks/proxy/UUPSUpgradeableMock.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ contract UUPSUpgradeableUnsafeMock is UUPSUpgradeableMock {
2929
}
3030

3131
contract UUPSUnsupportedProxiableUUID is UUPSUpgradeableMock {
32-
function proxiableUUID() external pure override returns (bytes32) {
32+
function proxiableUUID() public pure override returns (bytes32) {
3333
return keccak256("invalid UUID");
3434
}
3535
}

contracts/proxy/utils/UUPSUpgradeable.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ abstract contract UUPSUpgradeable is IERC1822Proxiable {
6969
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
7070
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
7171
*/
72-
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
72+
function proxiableUUID() public view virtual notDelegated returns (bytes32) {
7373
return ERC1967Utils.IMPLEMENTATION_SLOT;
7474
}
7575

contracts/token/ERC20/extensions/ERC20Permit.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces {
7171

7272
/// @inheritdoc IERC20Permit
7373
// solhint-disable-next-line func-name-mixedcase
74-
function DOMAIN_SEPARATOR() external view virtual returns (bytes32) {
74+
function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
7575
return _domainSeparatorV4();
7676
}
7777
}

contracts/utils/Base64.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ library Base64 {
1111
* @dev Base64 Encoding/Decoding Table
1212
* See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648
1313
*/
14-
string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15-
string internal constant _TABLE_URL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
14+
string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
15+
string internal constant TABLE_URL = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
1616

1717
/**
1818
* @dev Converts a `bytes` to its Bytes64 `string` representation.
1919
*/
2020
function encode(bytes memory data) internal pure returns (string memory) {
21-
return _encode(data, _TABLE, true);
21+
return _encode(data, TABLE, true);
2222
}
2323

2424
/**
2525
* @dev Converts a `bytes` to its Bytes64Url `string` representation.
2626
* Output is not padded with `=` as specified in https://www.rfc-editor.org/rfc/rfc4648[rfc4648].
2727
*/
2828
function encodeURL(bytes memory data) internal pure returns (string memory) {
29-
return _encode(data, _TABLE_URL, false);
29+
return _encode(data, TABLE_URL, false);
3030
}
3131

3232
/**

0 commit comments

Comments
 (0)