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