Skip to content
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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Akash-Kolekar
Copy link

Updated the latest version of the Governance Contracts and Openzeppelin contracts.
Changed the version of the oz in Makefile and ReadMe

@PatrickAlphaC
Copy link
Member

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 {
Copy link

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?

Copy link
Member

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.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants