revert some changes made to contract

This commit is contained in:
Iuri Matias 2018-10-29 15:44:55 +01:00
parent 71380be0ca
commit edc0a7cd43
1 changed files with 17 additions and 2 deletions

View File

@ -2,7 +2,9 @@ pragma solidity ^0.4.25;
contract SimpleStorage {
uint public storedData;
address public registar;
address owner;
event EventOnSet2(bool passed, string message);
constructor(uint initialValue) public {
storedData = initialValue;
@ -11,13 +13,26 @@ contract SimpleStorage {
function set(uint x) public {
storedData = x;
require(msg.sender == owner);
//require(msg.sender == owner);
//require(msg.sender == 0x0);
storedData = x + 2;
//storedData = x + 2;
}
function set2(uint x) public {
storedData = x;
emit EventOnSet2(true, "hi");
}
function get() public view returns (uint retVal) {
return storedData;
}
function getS() public pure returns (string d) {
return "hello";
}
function setRegistar(address x) public {
registar = x;
}
}