Skip to content

Instantly share code, notes, and snippets.

@Turupawn
Created March 27, 2024 13:03
Show Gist options
  • Save Turupawn/82ba5a9b844e30a3473bb1f1e1821a13 to your computer and use it in GitHub Desktop.
Save Turupawn/82ba5a9b844e30a3473bb1f1e1821a13 to your computer and use it in GitHub Desktop.
// 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