Skip to content

Conversation

@bshramin
Copy link

No description provided.

GianfrancoBazzani

This comment was marked as duplicate.

Copy link
Member

@GianfrancoBazzani GianfrancoBazzani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me!

contract DexTwo is Ownable {
address public token1;
address public token2;
constructor() {}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GianfrancoBazzani Isn't the point of this preventing the Ownable constructor from running?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think no.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just found out that there is no way to prevent the parent contract's constructor from running in Solidity, which is weird. So, my bad.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, because of inheritance, the compiler includes all the parent constructors in the deploy bytecode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants