ETH Price: $2,136.91 (-2.01%)

Contract Diff Checker

Contract Name:
TradeIO

Contract Source Code:

File 1 of 1 : TradeIO

pragma solidity ^0.4.19;

contract TradeIO {
    address owner;
    mapping(bytes8 => string) dateToHash;
    
    modifier onlyOwner () {
        require(owner == msg.sender);
        _;
    }
    
    function TradeIO () public {
        owner = msg.sender;
    }
    
    function changeOwner(address _newOwner) public onlyOwner {
        owner = _newOwner;
    }
    
    function saveHash(bytes8 date, string hash) public onlyOwner {
        require(bytes(dateToHash[date]).length == 0);
        dateToHash[date] = hash;
    }
    
    function getHash(bytes8 date) public constant returns (string) {
        require(bytes(dateToHash[date]).length != 0);
        return dateToHash[date];
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):