Fix other contracts

pull/754/head
Dominik Muhs 6 years ago
parent a053cfd330
commit e47584f02d
  1. 28
      tests/testdata/input_contracts/calls.sol
  2. 2
      tests/testdata/input_contracts/environments.sol
  3. 3
      tests/testdata/input_contracts/ether_send.sol
  4. 5
      tests/testdata/input_contracts/exceptions.sol
  5. 3
      tests/testdata/input_contracts/kinds_of_calls.sol
  6. 5
      tests/testdata/input_contracts/metacoin.sol
  7. 4
      tests/testdata/input_contracts/nonascii.sol
  8. 9
      tests/testdata/input_contracts/origin.sol
  9. 3
      tests/testdata/input_contracts/overflow.sol
  10. 3
      tests/testdata/input_contracts/returnvalue.sol
  11. 3
      tests/testdata/input_contracts/suicide.sol
  12. 3
      tests/testdata/input_contracts/underflow.sol
  13. 3
      tests/testdata/input_contracts/weak_random.sol

@ -1,4 +1,4 @@
pragma solidity ^0.4.17;
pragma solidity 0.5.0;
contract Caller {
@ -8,29 +8,29 @@ contract Caller {
uint256 statevar;
function Caller(address addr) {
constructor(address addr) public {
fixed_address = addr;
}
function thisisfine() public {
fixed_address.call();
fixed_address.call("");
}
function reentrancy() public {
fixed_address.call();
fixed_address.call("");
statevar = 0;
}
function calluseraddress(address addr) {
addr.call();
function calluseraddress(address addr) public {
addr.call("");
}
function callstoredaddress() public {
stored_address.call("");
}
function callstoredaddress() {
stored_address.call();
}
function setstoredaddress(address addr) {
function setstoredaddress(address addr) public {
stored_address = addr;
}
}
}

@ -1,4 +1,4 @@
pragma solidity ^0.4.16;
pragma solidity 0.5.0;
contract IntegerOverflow2 {

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract Crowdfunding {
mapping(address => uint) public balances;

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract Exceptions {
uint256[8] myarray;
@ -28,7 +31,7 @@ contract Exceptions {
if (input > 0) {
uint256 i = 1/input;
}
}
}
function arrayaccess(uint256 index) {
uint256 i = myarray[index];

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract D {
uint public n;
address public sender;

@ -1,11 +1,12 @@
pragma solidity ^0.4.17;
pragma solidity 0.5.0;
contract MetaCoin {
mapping (address => uint) public balances;
function MetaCoin() public {
balances[msg.sender] = 10000;
}
function sendToken(address receiver, uint amount) public returns(bool successful){
if (balances[msg.sender] < amount) return false;
balances[msg.sender] -= amount;

@ -1,4 +1,6 @@
pragma solidity ^0.4.22;
pragma solidity 0.5.0;
contract nonAscii {
function renderNonAscii () public pure returns (string) {
return "Хэллоу Ворлд";

@ -1,8 +1,11 @@
pragma solidity 0.5.0;
contract Origin {
address public owner;
/**
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
@ -12,7 +15,7 @@ contract Origin {
/**
* @dev Throws if called by any account other than the owner.
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
if (tx.origin != owner) {
@ -24,7 +27,7 @@ contract Origin {
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner {
if (newOwner != address(0)) {

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract Over {
mapping(address => uint) balances;

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract ReturnValue {
address callee = 0xE0F7e56e62b4267062172495D7506087205A4229;

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract Suicide {
function kill(address addr) {

@ -1,3 +1,6 @@
pragma solidity 0.5.0;
contract Under {
mapping(address => uint) balances;

@ -1,4 +1,5 @@
pragma solidity ^0.4.16;
pragma solidity 0.5.0;
contract WeakRandom {
struct Contestant {

Loading…
Cancel
Save