-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parse multiple pragma strings in the same source code
- Loading branch information
1 parent
577eade
commit 0ae6499
Showing
6 changed files
with
93 additions
and
44 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,26 @@ | ||
/* | ||
* @source: https://smartcontractsecurity.github.io/SWC-registry/docs/SWC-101#bectokensol | ||
* @author: - | ||
* @vulnerable_at_lines: 264 | ||
*/ | ||
|
||
pragma solidity >0.6.0 <0.8.0; | ||
|
||
contract Contract1 { | ||
function add(uint256 a, uint256 b) internal constant returns (uint256) { | ||
uint256 c = a + b; | ||
require(c >= a); | ||
return c; | ||
} | ||
} | ||
|
||
pragma solidity ^0.7.0; | ||
|
||
pragma solidity ^0.7.2; | ||
|
||
contract Contract2 { | ||
function sub(uint256 a, uint256 b) internal constant returns (uint256) { | ||
require(b <= a); | ||
return a - b; | ||
} | ||
} |
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