Verified contractExactMIT
BulbeaProof
Address0xcc693bd2ee55662bd019a298cfba4194a609d39b
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.8.39
- Same code
Only this contract
Details
- Compiler
- solc 0.8.39+commit.ce47f2c8
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- osaka
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,479,781
- Creation transaction
- 0xfeafc79726…41fff2c344
src/BulbeaProof.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.39;
/// @title bulbea-proof
/// @author bulbea.org (@bulbea on Farcaster) and Kooky (@kooky on Farcaster)
/// @notice Records, for each sender, the block at which that sender first recorded a 32-byte digest.
/// The digest is the EIP-712 fingerprint of a declaration described by the bulbea-proof
/// specification. The contract holds no rule about what a digest means: the specification does.
/// @dev One function, one mapping, one event. No owner, no admin, no proxy, no upgrade path,
/// no pause, no fee, no receive, no fallback, no external call, no read of remaining gas.
/// A call carrying ETH reverts. Nothing recorded can ever be changed or deleted.
contract BulbeaProof {
/// @notice Emitted on every call to `record`, including repeats. Indexing only: state is the record.
/// @param sender The account that sent the transaction.
/// @param digest The 32-byte digest it recorded.
event Recorded(address indexed sender, bytes32 indexed digest);
/// @notice Block number of the first record of `digest` by `sender`. Zero means never recorded.
mapping(address => mapping(bytes32 => uint256)) public recordedAt;
/// @notice Record `digest` under the sender's own address.
/// @dev Stores the current block number the first time only. Emits every time.
/// @param digest Any 32-byte value. The contract checks nothing about it.
function record(bytes32 digest) external {
if (recordedAt[msg.sender][digest] == 0) {
recordedAt[msg.sender][digest] = block.number;
}
emit Recorded(msg.sender, digest);
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "osaka"
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.