Last active
April 21, 2017 17:17
-
-
Save jdetychey/7c95dc7ef0d2d9e61f6bb5964a72a22e to your computer and use it in GitHub Desktop.
0xfe on deploy
This file contains 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.10; | |
contract ArtCertificate { | |
/*ownable : begin contract */ | |
/*Public variables*/ | |
address public owner; | |
uint public LastChangeOfOwnership; | |
/*events for log*/ | |
event ChangeOfOwnership(address newOwner); | |
/* modifiers*/ | |
modifier onlyOwner() { | |
if (msg.sender != owner) { | |
throw; | |
} | |
_; | |
} | |
/*methods*/ | |
function transferOwnership(address _newOwner) onlyOwner { | |
if (_newOwner != address(0)) { | |
owner = _newOwner; | |
ChangeOfOwnership(owner); | |
LastChangeOfOwnership = block.timestamp; | |
} | |
} | |
/*ownable : end contract */ | |
/*Public variables*/ | |
address public CertificateOrigin; | |
bytes32 public identifier; | |
string public ArtistName; | |
string public ArtWorkTitle; | |
string public Description; | |
string public ArtWorkDate; | |
string public IPFSmetadata; | |
// string public number of copy; | |
// string public serial number; | |
/*events for log*/ | |
event ChangeOfIPFSmetadata(string newIPFSmetadata); | |
/*construtor*/ | |
function ArtCertificate( | |
address _ArtGallery, | |
bytes32 _identifier, | |
string _ArtistName, | |
string _ArtWorkTitle, | |
string _Description, | |
string _ArtWorkDate, | |
string _IPFSmetadata, | |
address _newOwner | |
){ | |
CertificateOrigin = _ArtGallery; | |
identifier=_identifier; | |
ArtistName=_ArtistName; | |
ArtWorkTitle=_ArtWorkTitle; | |
Description=_Description; | |
ArtWorkDate=_ArtWorkDate; | |
IPFSmetadata=_IPFSmetadata; | |
owner = _newOwner; | |
} | |
/*methods*/ | |
function changeIPFS(string _newIPFSmetadata) onlyOwner { | |
IPFSmetadata = _newIPFSmetadata; | |
ChangeOfIPFSmetadata(IPFSmetadata); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment