Verified contractExactCC0-1.0
DAVerifierOnChain
Address0x61b449661467e89f2584f8b8759af4a68fc366da
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.36
- Same code
5 more contracts
Details
- Compiler
- solc 0.8.36+commit.8a079791
- Language
- solidity
- Optimization
- No
- EVM version
- prague
- License
- CC0-1.0
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,084,351
- Creation transaction
- 0x46a861148c…e57dd32aec
2 files
src/verification/da/DAVerifierOnChain.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.28;
import {IDAVerifier} from "../../interfaces/IDAVerifier.sol";
/// @title DAVerifierOnChain
/// @author @fredo ([email protected])
/// @notice Verifies data availability by checking that keccak256(proof) equals the assertion ID
/// @dev The proof field contains the deployable bytecode itself; the hash of the bytecode must match the assertion ID
contract DAVerifierOnChain is IDAVerifier {
/// @notice Verifies a data availability proof for an assertion
/// @dev Returns true when keccak256(proof) matches the assertionId
/// @dev metadata is not used for verification, but is included for compatibility with other DA verifiers
/// @inheritdoc IDAVerifier
function verifyDA(bytes32 assertionId, bytes calldata, bytes calldata proof) external pure returns (bool verified) {
return keccak256(proof) == assertionId;
}
}
src/interfaces/IDAVerifier.sol
// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.8.28;
interface IDAVerifier {
/// @notice Error thrown when a proof is invalid
error InvalidProof();
/// @notice Verifies a data availability proof for an assertion
/// @param assertionId The unique identifier of the assertion
/// @param metadata The metadata of the assertion, needed to verify the proof
/// @param proof The proof proving data availability
/// @return verified True if the proof is valid, false otherwise
function verifyDA(bytes32 assertionId, bytes calldata metadata, bytes calldata proof)
external
view
returns (bool verified);
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 200,
"enabled": false
},
"evmVersion": "prague",
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"solady/=lib/solady/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.