Skip to content

Instantly share code, notes, and snippets.

@thebalaa
Created February 21, 2017 17:40
Show Gist options
  • Save thebalaa/79b941436351a7f9a9a9cb5afcbbe5b1 to your computer and use it in GitHub Desktop.
Save thebalaa/79b941436351a7f9a9a9cb5afcbbe5b1 to your computer and use it in GitHub Desktop.
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