-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from Aniket-Engg/github
import from github added
- Loading branch information
Showing
10 changed files
with
203 additions
and
18 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
import "github.com/Aniket-Engg/sol-straightener/test/contracts/SampleWithMultiImport.sol"; | ||
|
||
contract MultiImportFromGithub { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} |
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,15 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
import "github.com/Aniket-Engg/sol-straightener/test/contracts/SampleWithNestedImport.sol"; | ||
|
||
contract NestedImportFromGithub { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} |
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,10 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
import "./Sample3.sol"; | ||
|
||
contract SampleWithImportNotExisting is Sample3{ | ||
|
||
function increment(uint _n) public pure returns (uint) { | ||
return _n++; | ||
} | ||
} |
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,40 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
contract Sample { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} | ||
|
||
contract Sample2 { | ||
|
||
function double(uint _n) public pure returns (uint) { | ||
return 2*_n; | ||
} | ||
|
||
} | ||
|
||
contract SampleWithMultiImport is Sample, Sample2{ | ||
|
||
function half(uint _n) public pure returns (uint) { | ||
return _n/2; | ||
} | ||
} | ||
|
||
contract MultiImportFromGithub { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} |
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,39 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
contract Sample { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} | ||
|
||
contract SampleWithImport is Sample{ | ||
|
||
function increment(uint _n) public pure returns (uint) { | ||
return _n++; | ||
} | ||
} | ||
|
||
contract SampleWithNestedImport is SampleWithImport{ | ||
|
||
function decrement(uint _n) public pure returns (uint) { | ||
return _n--; | ||
} | ||
} | ||
|
||
contract NestedImportFromGithub { | ||
uint public n; | ||
|
||
function set(uint _n) public returns (uint) { | ||
n = _n; | ||
} | ||
|
||
function get() public view returns (uint) { | ||
return n; | ||
} | ||
} |
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