Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
2d97b6b4
Commit
2d97b6b4
authored
Jan 31, 2022
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Plain Diff
Merge upstream release-v4.5 into patched/release-v4.5
parents
5a8b8399
863ded1d
6b6e1b5e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
198 deletions
+48
-198
docs.yml
.github/workflows/docs.yml
+3
-2
SignatureChecker.sol
contracts/utils/cryptography/SignatureChecker.sol
+10
-6
update-docs-branch.js
scripts/update-docs-branch.js
+11
-11
02-add-missing-mock-arguments.patch
...pts/upgradeable/patch/02-add-missing-mock-arguments.patch
+5
-5
03-remove-erc20votes-chained-init.patch
...upgradeable/patch/03-remove-erc20votes-chained-init.patch
+0
-17
04-remove-erc20votes-comp-chained-init.patch
...deable/patch/04-remove-erc20votes-comp-chained-init.patch
+0
-18
05-fix-governor-initializers.patch
scripts/upgradeable/patch/05-fix-governor-initializers.patch
+19
-139
No files found.
.github/workflows/docs.yml
View file @
2d97b6b4
name
:
Build Docs
name
:
Build Docs
on
:
on
:
push
:
release-v*
push
:
branches
:
[
release-v*
]
jobs
:
jobs
:
trigger
:
build
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
...
...
contracts/utils/cryptography/SignatureChecker.sol
View file @
2d97b6b4
...
@@ -8,16 +8,20 @@ import "../Address.sol";
...
@@ -8,16 +8,20 @@ import "../Address.sol";
import "../../interfaces/IERC1271.sol";
import "../../interfaces/IERC1271.sol";
/**
/**
* @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and
* @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA
* ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with
* signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like
* smart contract wallets such as Argent and Gnosis.
* Argent and Gnosis Safe.
*
* Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change
* through time. It could return true at block N and false at block N+1 (or the opposite).
*
*
* _Available since v4.1._
* _Available since v4.1._
*/
*/
library SignatureChecker {
library SignatureChecker {
/**
* @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the
* signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`.
*
* NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus
* change through time. It could return true at block N and false at block N+1 (or the opposite).
*/
function isValidSignatureNow(
function isValidSignatureNow(
address signer,
address signer,
bytes32 hash,
bytes32 hash,
...
...
scripts/update-docs-branch.js
View file @
2d97b6b4
...
@@ -5,16 +5,16 @@ const tryRead = cmd => { try { return read(cmd); } catch (e) { return undefined;
...
@@ -5,16 +5,16 @@ const tryRead = cmd => { try { return read(cmd); } catch (e) { return undefined;
const
releaseBranchRegex
=
/^release-v
(?<
version>
(?<
major>
\d
+
)\.(?<
minor>
\d
+
)(?:\.(?<
patch>
\d
+
))?)
$/
;
const
releaseBranchRegex
=
/^release-v
(?<
version>
(?<
major>
\d
+
)\.(?<
minor>
\d
+
)(?:\.(?<
patch>
\d
+
))?)
$/
;
const
currentBranch
=
read
(
`git rev-parse --abbrev-ref HEAD`
);
const
currentBranch
=
read
(
'git rev-parse --abbrev-ref HEAD'
);
const
match
=
currentBranch
.
match
(
releaseBranchRegex
);
const
match
=
currentBranch
.
match
(
releaseBranchRegex
);
if
(
!
match
)
{
if
(
!
match
)
{
console
.
error
(
`Not currently on a release branch`
);
console
.
error
(
'Not currently on a release branch'
);
process
.
exit
(
1
);
process
.
exit
(
1
);
}
}
if
(
/-.*$/
.
test
(
require
(
'../package.json'
).
version
))
{
if
(
/-.*$/
.
test
(
require
(
'../package.json'
).
version
))
{
console
.
error
(
`Refusing to update docs: prerelease detected`
);
console
.
error
(
'Refusing to update docs: prerelease detected'
);
process
.
exit
(
0
);
process
.
exit
(
0
);
}
}
...
@@ -22,7 +22,7 @@ const current = match.groups;
...
@@ -22,7 +22,7 @@ const current = match.groups;
const
docsBranch
=
`docs-v
${
current
.
major
}
.x`
;
const
docsBranch
=
`docs-v
${
current
.
major
}
.x`
;
// Fetch remotes and find the docs branch if it exists
// Fetch remotes and find the docs branch if it exists
run
(
`git fetch --all --no-tags`
);
run
(
'git fetch --all --no-tags'
);
const
matchingDocsBranches
=
tryRead
(
`git rev-parse --glob='*/
${
docsBranch
}
'`
);
const
matchingDocsBranches
=
tryRead
(
`git rev-parse --glob='*/
${
docsBranch
}
'`
);
if
(
!
matchingDocsBranches
)
{
if
(
!
matchingDocsBranches
)
{
...
@@ -32,24 +32,24 @@ if (!matchingDocsBranches) {
...
@@ -32,24 +32,24 @@ if (!matchingDocsBranches) {
const
[
publishedRef
,
...
others
]
=
new
Set
(
matchingDocsBranches
.
split
(
'
\
n'
));
const
[
publishedRef
,
...
others
]
=
new
Set
(
matchingDocsBranches
.
split
(
'
\
n'
));
if
(
others
.
length
>
0
)
{
if
(
others
.
length
>
0
)
{
console
.
error
(
console
.
error
(
`Found conflicting
${
docsBranch
}
branches.\n`
`Found conflicting
${
docsBranch
}
branches.\n`
+
+
`Either local branch is outdated or there are multiple matching remote branches.`
'Either local branch is outdated or there are multiple matching remote branches.'
,
);
);
process
.
exit
(
1
);
process
.
exit
(
1
);
}
}
const
publishedVersion
=
JSON
.
parse
(
read
(
`git show
${
publishedRef
}
:package.json`
)).
version
;
const
publishedVersion
=
JSON
.
parse
(
read
(
`git show
${
publishedRef
}
:package.json`
)).
version
;
const
publishedMinor
=
publishedVersion
.
match
(
/
\d
+
\.(?<
minor>
\d
+
)\.\d
+/
).
groups
.
minor
;
const
publishedMinor
=
publishedVersion
.
match
(
/
\d
+
\.(?<
minor>
\d
+
)\.\d
+/
).
groups
.
minor
;
if
(
current
.
minor
<
publishedMinor
)
{
if
(
current
.
minor
<
publishedMinor
)
{
console
.
error
(
`Refusing to update docs: newer version is published`
);
console
.
error
(
'Refusing to update docs: newer version is published'
);
process
.
exit
(
0
);
process
.
exit
(
0
);
}
}
run
(
`git checkout --quiet --detach`
);
run
(
'git checkout --quiet --detach'
);
run
(
`git reset --soft
${
publishedRef
}
`
);
run
(
`git reset --soft
${
publishedRef
}
`
);
run
(
`git checkout
${
docsBranch
}
`
);
run
(
`git checkout
${
docsBranch
}
`
);
}
}
run
(
`npm run prepare-docs`
);
run
(
'npm run prepare-docs'
);
run
(
`git add -f docs`
);
// --force needed because generated docs files are gitignored
run
(
'git add -f docs'
);
// --force needed because generated docs files are gitignored
run
(
`git commit -m "Update docs"`
);
run
(
'git commit -m "Update docs"'
);
run
(
`git checkout
${
currentBranch
}
`
);
run
(
`git checkout
${
currentBranch
}
`
);
scripts/upgradeable/patch/02-add-missing-mock-arguments.patch
View file @
2d97b6b4
diff --git a/contracts/mocks/MulticallTokenMockUpgradeable.sol b/contracts/mocks/MulticallTokenMockUpgradeable.sol
diff --git a/contracts/mocks/MulticallTokenMockUpgradeable.sol b/contracts/mocks/MulticallTokenMockUpgradeable.sol
index
d06c8722..6211da1
f 100644
index
7bd4ae88..7be0c4f
f 100644
--- a/contracts/mocks/MulticallTokenMockUpgradeable.sol
--- a/contracts/mocks/MulticallTokenMockUpgradeable.sol
+++ b/contracts/mocks/MulticallTokenMockUpgradeable.sol
+++ b/contracts/mocks/MulticallTokenMockUpgradeable.sol
@@ -9,7 +9,7 @@ import "../proxy/utils/Initializable.sol";
@@ -8,7 +8,7 @@ import "../proxy/utils/Initializable.sol";
contract MulticallTokenMockUpgradeable is Initializable, ERC20MockUpgradeable, MulticallUpgradeable {
contract MulticallTokenMockUpgradeable is Initializable, ERC20MockUpgradeable, MulticallUpgradeable {
function __MulticallTokenMock_init(uint256 initialBalance) internal onlyInitializing {
function __MulticallTokenMock_init(uint256 initialBalance) internal onlyInitializing {
__Context_init_unchained();
- __ERC20_init_unchained(name, symbol);
- __ERC20_init_unchained(name, symbol);
+ __ERC20_init_unchained("MulticallToken", "BCT");
+ __ERC20_init_unchained("MulticallToken", "BCT");
__ERC20Mock_init_unchained("MulticallToken", "BCT", msg.sender, initialBalance);
__ERC20Mock_init_unchained("MulticallToken", "BCT", msg.sender, initialBalance);
__Multicall_init_unchained();
}
__MulticallTokenMock_init_unchained(initialBalance);
scripts/upgradeable/patch/03-remove-erc20votes-chained-init.patch
deleted
100644 → 0
View file @
5a8b8399
diff --git a/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol
index a7a9af54..0b7f838d 100644
--- a/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol
+++ b/contracts/token/ERC20/extensions/ERC20VotesUpgradeable.sol
@@ -24,12 +24,6 @@ import "../../../proxy/utils/Initializable.sol";
* _Available since v4.2._
*/
abstract contract ERC20VotesUpgradeable is Initializable, IVotesUpgradeable, ERC20PermitUpgradeable {
- function __ERC20Votes_init() internal onlyInitializing {
- __Context_init_unchained();
- __EIP712_init_unchained(name, "1");
- __ERC20Votes_init_unchained();
- }
-
function __ERC20Votes_init_unchained() internal onlyInitializing {
}
struct Checkpoint {
scripts/upgradeable/patch/04-remove-erc20votes-comp-chained-init.patch
deleted
100644 → 0
View file @
5a8b8399
diff --git a/contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol b/contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol
index 6f1f8182..0f09ea48 100644
--- a/contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol
+++ b/contracts/token/ERC20/extensions/ERC20VotesCompUpgradeable.sol
@@ -25,13 +25,6 @@ import "../../../proxy/utils/Initializable.sol";
* _Available since v4.2._
*/
abstract contract ERC20VotesCompUpgradeable is Initializable, ERC20VotesUpgradeable {
- function __ERC20VotesComp_init() internal onlyInitializing {
- __Context_init_unchained();
- __EIP712_init_unchained(name, "1");
- __ERC20Votes_init_unchained();
- __ERC20VotesComp_init_unchained();
- }
-
function __ERC20VotesComp_init_unchained() internal onlyInitializing {
}
/**
scripts/upgradeable/patch/05-fix-governor-initializers.patch
View file @
2d97b6b4
diff --git a/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol b/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol
index 1f6895a6..86518b84 100644
--- a/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol
+++ b/contracts/governance/compatibility/GovernorCompatibilityBravoUpgradeable.sol
@@ -21,7 +21,6 @@ abstract contract GovernorCompatibilityBravoUpgradeable is Initializable, IGover
function __GovernorCompatibilityBravo_init() internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__IGovernorTimelock_init_unchained();
__IGovernorCompatibilityBravo_init_unchained();
diff --git a/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol b/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol
index 4873166b..6a88e6b4 100644
--- a/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorCountingSimpleUpgradeable.sol
@@ -14,7 +14,6 @@ abstract contract GovernorCountingSimpleUpgradeable is Initializable, GovernorUp
function __GovernorCountingSimple_init() internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorCountingSimple_init_unchained();
}
diff --git a/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol b/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol
index c6ed355a..9236c546 100644
--- a/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorTimelockCompoundUpgradeable.sol
@@ -96,7 +96,6 @@ abstract contract GovernorTimelockCompoundUpgradeable is Initializable, IGoverno
function __GovernorTimelockCompound_init(ICompoundTimelockUpgradeable timelockAddress) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__IGovernorTimelock_init_unchained();
__GovernorTimelockCompound_init_unchained(timelockAddress);
diff --git a/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol b/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol
index 3d6a5de5..ad5f505e 100644
--- a/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorTimelockControlUpgradeable.sol
@@ -33,7 +33,6 @@ abstract contract GovernorTimelockControlUpgradeable is Initializable, IGovernor
function __GovernorTimelockControl_init(TimelockControllerUpgradeable timelockAddress) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__IGovernorTimelock_init_unchained();
__GovernorTimelockControl_init_unchained(timelockAddress);
diff --git a/contracts/governance/extensions/GovernorVotesCompUpgradeable.sol b/contracts/governance/extensions/GovernorVotesCompUpgradeable.sol
index cc83b3ed..5398f15b 100644
--- a/contracts/governance/extensions/GovernorVotesCompUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorVotesCompUpgradeable.sol
@@ -17,7 +17,6 @@ abstract contract GovernorVotesCompUpgradeable is Initializable, GovernorUpgrade
function __GovernorVotesComp_init(ERC20VotesCompUpgradeable token_) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorVotesComp_init_unchained(token_);
}
diff --git a/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol b/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol
index 5d7a88bc..39f97903 100644
--- a/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorVotesQuorumFractionUpgradeable.sol
@@ -19,7 +19,6 @@ abstract contract GovernorVotesQuorumFractionUpgradeable is Initializable, Gover
function __GovernorVotesQuorumFraction_init(uint256 quorumNumeratorValue) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorVotesQuorumFraction_init_unchained(quorumNumeratorValue);
}
diff --git a/contracts/governance/extensions/GovernorVotesUpgradeable.sol b/contracts/governance/extensions/GovernorVotesUpgradeable.sol
index cdfd0ae7..48408d9c 100644
--- a/contracts/governance/extensions/GovernorVotesUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorVotesUpgradeable.sol
@@ -18,7 +18,6 @@ abstract contract GovernorVotesUpgradeable is Initializable, GovernorUpgradeable
function __GovernorVotes_init(IVotesUpgradeable tokenAddress) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorVotes_init_unchained(tokenAddress);
}
diff --git a/contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol b/contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol
index c66ebc16..3bba9501 100644
--- a/contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorProposalThresholdUpgradeable.sol
@@ -14,7 +14,6 @@ abstract contract GovernorProposalThresholdUpgradeable is Initializable, Governo
function __GovernorProposalThreshold_init() internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorProposalThreshold_init_unchained();
}
diff --git a/contracts/governance/extensions/GovernorSettingsUpgradeable.sol b/contracts/governance/extensions/GovernorSettingsUpgradeable.sol
index fbbb5ec1..06e8b9dd 100644
--- a/contracts/governance/extensions/GovernorSettingsUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorSettingsUpgradeable.sol
@@ -30,7 +30,6 @@ abstract contract GovernorSettingsUpgradeable is Initializable, GovernorUpgradea
) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorSettings_init_unchained(initialVotingDelay, initialVotingPeriod, initialProposalThreshold);
}
diff --git a/contracts/mocks/wizard/MyGovernor1Upgradeable.sol b/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
diff --git a/contracts/mocks/wizard/MyGovernor1Upgradeable.sol b/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
index
df6ccdaf..db9998ed
100644
index
66662e9e..c53c6479
100644
--- a/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
--- a/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor1Upgradeable.sol
@@ -18,7 +18,7 @@ contract MyGovernor1Upgradeable is
@@ -16,7 +16,7 @@ contract MyGovernor1Upgradeable is
GovernorCountingSimpleUpgradeable
{
function __MyGovernor1_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
function __MyGovernor1_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
- __EIP712_init_unchained(name_, version());
+ __EIP712_init_unchained("MyGovernor", version());
+ __EIP712_init_unchained("MyGovernor", version());
__IGovernor_init_unchained();
__IGovernorTimelock_init_unchained();
__Governor_init_unchained("MyGovernor");
__Governor_init_unchained("MyGovernor");
__GovernorTimelockControl_init_unchained(_timelock);
__GovernorVotes_init_unchained(_token);
diff --git a/contracts/mocks/wizard/MyGovernor2Upgradeable.sol b/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
diff --git a/contracts/mocks/wizard/MyGovernor2Upgradeable.sol b/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
index
b07261a4..4ec9b6ce
100644
index
63bc024c..0f854226
100644
--- a/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
--- a/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor2Upgradeable.sol
@@ -20,7 +20,7 @@ contract MyGovernor2Upgradeable is
@@ -18,7 +18,7 @@ contract MyGovernor2Upgradeable is
GovernorCountingSimpleUpgradeable
{
function __MyGovernor2_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
function __MyGovernor2_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
- __EIP712_init_unchained(name_, version());
+ __EIP712_init_unchained("MyGovernor", version());
+ __EIP712_init_unchained("MyGovernor", version());
__IGovernor_init_unchained();
__IGovernorTimelock_init_unchained();
__Governor_init_unchained("MyGovernor");
__Governor_init_unchained("MyGovernor");
__GovernorTimelockControl_init_unchained(_timelock);
__GovernorVotes_init_unchained(_token);
diff --git a/contracts/mocks/wizard/MyGovernor3Upgradeable.sol b/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
diff --git a/contracts/mocks/wizard/MyGovernor3Upgradeable.sol b/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
index 2
23ccb94..e05b6ce7
100644
index 2
7a8411c..2f59b8e5
100644
--- a/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
--- a/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
+++ b/contracts/mocks/wizard/MyGovernor3Upgradeable.sol
@@ -18,7 +18,7 @@ contract MyGovernorUpgradeable is
@@ -16,7 +16,7 @@ contract MyGovernorUpgradeable is
GovernorVotesQuorumFractionUpgradeable
{
function __MyGovernor_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
function __MyGovernor_init(IVotesUpgradeable _token, TimelockControllerUpgradeable _timelock) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
- __EIP712_init_unchained(name_, version());
+ __EIP712_init_unchained("MyGovernor", version());
+ __EIP712_init_unchained("MyGovernor", version());
__IGovernor_init_unchained();
__Governor_init_unchained("MyGovernor");
__IGovernorTimelock_init_unchained();
__GovernorTimelockControl_init_unchained(_timelock);
__IGovernorCompatibilityBravo_init_unchained();
__GovernorVotes_init_unchained(_token);
diff --git a/contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol b/contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol
index 9b48de71..c28f3b50 100644
--- a/contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol
+++ b/contracts/governance/extensions/GovernorPreventLateQuorumUpgradeable.sol
@@ -38,7 +38,6 @@ abstract contract GovernorPreventLateQuorumUpgradeable is Initializable, Governo
function __GovernorPreventLateQuorum_init(uint64 initialVoteExtension) internal onlyInitializing {
__Context_init_unchained();
__ERC165_init_unchained();
- __EIP712_init_unchained(name_, version());
__IGovernor_init_unchained();
__GovernorPreventLateQuorum_init_unchained(initialVoteExtension);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment