DecentralizedStablecoin contract does not compile with the below error. #2223
Replies: 6 comments 4 replies
-
Can you share |
Beta Was this translation helpful? Give feedback.
-
You need to pass the constructor argument (address initialOwner) to the Ownable contract. For example:
|
Beta Was this translation helpful? Give feedback.
-
Hello @helloram007, Please do as suggested by @thebraveman17 and let us know if the issue gets resolved. |
Beta Was this translation helpful? Give feedback.
-
I had that i have pass something to Ownable, but Patricks code does not
have that, and when i inherited Ownable it didnot thrw any error, so left
it.
i will not pass the param and see if it works.
Thanks
…On Mon, Aug 12, 2024 at 9:09 AM EngrPips ***@***.***> wrote:
Hello @helloram007 <https://github.com/helloram007>, Please do as
suggested by @thebraveman17 <https://github.com/thebraveman17> and let us
know if the issue gets resolved.
—
Reply to this email directly, view it on GitHub
<#2223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGSYP3IPHIZSW2UOQYGQWZDZRBUTZAVCNFSM6AAAAABMLDZPIWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMZRGEYTINQ>
.
You are receiving this because you were mentioned.Message ID:
<Cyfrin/foundry-full-course-cu/repo-discussions/2223/comments/10311146@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
To follow along with the course, you need to install version 4.8.3 which can be done by
instead of
And then in the DecentralizedStableCoin.sol write the constructor like this
|
Beta Was this translation helpful? Give feedback.
-
Good job. |
Beta Was this translation helpful? Give feedback.
-
Hi,
i have copied the code from cyfrin course repo and still the code does not compile with the below error.
[⠒] Compiling...
[⠆] Compiling 35 files with Solc 0.8.26
[⠰] Solc 0.8.26 finished in 2.11s
Error:
Compiler run failed:
Error (3415): No arguments passed to the base constructor. Specify the arguments or mark "DecentralizedStableCoin" as abstract.
--> src/DecentralizedStableCoin.sol:42:1:
|
42 | contract DecentralizedStableCoin is ERC20Burnable, Ownable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Base constructor parameters:
--> lib/openzeppelin-contracts/contracts/access/Ownable.sol:38:16:
|
38 | constructor(address initialOwner) {
| ^^^^^^^^^^^^^^^^^^^^^^
rusty@letsgetrusty-vm:~/cyfrin/defi/defi-stablecoin$
Beta Was this translation helpful? Give feedback.
All reactions