-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: multiple inherited constructors in abstract contracts (#61)
- Loading branch information
Showing
6 changed files
with
131 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
pragma solidity ^0.8.0; | ||
|
||
contract Ownable { | ||
address public owner; | ||
|
||
constructor(address _owner) { | ||
owner = _owner; | ||
} | ||
} | ||
|
||
contract Pausable { | ||
bool public paused; | ||
|
||
constructor(bool _paused) { | ||
paused = _paused; | ||
} | ||
} | ||
|
||
abstract contract ContractI is Ownable, Pausable {} | ||
|
||
abstract contract ContractI2 is Ownable, Pausable { | ||
bool public boolean; | ||
|
||
constructor(bool _boolean) { | ||
boolean = _boolean; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
constructor({{parameters}}) {{contractName}}({{parameterNames}}) {} | ||
constructor({{parameters}}) {{contracts}} {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters