diff --git a/src/IERC5805Modified.sol b/src/IERC5805Modified.sol deleted file mode 100644 index 32097d0..0000000 --- a/src/IERC5805Modified.sol +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.20; - -import {IVotesPartialDelegation} from "src/IVotesPartialDelegation.sol"; -import {IERC6372} from "@openzeppelin/contracts/interfaces/IERC6372.sol"; - -/** - * @dev Interface that mostly supports the ERC5805 standard, but with a modified IVotes that more appropriately - * describes partial delegation. - */ -interface IERC5805Modified is IERC6372, IVotesPartialDelegation {} diff --git a/src/IVotesPartialDelegation.sol b/src/IVotesPartialDelegation.sol index cf02bad..d7f9208 100644 --- a/src/IVotesPartialDelegation.sol +++ b/src/IVotesPartialDelegation.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; +import {IERC6372} from "@openzeppelin/contracts/interfaces/IERC6372.sol"; + struct PartialDelegation { address _delegatee; uint96 _numerator; @@ -14,7 +16,7 @@ struct DelegationAdjustment { /** * @dev Common interface for {ERC20VotesPartialDelegation} and other {VotesPartialDelegation}-enabled contracts. */ -interface IVotesPartialDelegation { +interface IVotesPartialDelegation is IERC6372 { /** * @dev The signature used has expired. */ diff --git a/src/VotesPartialDelegationUpgradeable.sol b/src/VotesPartialDelegationUpgradeable.sol index 7078a42..01812ed 100644 --- a/src/VotesPartialDelegationUpgradeable.sol +++ b/src/VotesPartialDelegationUpgradeable.sol @@ -1,7 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; -import {IERC5805Modified} from "src/IERC5805Modified.sol"; import {ContextUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import {NoncesUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/NoncesUpgradeable.sol"; import {EIP712Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol"; @@ -10,8 +9,9 @@ import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {Time} from "@openzeppelin/contracts/utils/types/Time.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; -import {PartialDelegation, DelegationAdjustment} from "src/IVotesPartialDelegation.sol"; import {SignatureChecker} from "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; +import {PartialDelegation, DelegationAdjustment} from "src/IVotesPartialDelegation.sol"; +import {IVotesPartialDelegation} from "src/IVotesPartialDelegation.sol"; /** * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be @@ -36,7 +36,7 @@ abstract contract VotesPartialDelegationUpgradeable is ContextUpgradeable, EIP712Upgradeable, NoncesUpgradeable, - IERC5805Modified + IVotesPartialDelegation { using Checkpoints for Checkpoints.Trace208;