Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : Daypick
pragma solidity ^0.5.8; contract Daypick { address private _owner; mapping(uint32 => string) private _map; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { _owner = msg.sender; } function changeOwnerShip(address newOwner) public onlyOwner { require(newOwner != address(0), 'new owner should not be 0x0!'); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function writeDay(uint32 date, string memory data) public onlyOwner { _map[date] = data; } function getDay(uint32 date) public view returns (string memory) { return _map[date]; } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Only owner can call this function."); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
My Name Tag:
Private Note:
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.