Verified contractPartial
Daypick
Address0xcd7ba2fffca36c8cc03b9f3a2bcfbc42d8daf7cf
- Balance
0 ETH
- Transactions
178
- Compiler
solc 0.5.8
- Same code
Only this contract
Details
- Compiler
- solc 0.5.8+commit.23d335f2
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 8,738,668
- Creation transaction
- 0x9b9a351f0b…c82cc4a64c
Daypick.sol
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;
}
}Compiler settingsShow
{
"optimizer": {
"runs": 0,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.