1- diff --git a/docs/3.4/diffs/ BaseDelegation.sol b/src/contracts/protocol/tokenization/delegation/BaseDelegation.sol
2- index c1a95d08..f15ccb69 100644
3- --- a/docs/3.4/diffs/ BaseDelegation.sol
1+ diff --git a/docs/3.4/BaseDelegation.sol b/src/contracts/protocol/tokenization/delegation/BaseDelegation.sol
2+ index c1a95d08..dae21a67 100644
3+ --- a/docs/3.4/BaseDelegation.sol
44+++ b/src/contracts/protocol/tokenization/delegation/BaseDelegation.sol
5- @@ -1,11 +1,14 @@
5+ @@ -1,11 +1,15 @@
66 // SPDX-License-Identifier: MIT
7- pragma solidity ^0.8.0;
7+ - pragma solidity ^0.8.0;
8+ + pragma solidity ^0.8.10;
89
9- - import {ECDSA} from 'openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol';
1010+ import {MessageHashUtils} from 'openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol';
11+ import {ECDSA} from 'openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol';
1112+ import {SafeCast} from 'openzeppelin-contracts/contracts/utils/math/SafeCast.sol';
1213
1314- import {SafeCast72} from './utils/SafeCast72.sol';
@@ -21,7 +22,7 @@ index c1a95d08..f15ccb69 100644
2122
2223 /**
2324 * @notice The contract implements generic delegation functionality for the upcoming governance v3
24- @@ -18,7 +21 ,7 @@ import {DelegationMode} from './DelegationAwareBalance.sol';
25+ @@ -18,7 +22 ,7 @@ import {DelegationMode} from './DelegationAwareBalance.sol';
2526 * otherwise at least POWER_SCALE_FACTOR should be adjusted !!!
2627 * *************************************************************
2728 */
@@ -30,7 +31,7 @@ index c1a95d08..f15ccb69 100644
3031 struct DelegationState {
3132 uint72 delegatedPropositionBalance;
3233 uint72 delegatedVotingBalance;
33- @@ -81,7 +84 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
34+ @@ -81,7 +85 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
3435 DelegationState memory delegationState
3536 ) internal virtual;
3637
@@ -39,7 +40,7 @@ index c1a95d08..f15ccb69 100644
3940 function delegateByType(
4041 address delegatee,
4142 GovernancePowerType delegationType
42- @@ -89,13 +92 ,13 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
43+ @@ -89,13 +93 ,13 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
4344 _delegateByType(msg.sender, delegatee, delegationType);
4445 }
4546
@@ -55,7 +56,7 @@ index c1a95d08..f15ccb69 100644
5556 function getDelegateeByType(
5657 address delegator,
5758 GovernancePowerType delegationType
58- @@ -103,7 +106 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
59+ @@ -103,7 +107 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
5960 return _getDelegateeByType(delegator, _getDelegationState(delegator), delegationType);
6061 }
6162
@@ -64,7 +65,7 @@ index c1a95d08..f15ccb69 100644
6465 function getDelegates(address delegator) external view override returns (address, address) {
6566 DelegationState memory delegatorBalance = _getDelegationState(delegator);
6667 return (
67- @@ -112,7 +115 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
68+ @@ -112,7 +116 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
6869 );
6970 }
7071
@@ -73,7 +74,7 @@ index c1a95d08..f15ccb69 100644
7374 function getPowerCurrent(
7475 address user,
7576 GovernancePowerType delegationType
76- @@ -122,10 +125 ,12 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
77+ @@ -122,10 +126 ,12 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
7778 ? _getBalance(user)
7879 : 0;
7980 uint256 userDelegatedPower = _getDelegatedPowerByType(userState, delegationType);
@@ -87,7 +88,7 @@ index c1a95d08..f15ccb69 100644
8788 function getPowersCurrent(address user) external view override returns (uint256, uint256) {
8889 return (
8990 getPowerCurrent(user, GovernancePowerType.VOTING),
90- @@ -133,7 +138 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
91+ @@ -133,7 +139 ,7 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
9192 );
9293 }
9394
@@ -96,7 +97,7 @@ index c1a95d08..f15ccb69 100644
9697 function metaDelegateByType(
9798 address delegator,
9899 address delegatee,
99- @@ -143,10 +148 ,11 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
100+ @@ -143,10 +149 ,11 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
100101 bytes32 r,
101102 bytes32 s
102103 ) external override {
@@ -111,12 +112,12 @@ index c1a95d08..f15ccb69 100644
111112 _getDomainSeparator(),
112113 keccak256(
113114 abi.encode(
114- @@ -160,11 +166 ,12 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
115+ @@ -160,11 +167 ,12 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
115116 )
116117 );
117118
118119- require(delegator == ECDSA.recover(digest, v, r, s), 'INVALID_SIGNATURE');
119- + require(delegator == ecrecover (digest, v, r, s), Errors.InvalidSignature());
120+ + require(delegator == ECDSA.recover (digest, v, r, s), Errors.InvalidSignature());
120121+
121122 _delegateByType(delegator, delegatee, delegationType);
122123 }
@@ -126,7 +127,7 @@ index c1a95d08..f15ccb69 100644
126127 function metaDelegate(
127128 address delegator,
128129 address delegatee,
129- @@ -173,17 +180 ,19 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
130+ @@ -173,17 +181 ,19 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
130131 bytes32 r,
131132 bytes32 s
132133 ) external override {
@@ -145,12 +146,12 @@ index c1a95d08..f15ccb69 100644
145146 );
146147
147148- require(delegator == ECDSA.recover(digest, v, r, s), 'INVALID_SIGNATURE');
148- + require(delegator == ecrecover (digest, v, r, s), Errors.InvalidSignature());
149+ + require(delegator == ECDSA.recover (digest, v, r, s), Errors.InvalidSignature());
149150+
150151 _delegateByType(delegator, delegatee, GovernancePowerType.VOTING);
151152 _delegateByType(delegator, delegatee, GovernancePowerType.PROPOSITION);
152153 }
153- @@ -213,10 +222 ,10 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
154+ @@ -213,10 +223 ,10 @@ abstract contract BaseDelegation is IGovernancePowerDelegationToken {
154155
155156 // we use uint72, because this is the most optimal for AaveTokenV3
156157 // To make delegated balance fit into uint72 we're decreasing precision of delegated balance by POWER_SCALE_FACTOR
0 commit comments