Closed ChefAharoni closed 11 months ago
Great question! And you pretty much got it though.
In the version we used, the constructor
looks like this:
constructor() {
_transferOwnership(_msgSender());
}
With no parameters. Due to this, solidity is smart enough to not require us put that in our DecentralizedStableCoin
constructor. Yes, if that had parameters, we'd need to put it in our constructor.
Closing as solved
The following question was raised in discussions:
Discussed in https://github.com/Cyfrin/foundry-full-course-f23/discussions/286
There was an update to OpenZeppelin's code two months ago that changed from the code that's used in the course, to what's shown above. Since the update, address of the owner must be entered manually through the constructor parameter.
I suggest noting this change on YouTube, and I'll also note this in the Decentralized coin repo.