incrementer.sol 421 B

1234567891011121314151617181920
  1. pragma solidity 0;
  2. contract incrementer {
  3. uint32 private value;
  4. /// Constructor that initializes the `int32` value to the given `init_value`.
  5. constructor(uint32 initvalue) {
  6. value = initvalue;
  7. }
  8. /// This increments the value by `by`.
  9. function inc(uint32 by) public {
  10. value += by;
  11. }
  12. /// Simply returns the current value of our `uint32`.
  13. function get() public view returns (uint32) {
  14. return value;
  15. }
  16. }