Проверенный контрактТочноеMIT
BulbeaProof
Адрес0xcc693bd2ee55662bd019a298cfba4194a609d39b
- Баланс
0 ETH
- Транзакций
3
- Компилятор
solc 0.8.39
- Тот же код
Только этот контракт
Подробности
- Компилятор
- solc 0.8.39+commit.ce47f2c8
- Язык
- solidity
- Оптимизация
- Да, 200 прогонов
- Версия EVM
- osaka
- Лицензия
- MIT
- Совпадение
- Точноекод создания: да, код в сети: да
- Проверен на Sourcify
- Создан в блоке
- 26 479 781
- Транзакция создания
- 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);
}
}
Настройки компилятораПоказать
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "osaka"
}Исходный код и метаданные: Sourcify.
Исходный код принадлежит авторам контракта.