-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sol-merger): add support for additional roots for resolving cont…
…racts This will allow to pass CLI argument or the parameter through the code to pass additional roots while resolving the contracts, similar to the `node_modules`. Example of usage in CLI: ```sh sol-merger --additional-root "./test/contracts/imports" "test/contracts/ImportWithAdditionalRoot.sol" compiled ``` Example of usage in code: ```ts const merger = new Merger({ delimeter: '\n\n', additionalRoots: ['./test/contracts/imports'], }); ```
- Loading branch information
Showing
7 changed files
with
108 additions
and
11 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
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
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,33 @@ | ||
pragma solidity ^0.4.11; | ||
pragma experimental ABIEncoderV2; | ||
|
||
|
||
contract Ownable { | ||
address public owner; | ||
|
||
function Ownable() { | ||
owner = msg.sender; | ||
} | ||
|
||
modifier onlyOwner() { | ||
require(msg.sender == owner); | ||
_; | ||
} | ||
|
||
function transferOwnership(address newOwner) onlyOwner { | ||
if (newOwner != address(0)) { | ||
owner = newOwner; | ||
} | ||
} | ||
|
||
} | ||
|
||
contract MyOwned is Ownable { | ||
// Super important comment here | ||
string public constant name = "My Owned"; | ||
|
||
/** | ||
* Super important description here | ||
*/ | ||
function MyOwned() {} | ||
} |
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,14 @@ | ||
pragma solidity ^0.4.11; | ||
pragma experimental ABIEncoderV2; | ||
|
||
import "ownable.sol"; | ||
|
||
contract MyOwned is Ownable { | ||
// Super important comment here | ||
string public constant name = "My Owned"; | ||
|
||
/** | ||
* Super important description here | ||
*/ | ||
function MyOwned() {} | ||
} |
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