VerifiedExistence
Intro
This smart contract is meant to:
Create proofs of the existence of a Hash (representing some document or text), thus verify their existence
Owner (and whitelisted others) can create new
proofs
, like verified time-based document watermarks on the blockchainContract creates
proofs
as NFT/ERC721, which can be sent to a recipient addressWhitelisted others can add confirmations for
proofs
Roles:
default_admin
: contract deployer set as default, can be transferred; is allowed to grant/revoke all roles (admins + whitelists)proof_whitelisted
: add/delete proofs; admins are not automatically whitelisted, so that needs to be added if desiredconfirm_whitelisted
: add/delete confirmations of proofs
Note: Recipient wallets need to be able to handle ER721. For safety reasons, it is not possible to send a token to a contract that does not explicitly support it.
tl/dr instructions
Tools:
Deploy contract via Remix
Use contract interaction via Etherscan
Create doc/string hashes using Hash Calculator
proofs
whitelist deployment address plus any group of addresses with
grantRole()
asProof_Whitelisted
using0xf555e1ec80c58c7664dc73d872d3ef6e07bdd9c5ba6b3bf7a91ffaa413b8dac5
create new proof with
addProof()
usingproofHash
(hash of a document, file, string, etc.),string
(any description of the hash) and theaddress
where theproofHash
shall be sent to(If you hold the
proof
in your address) you can delete it by usingdeleteProof()
confirmation of proofs
whitelist any group of addresses with
grantRole()
asConfirm_Whitelisted
with0x53eebd7fe83ace838d6b0a9d4f111237deb02359c62b25f1025613d537b2379b
create new
confirmation of a proof
withaddConfirmation()
usingtokenId
Review
proof
dataQuery either using
getProofData()
and/orgetProofIdByHash() to get
proofHash, timestamp, description`
Notable Functions
Read Functions
Function | Description |
| query with |
| query with |
| query with |
| query with |
| check whether a specific |
| number of tokens the |
| get the |
| transfer Proofs |
|
|
| get the current supply of |
Write Functions
Function | Description |
| write |
| write |
| write |
|
|
|
|
|
|
|
|
|
|
| same as |
Swarm - Example Use Cases
Core initial use case
The Swarm Council can publish protocols of decisions taken on GitHub and verify the Hash via VerifiedExistence:
Dedicated contract for
VerifiedExistence
for Swarm NetworkContract owner and
proof_whitelisted
is multisig with council members (tbd)Council published documents with hashes;
Create Proof (Hash + meta data) and proof NFT / ERC721 is sent to dedicated wallet (e.g. Gnosis Safe, which allows ERC721 to be kept as “Collectibles”)
Example: Swarm Council Votes (SCVs)
listed in this repo; text between </hash-start> and </hash-end> tags is hashed
create
proofs
using hash and title; send it to a Swarm Council wallet; e.gproof (SCV_1587031154_Decision regarding_April_Voting_Period.md)
Other potential use cases:
Proof of Masternode
Smart contract, which tracks verified Masternodes, could be added to
proof_whitelisted
of a contract put in place by councilA smart contract / person / process could keep track of active masternodes and create/delete corresponding
proofs
and sendproof
NFTs to masternode walletsMasternode distributions could be using NFTs held as basis for reward distribution
Masternodes could be confirming various actions of the Council contract
Masternodes could be added as confirm_whitelisted
Can then add supporting votes (confirmations) to certain actions
Last updated