Solidity Series

Solidity Programming Language – Parameter Passing to different Parent Constructor in Multiple Inheritance

In Solidity, when dealing with multiple inheritance, you can pass parameters to parent constructors by specifying them in the derived contract’s constructor and explicitly calling the constructors of the parent contracts.

Code:

Output:

Hi, I’m attacker

Leave a Reply

Your email address will not be published. Required fields are marked *