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
//https://solidity.readthedocs.io/en/v0.5.3/solidity-by-example.html | |
pragma solidity >=0.4.22 <0.6.0; | |
/// @title Voting with delegation. | |
contract Ballot { | |
// This declares a new complex type which will | |
// be used for variables later. | |
// It will represent a single voter. | |
struct Voter { | |
uint weight; // weight is accumulated by delegation |
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
WARNING:root:You are using an untested version of z3. 4.5.1 is the officially tested version | |
WARNING:root:You are using evm version 1.8.16. The supported version is 1.7.3 | |
WARNING:root:You are using solc version 0.5.4, The latest supported version is 0.4.19 | |
incomplete push instruction at 3101 | |
INFO:root:contract ./contracts/i.sol:Ballot: | |
INFO:symExec: ============ Results =========== | |
INFO:symExec: EVM Code Coverage: 93.3% | |
INFO:symExec: Integer Underflow: False | |
INFO:symExec: Integer Overflow: True | |
INFO:symExec: Parity Multisig Bug 2: False |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.6.0 <0.8.0; | |
// This is the same code as before, just without comments | |
struct Data { mapping(uint => bool) flags; } | |
library Set { | |
function insert(Data storage self, uint value) | |
public |
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
pragma solidity ^0.5.5; | |
library Search { | |
function indexOf(uint[] storage self, uint value) public view returns (uint) { | |
for (uint i = 0; i < self.length; i++) if (self[i] == value) return i; | |
return uint(-1); | |
} | |
} | |
contract Test { | |
uint[] data; |
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
pragma solidity >=0.4.22 <0.7.0; | |
/// @title Voting with delegation. | |
contract Ballot { | |
// This declares a new complex type which will | |
// be used for variables later. | |
// It will represent a single voter. | |
struct Voter { | |
uint weight; // weight is accumulated by delegation | |
bool voted; // if true, that person already voted |
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
WARNING:root:You are using an untested version of z3. 4.5.1 is the officially tested version | |
WARNING:root:You are using evm version 1.8.16. The supported version is 1.7.3 | |
WARNING:root:You are using solc version 0.5.0, The latest supported version is 0.4.19 | |
INFO:root:contract ./contracts/1.sol:Ballot: | |
INFO:symExec: ============ Results =========== | |
INFO:symExec: EVM Code Coverage: 93.0% | |
INFO:symExec: Integer Underflow: False | |
INFO:symExec: Integer Overflow: True | |
INFO:symExec: Parity Multisig Bug 2: False | |
INFO:symExec: Callstack Depth Attack Vulnerability: False |
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
pragma solidity ^0.5.0; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include | |
* the optional functions; to access them see `ERC20Detailed`. | |
*/ | |
interface IERC20 { | |
/** | |
* @dev Returns the amount of tokens in existence. |
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
WARNING:root:You are using an untested version of z3. 4.5.1 is the officially tested version | |
WARNING:root:You are using evm version 1.8.16. The supported version is 1.7.3 | |
WARNING:root:You are using solc version 0.5.5, The latest supported version is 0.4.19 | |
INFO:root:contract ./contracts/2.sol:ERC20: | |
INFO:symExec: ============ Results =========== | |
INFO:symExec: EVM Code Coverage: 98.3% | |
INFO:symExec: Integer Underflow: False | |
INFO:symExec: Integer Overflow: False | |
INFO:symExec: Parity Multisig Bug 2: False | |
INFO:symExec: Callstack Depth Attack Vulnerability: False |
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
pragma solidity >=0.4.11 <0.6.0; | |
contract C { | |
function f(uint x) public view returns (uint r) { | |
assembly { | |
r := extcodehash(x) | |
} | |
} | |
} |
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
WARNING:root:You are using an untested version of z3. 4.5.1 is the officially tested version | |
WARNING:root:You are using evm version 1.8.16. The supported version is 1.7.3 | |
WARNING:root:You are using solc version 0.5.5, The latest supported version is 0.4.19 | |
INFO:root:contract ./contracts/3.sol:C: | |
INFO:symExec: ============ Results =========== | |
INFO:symExec: EVM Code Coverage: 98.9% | |
INFO:symExec: Integer Underflow: False | |
INFO:symExec: Integer Overflow: False | |
INFO:symExec: Parity Multisig Bug 2: False | |
INFO:symExec: Callstack Depth Attack Vulnerability: False |
OlderNewer