Created
February 21, 2017 17:40
-
-
Save thebalaa/79b941436351a7f9a9a9cb5afcbbe5b1 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.9; | |
contract MultiPartyContract { | |
// a multi-party document `authenticity` scheme where by | |
// the 3 hard-coded owners are certifying the authenticity of a single document | |
address constant owner1 = 0x0; | |
address constant owner2 = 0x0; | |
address constant owner3 = 0x0; | |
bytes32 constant public document = 0x0; | |
mapping (address => bool) attestations; | |
function setAttestation(bool valid){ | |
attestations[msg.sender] = valid; | |
} | |
function isValid() constant returns (bool) { | |
if (attestations[owner1] && attestations[owner2] && attestations[owner3]) | |
return true; | |
else | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment