aboutsummaryrefslogblamecommitdiff
path: root/examples/counter/counter.sol
blob: b21c3bfdec9a679419ceb8a2f4b97e82f0b017f9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
                       











                                                      
pragma solidity ^0.6.0;

contract Counter {
    uint256 x;

    constructor() public {
        x = 42;
    }

    function add(uint256 y) public returns (uint256) {
        x = x + y;
        return x;
    }
}