Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (17 sloc) 489 Bytes
pragma solidity ^0.4.23;
contract Counter {
event CounterIncrementedEvent(int count);
event CounterDecrementedEvent(int count);
int private count = 0;
function incrementCounter() public {
count += 1;
emit CounterIncrementedEvent(count);
}
function decrementCounter() public {
count -= 1;
emit CounterDecrementedEvent(count);
}
function getCount() public constant returns (int) {
return count;
}
}
You can’t perform that action at this time.