Smart Contract
HashAnchor
A.b5a8646f5cf15e7c.HashAnchor
1// HashAnchor - Minimal contract for anchoring file hashes on Flow.
2// Deploy this contract to your account, then use record_hash.cdc to submit hashes.
3// No persistent storage (keeps cost low); the event is the on-chain proof.
4
5access(all) contract HashAnchor {
6
7 // Emitted when a hash is anchored. The transaction ID is the proof.
8 access(all) event HashAnchored(hash: String, timestamp: UFix64)
9
10 access(all) fun recordHash(hash: String) {
11 emit HashAnchored(hash: hash, timestamp: getCurrentBlock().timestamp)
12 }
13}
14