Created
March 27, 2024 13:03
-
-
Save Turupawn/82ba5a9b844e30a3473bb1f1e1821a13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.19; | |
import { SchemaResolver } from "@ethereum-attestation-service/eas-contracts/contracts/resolver/SchemaResolver.sol"; | |
import { IEAS, Attestation } from "@ethereum-attestation-service/eas-contracts/contracts/IEAS.sol"; | |
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; | |
contract AttestationResolver is SchemaResolver, Ownable { | |
constructor(IEAS eas) SchemaResolver(eas) Ownable() {} | |
function onAttest(Attestation calldata attestation, uint256 /*value*/) internal view override returns (bool) { | |
require(attestation.attester == owner(), "Must be valid attester"); | |
return true; | |
} | |
function onRevoke(Attestation calldata /*attestation*/, uint256 /*value*/) internal pure override returns (bool) { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment