Skip to content

Instantly share code, notes, and snippets.

@puilp0502
Created November 19, 2018 18:27
Show Gist options
  • Select an option

  • Save puilp0502/fd27f15a334ddf8c9c1eb3f7b9fc8c98 to your computer and use it in GitHub Desktop.

Select an option

Save puilp0502/fd27f15a334ddf8c9c1eb3f7b9fc8c98 to your computer and use it in GitHub Desktop.

Revisions

  1. puilp0502 created this gist Nov 19, 2018.
    12 changes: 12 additions & 0 deletions kvstore.sol
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    pragma solidity ^0.4.0;
    contract KVStore {
    mapping(uint64 => string) public map;

    function set(uint64 key, string value) public {
    map[key] = value;
    }

    function get(uint64 key) public view returns (string) {
    return map[key];
    }
    }