You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
892 B
29 lines
892 B
2 years ago
|
// SPDX-License-Identifier: MIT
|
||
|
|
||
|
pragma solidity ^0.8.0;
|
||
|
|
||
|
import "../../token/ERC20/extensions/ERC20Votes.sol";
|
||
|
import "../../token/ERC721/extensions/ERC721Votes.sol";
|
||
|
|
||
|
abstract contract ERC20VotesTimestampMock is ERC20Votes {
|
||
|
function clock() public view virtual override returns (uint48) {
|
||
|
return SafeCast.toUint48(block.timestamp);
|
||
|
}
|
||
|
|
||
|
// solhint-disable-next-line func-name-mixedcase
|
||
|
function CLOCK_MODE() public view virtual override returns (string memory) {
|
||
|
return "mode=timestamp";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
abstract contract ERC721VotesTimestampMock is ERC721Votes {
|
||
|
function clock() public view virtual override returns (uint48) {
|
||
|
return SafeCast.toUint48(block.timestamp);
|
||
|
}
|
||
|
|
||
|
// solhint-disable-next-line func-name-mixedcase
|
||
|
function CLOCK_MODE() public view virtual override returns (string memory) {
|
||
|
return "mode=timestamp";
|
||
|
}
|
||
|
}
|