Skip to content

Commit

Permalink
Update sample2.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
acloudfan committed Mar 25, 2018
1 parent 1e295c9 commit 1a34211
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions sol/sample2.sol
Expand Up @@ -6,21 +6,23 @@ contract MyContract {
event NumberSetEvent(address indexed caller, uint oldNum, uint newNum);
event NumberDoubled(address indexed caller,uint oldNum, uint newNum);

function getNum() returns (uint) {
function getNum() public returns (uint) {
return num;
}

function setNum(uint newNum) {
function setNum(uint newNum) public {
uint old = num;
num=newNum;
NumberSetEvent(msg.sender,old,num);
}

function setDouble() {
function setDouble() public {
uint old = num;
num=n;
NumberDoubled(msg.sender,old,num);
}

function MyContract(uint x){num=x;}
}
function MyContract(uint x) public {
num=x;
}
}

0 comments on commit 1a34211

Please sign in to comment.