Skip to content

Questions on initiating constructor in DecentralizedStableCoin.sol, when it inherits Ownable contract. #286

Discussion options

You must be logged in to vote

EDIT: There was an update to OpenZeppelin's code two months ago that changed from the code I wrote below, to what you have. So yes, you should pass a parameter when initiating Ownable contract. Changes in the code can be seen in OpenZeppelin's repo, or specifically in this change's commit.



So when this course was filmed, Patrick used the version that had no parameters in the constructor, but there was an update since so now you must specify it :)


It's because the constructor in Ownable contract doesn't take any parameters.

As you can see in the following code snipper (I've only copied the relevant part), when Ownable is called, whatever is in the constructor will be automatically run …

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
4 replies
@Glow-in-the-dark
Comment options

@ChefAharoni
Comment options

@Glow-in-the-dark
Comment options

@ChefAharoni
Comment options

Answer selected by Glow-in-the-dark
Comment options

You must be logged in to vote
4 replies
@ChefAharoni
Comment options

@f3d0ss
Comment options

@Glow-in-the-dark
Comment options

@f3d0ss
Comment options

Comment options

You must be logged in to vote
1 reply
@FrankezeCode
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants