storage.sol 492 B

1234567891011121314151617181920212223242526
  1. pragma solidity >=0.4.22 <0.7.0; //compiled with 0.4.22
  2. /**
  3. * @title Storage
  4. * @dev Store & retrieve value in a variable
  5. */
  6. contract Storage {
  7. string hash_url;
  8. /**
  9. * @dev Store value in variable
  10. * @param hash value to store
  11. */
  12. function store(string hash) public {
  13. hash_url = hash;
  14. }
  15. /**
  16. * @dev Return value
  17. * @return value of 'hash_url'
  18. */
  19. function retrieve() public view returns (string){
  20. return hash_url;
  21. }
  22. }