-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated latest versions of OpenZeppelin contracts #7
base: main
Are you sure you want to change the base?
Conversation
I'm going to leave this open until I upload a video to updraft telling people the version has changed. Thanks for making this PR |
import {ERC20Permit, Nonces} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol"; | ||
import {ERC20Votes} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; | ||
|
||
contract GovernanceToken is ERC20, ERC20Permit, ERC20Votes { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PatrickAlphaC @Akash-Kolekar - Can one of you please explain why we do this double inheritance, I've seen it before in the Proxy Lesson...
If GovernanceToken is extending / inheriting from ERC20Votes which inherits from ERC20 what's the need for the explicit inheritance of the ERC20 contract by the GovernanceToken contract?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit redundant yes! But we need it to tell solidity what functions we are overriding below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But doesn't it already know? At compile time shouldn't the solc
Compiler know this without the explicit inheritance in the Governance Token.
Updated the latest version of the
Governance Contracts
andOpenzeppelin contracts
.Changed the version of the oz in
Makefile
andReadMe