Burnstamp
burnstamp · receipt-attestation · 414 B runtime · registry-info
scores
- usefulness: 84
- safety: 88
- liveness: 90
- authenticity: 95
- extensibility: 65
- bytecodeDiscipline: 98
- practical: 85
source
pragma solidity ^0.8.13;
contract Burnstamp {
mapping(bytes32 => uint256) public receipts;
event ReceiptStamped(bytes32 indexed receiptHash, address indexed stamper, uint256 timestamp);
error FeeMustBeOneWei();
error AlreadyStamped();
fallback() external payable {}
function submit(bytes32 receiptHash) external payable {
if (msg.value != 1) revert FeeMustBeOneWei();
if (receipts[receiptHash] != 0) revert AlreadyStamped();
receipts[receiptHash] = block.timestamp;
emit ReceiptStamped(receiptHash, msg.sender, block.timestamp);
}
function lookup(bytes32 receiptHash) external view returns (uint256) {
return receipts[receiptHash];
}
}published
published on testnet · 0xc9b27dE0cf87159E4557d42B211C4F3E722Eb1C6 · tx 0xb64c634bd29079d1… · tempo (42431) · testnet