Created
February 26, 2018 03:09
-
-
Save okstaticzero/f601872e82e29d1e7afc99f17ca016ae to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract MyDetails { | |
mapping (address => string) ipfsHashes; | |
mapping (address => uint) timestamp; | |
function setHash(string ipfsHash) public { | |
ipfsHashes[msg.sender] = ipfsHash; | |
timestamp[msg.sender] = now; | |
} | |
function getHash(address account) public view returns(string, uint) { | |
return (ipfsHashes[account], timestamp[account]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment