From 100445f31dd1e39992fa806d367f9f41a5cce0b6 Mon Sep 17 00:00:00 2001 From: "Adi.K" <166922118+adityagupta0251@users.noreply.github.com> Date: Tue, 14 Apr 2026 00:56:06 +0530 Subject: [PATCH 1/4] all done --- .../script/FullDeploymentScript.s.sol | 29 +-- .../script/TheGuildInternalResolver.s.sol | 39 ++++ .../src/TheGuildInternalResolver.sol | 46 ++++ .../test/TheGuildInternalResolver.t.sol | 214 ++++++++++++++++++ 4 files changed, 314 insertions(+), 14 deletions(-) create mode 100644 the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol create mode 100644 the-guild-smart-contracts/src/TheGuildInternalResolver.sol create mode 100644 the-guild-smart-contracts/test/TheGuildInternalResolver.t.sol diff --git a/the-guild-smart-contracts/script/FullDeploymentScript.s.sol b/the-guild-smart-contracts/script/FullDeploymentScript.s.sol index 86f4baf..c666f42 100644 --- a/the-guild-smart-contracts/script/FullDeploymentScript.s.sol +++ b/the-guild-smart-contracts/script/FullDeploymentScript.s.sol @@ -7,6 +7,7 @@ import {AttestationRequestData, AttestationRequest} from "eas-contracts/IEAS.sol import {SchemaRegistry} from "eas-contracts/SchemaRegistry.sol"; import {TheGuildActivityToken} from "../src/TheGuildActivityToken.sol"; import {TheGuildAttestationResolver} from "../src/TheGuildAttestationResolver.sol"; +import {TheGuildInternalResolver} from "../src/TheGuildInternalResolver.sol"; import {TheGuildBadgeRegistry} from "../src/TheGuildBadgeRegistry.sol"; import {TheGuildBadgeRanking} from "../src/TheGuildBadgeRanking.sol"; import {EASUtils} from "./utils/EASUtils.s.sol"; @@ -50,23 +51,23 @@ contract FullDeploymentScript is Script { EASUtils.getSchemaRegistryAddress(vm) ); bytes32 schemaId = schemaRegistry.register(schema, resolver, true); - console.logString("Schema ID:"); + console.logString("Badge Attestation Schema ID:"); console.logBytes32(schemaId); - // Create some badges - badgeRegistry.createBadge( - bytes32("Rust"), - bytes("Know how to code in Rust") - ); - badgeRegistry.createBadge( - bytes32("Solidity"), - bytes("Know how to code in Solidity") - ); - badgeRegistry.createBadge( - bytes32("TypeScript"), - bytes("Know how to code in TypeScript") - ); + // Deploy Internal Resolver via CREATE2 + TheGuildInternalResolver internalResolver = new TheGuildInternalResolver{ + salt: salt + }(eas, deployer); + // Register Skill Badge Schema + string memory skillSchema = "string skillDescription, bytes32[] linkedBadges"; + bytes32 skillSchemaId = schemaRegistry.register( + skillSchema, + internalResolver, + true + ); + console.logString("Skill Badge Schema ID:"); + console.logBytes32(skillSchemaId); // Deploy or attach to existing badge ranking via CREATE2 new TheGuildBadgeRanking{salt: salt}(badgeRegistry); diff --git a/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol b/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol new file mode 100644 index 0000000..14af322 --- /dev/null +++ b/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +import {Script} from "forge-std/Script.sol"; +import {IEAS} from "eas-contracts/IEAS.sol"; +import {SchemaRegistry} from "eas-contracts/SchemaRegistry.sol"; +import {TheGuildInternalResolver} from "../src/TheGuildInternalResolver.sol"; +import {EASUtils} from "./utils/EASUtils.s.sol"; +import {console} from "forge-std/console.sol"; + +contract TheGuildInternalResolverScript is Script { + function run() public { + address eas; + eas = EASUtils.getEASAddress(vm); + + uint256 pk = vm.envUint("PRIVATE_KEY"); + address deployer = vm.addr(pk); + vm.startBroadcast(pk); + + TheGuildInternalResolver resolver = new TheGuildInternalResolver( + IEAS(eas), + deployer + ); + + // Register Skill Badge Schema + SchemaRegistry schemaRegistry = SchemaRegistry( + EASUtils.getSchemaRegistryAddress(vm) + ); + string memory schema = "string skillDescription, bytes32[] linkedBadges"; + bytes32 schemaId = schemaRegistry.register(schema, resolver, true); + + console.logString("Internal Resolver deployed at:"); + console.logAddress(address(resolver)); + console.logString("Skill Badge Schema ID:"); + console.logBytes32(schemaId); + + vm.stopBroadcast(); + } +} diff --git a/the-guild-smart-contracts/src/TheGuildInternalResolver.sol b/the-guild-smart-contracts/src/TheGuildInternalResolver.sol new file mode 100644 index 0000000..2eba3a5 --- /dev/null +++ b/the-guild-smart-contracts/src/TheGuildInternalResolver.sol @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +import {SchemaResolver} from "eas-contracts/resolver/SchemaResolver.sol"; +import {IEAS, Attestation} from "eas-contracts/IEAS.sol"; +import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; + +/// @title +/// @notice +contract TheGuildInternalResolver is SchemaResolver, Ownable { + mapping(address => bool) private _authorizedAttesters; + + event AttesterAuthorized(address indexed attester, bool authorized); + + constructor(IEAS eas, address initialOwner) SchemaResolver(eas) Ownable(initialOwner) { + _authorizedAttesters[initialOwner] = true; + emit AttesterAuthorized(initialOwner, true); + } + + /// @notice + function setAuthorizedAttester(address attester, bool authorized) external onlyOwner { + _authorizedAttesters[attester] = authorized; + emit AttesterAuthorized(attester, authorized); + } + + /// @notice + function isAuthorizedAttester(address attester) public view returns (bool) { + return _authorizedAttesters[attester]; + } + + /// @inheritdoc + function onAttest( + Attestation calldata attestation, + uint256 + ) internal view override returns (bool) { + return _authorizedAttesters[attestation.attester]; + } + + /// @inheritdoc SchemaResolver + function onRevoke( + Attestation calldata attestation, + uint256 + ) internal view override returns (bool) { + return _authorizedAttesters[attestation.attester]; + } +} diff --git a/the-guild-smart-contracts/test/TheGuildInternalResolver.t.sol b/the-guild-smart-contracts/test/TheGuildInternalResolver.t.sol new file mode 100644 index 0000000..24bdf9a --- /dev/null +++ b/the-guild-smart-contracts/test/TheGuildInternalResolver.t.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +import {Test} from "forge-std/Test.sol"; +import {TheGuildInternalResolver} from "../src/TheGuildInternalResolver.sol"; + + +import {EAS} from "eas-contracts/EAS.sol"; +import {SchemaRegistry} from "eas-contracts/SchemaRegistry.sol"; +import {IEAS, AttestationRequest, AttestationRequestData, Attestation, RevocationRequestData, RevocationRequest} from "eas-contracts/IEAS.sol"; + +contract TheGuildInternalResolverTest is Test { + TheGuildInternalResolver private resolver; + SchemaRegistry private schemaRegistry; + EAS private eas; + + address private owner = address(this); + address private authorizedAttester = address(0xA11CE); + address private unauthorizedAttester = address(0xBEEF); + address private recipient = address(0xCAFE); + + function setUp() public { + + schemaRegistry = new SchemaRegistry(); + eas = new EAS(schemaRegistry); + + + resolver = new TheGuildInternalResolver( + IEAS(address(eas)), + owner + ); + } + + function _registerSchema() internal returns (bytes32) { + + string memory schema = "string skillDescription, bytes32[] linkedBadges"; + + bytes32 schemaId = schemaRegistry.register(schema, resolver, true); + return schemaId; + } + + function test_AttestationByOwnerSucceeds() public { + bytes32 schemaId = _registerSchema(); + + bytes32[] memory linkedBadges = new bytes32[](2); + linkedBadges[0] = bytes32("Solidity"); + linkedBadges[1] = bytes32("Rust"); + + AttestationRequestData memory data = AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Master of Smart Contracts", linkedBadges), + value: 0 + }); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: data + }); + + + eas.attest(request); + + } + + function test_AttestationByAuthorizedAttesterSucceeds() public { + bytes32 schemaId = _registerSchema(); + resolver.setAuthorizedAttester(authorizedAttester, true); + + bytes32[] memory linkedBadges = new bytes32[](1); + linkedBadges[0] = bytes32("Solidity"); + + AttestationRequestData memory data = AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Solidity Dev", linkedBadges), + value: 0 + }); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: data + }); + + vm.prank(authorizedAttester); + eas.attest(request); + + } + + function test_AttestationByUnauthorizedAttesterFails() public { + bytes32 schemaId = _registerSchema(); + + bytes32[] memory linkedBadges = new bytes32[](1); + linkedBadges[0] = bytes32("Solidity"); + + AttestationRequestData memory data = AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Solidity Dev", linkedBadges), + value: 0 + }); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: data + }); + + vm.prank(unauthorizedAttester); + vm.expectRevert(); + eas.attest(request); + } + + function test_RevocationByAuthorizedAttesterSucceeds() public { + bytes32 schemaId = _registerSchema(); + resolver.setAuthorizedAttester(authorizedAttester, true); + + bytes32[] memory linkedBadges = new bytes32[](1); + linkedBadges[0] = bytes32("Solidity"); + + AttestationRequestData memory data = AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Solidity Dev", linkedBadges), + value: 0 + }); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: data + }); + + vm.prank(authorizedAttester); + bytes32 uid = eas.attest(request); + + vm.prank(authorizedAttester); + eas.revoke( + RevocationRequest({ + schema: schemaId, + data: RevocationRequestData({uid: uid, value: 0}) + }) + ); + // success == no revert + } + + function test_RevocationByUnauthorizedAttesterFails() public { + bytes32 schemaId = _registerSchema(); + resolver.setAuthorizedAttester(authorizedAttester, true); + + bytes32[] memory linkedBadges = new bytes32[](1); + linkedBadges[0] = bytes32("Solidity"); + + AttestationRequestData memory data = AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Solidity Dev", linkedBadges), + value: 0 + }); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: data + }); + + vm.prank(authorizedAttester); + bytes32 uid = eas.attest(request); + + vm.prank(unauthorizedAttester); + vm.expectRevert(); + eas.revoke( + RevocationRequest({ + schema: schemaId, + data: RevocationRequestData({uid: uid, value: 0}) + }) + ); + } + + function test_DeauthorizeAttester() public { + bytes32 schemaId = _registerSchema(); + resolver.setAuthorizedAttester(authorizedAttester, true); + assertTrue(resolver.isAuthorizedAttester(authorizedAttester)); + + resolver.setAuthorizedAttester(authorizedAttester, false); + assertFalse(resolver.isAuthorizedAttester(authorizedAttester)); + + bytes32[] memory linkedBadges = new bytes32[](1); + linkedBadges[0] = bytes32("Solidity"); + + AttestationRequest memory request = AttestationRequest({ + schema: schemaId, + data: AttestationRequestData({ + recipient: recipient, + expirationTime: 0, + revocable: true, + refUID: bytes32(0), + data: abi.encode("Solidity Dev", linkedBadges), + value: 0 + }) + }); + + vm.prank(authorizedAttester); + vm.expectRevert(); + eas.attest(request); + } +} From bfa5e68939ad1356c627b4e574b1613102f1b58c Mon Sep 17 00:00:00 2001 From: "Adi.K" <166922118+adityagupta0251@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:09:12 +0530 Subject: [PATCH 2/4] fixed --- .../script/TheGuildInternalResolver.s.sol | 75 ++++++++++--------- 1 file changed, 41 insertions(+), 34 deletions(-) diff --git a/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol b/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol index 14af322..179262b 100644 --- a/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol +++ b/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol @@ -1,39 +1,46 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.13; -import {Script} from "forge-std/Script.sol"; -import {IEAS} from "eas-contracts/IEAS.sol"; -import {SchemaRegistry} from "eas-contracts/SchemaRegistry.sol"; -import {TheGuildInternalResolver} from "../src/TheGuildInternalResolver.sol"; -import {EASUtils} from "./utils/EASUtils.s.sol"; -import {console} from "forge-std/console.sol"; - -contract TheGuildInternalResolverScript is Script { - function run() public { - address eas; - eas = EASUtils.getEASAddress(vm); - - uint256 pk = vm.envUint("PRIVATE_KEY"); - address deployer = vm.addr(pk); - vm.startBroadcast(pk); - - TheGuildInternalResolver resolver = new TheGuildInternalResolver( - IEAS(eas), - deployer - ); - - // Register Skill Badge Schema - SchemaRegistry schemaRegistry = SchemaRegistry( - EASUtils.getSchemaRegistryAddress(vm) - ); - string memory schema = "string skillDescription, bytes32[] linkedBadges"; - bytes32 schemaId = schemaRegistry.register(schema, resolver, true); - - console.logString("Internal Resolver deployed at:"); - console.logAddress(address(resolver)); - console.logString("Skill Badge Schema ID:"); - console.logBytes32(schemaId); - - vm.stopBroadcast(); +import {SchemaResolver} from "eas-contracts/resolver/SchemaResolver.sol"; +import {IEAS, Attestation} from "eas-contracts/IEAS.sol"; +import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; + +/// @title TheGuildInternalResolver +/// @notice EAS schema resolver that restricts attestations to authorized Guild accounts only. +contract TheGuildInternalResolver is SchemaResolver, Ownable { + mapping(address => bool) private _authorizedAttesters; + + event AttesterAuthorized(address indexed attester, bool authorized); + + constructor(IEAS eas, address initialOwner) SchemaResolver(eas) Ownable(initialOwner) { + _authorizedAttesters[initialOwner] = true; + emit AttesterAuthorized(initialOwner, true); + } + + /// @notice Authorize or deauthorize an account to create attestations. + function setAuthorizedAttester(address attester, bool authorized) external onlyOwner { + _authorizedAttesters[attester] = authorized; + emit AttesterAuthorized(attester, authorized); + } + + /// @notice Check if an account is an authorized attester. + function isAuthorizedAttester(address attester) public view returns (bool) { + return _authorizedAttesters[attester]; + } + + /// @inheritdoc SchemaResolver + function onAttest( + Attestation calldata attestation, + uint256 + ) internal view override returns (bool) { + return _authorizedAttesters[attestation.attester]; + } + + /// @inheritdoc SchemaResolver + function onRevoke( + Attestation calldata attestation, + uint256 + ) internal view override returns (bool) { + return _authorizedAttesters[attestation.attester]; } } From f8a84644ba903482c952829bd00e039f3570b15b Mon Sep 17 00:00:00 2001 From: "Adi.K" <166922118+adityagupta0251@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:09:52 +0530 Subject: [PATCH 3/4] fixed --- .../src/TheGuildInternalResolver.sol | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/the-guild-smart-contracts/src/TheGuildInternalResolver.sol b/the-guild-smart-contracts/src/TheGuildInternalResolver.sol index 2eba3a5..179262b 100644 --- a/the-guild-smart-contracts/src/TheGuildInternalResolver.sol +++ b/the-guild-smart-contracts/src/TheGuildInternalResolver.sol @@ -5,8 +5,8 @@ import {SchemaResolver} from "eas-contracts/resolver/SchemaResolver.sol"; import {IEAS, Attestation} from "eas-contracts/IEAS.sol"; import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; -/// @title -/// @notice +/// @title TheGuildInternalResolver +/// @notice EAS schema resolver that restricts attestations to authorized Guild accounts only. contract TheGuildInternalResolver is SchemaResolver, Ownable { mapping(address => bool) private _authorizedAttesters; @@ -17,18 +17,18 @@ contract TheGuildInternalResolver is SchemaResolver, Ownable { emit AttesterAuthorized(initialOwner, true); } - /// @notice + /// @notice Authorize or deauthorize an account to create attestations. function setAuthorizedAttester(address attester, bool authorized) external onlyOwner { _authorizedAttesters[attester] = authorized; emit AttesterAuthorized(attester, authorized); } - /// @notice + /// @notice Check if an account is an authorized attester. function isAuthorizedAttester(address attester) public view returns (bool) { return _authorizedAttesters[attester]; } - /// @inheritdoc + /// @inheritdoc SchemaResolver function onAttest( Attestation calldata attestation, uint256 From 5751ec2af20011d17ac3dae02666b9cf17400396 Mon Sep 17 00:00:00 2001 From: "Adi.K" <166922118+adityagupta0251@users.noreply.github.com> Date: Wed, 15 Apr 2026 15:04:09 +0530 Subject: [PATCH 4/4] refactor: remove duplicate resolver script and update full deployment --- .../script/FullDeploymentScript.s.sol | 48 +++++++++---------- .../script/TheGuildInternalResolver.s.sol | 46 ------------------ 2 files changed, 22 insertions(+), 72 deletions(-) delete mode 100644 the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol diff --git a/the-guild-smart-contracts/script/FullDeploymentScript.s.sol b/the-guild-smart-contracts/script/FullDeploymentScript.s.sol index c666f42..cb5f03d 100644 --- a/the-guild-smart-contracts/script/FullDeploymentScript.s.sol +++ b/the-guild-smart-contracts/script/FullDeploymentScript.s.sol @@ -15,65 +15,61 @@ import {console} from "forge-std/console.sol"; contract FullDeploymentScript is Script { function run() public { - EAS eas; bytes32 salt = bytes32("theguild_v_0.1.3"); - // EAS addresses per https://github.com/ethereum-attestation-service/eas-contracts deployments - // Base mainnet (8453) and Base Goerli/Sepolia (84531/84532) use the canonical predeploy 0x...21 - // Optimism mainnet (10) and OP Sepolia (11155420) also use canonical 0x...21 + EAS eas = EAS(EASUtils.getEASAddress(vm)); - eas = EAS(EASUtils.getEASAddress(vm)); - - // Derive deployer EOA from PRIVATE_KEY to keep ownership consistent under CREATE2 factory + uint256 pk = vm.envUint("PRIVATE_KEY"); address deployer = vm.addr(pk); + vm.startBroadcast(pk); - // Deploy activity token via CREATE2 with initial owner set to EOA (tx.origin) + TheGuildActivityToken activityToken = new TheGuildActivityToken{ salt: salt }(deployer); - // Deploy or attach to existing badge registry via CREATE2 (needs to exist before resolver) TheGuildBadgeRegistry badgeRegistry = new TheGuildBadgeRegistry{ salt: salt }(); - // Deploy resolver via CREATE2 + TheGuildAttestationResolver resolver = new TheGuildAttestationResolver{ salt: salt }(eas, activityToken, badgeRegistry); - // Transfer ownership from EOA to resolver so it can mint on attest + + activityToken.transferOwnership(address(resolver)); - // Register TheGuild Schema - string memory schema = "bytes32 badgeName, bytes justification"; + SchemaRegistry schemaRegistry = SchemaRegistry( EASUtils.getSchemaRegistryAddress(vm) ); + string memory schema = "bytes32 badgeName, bytes justification"; bytes32 schemaId = schemaRegistry.register(schema, resolver, true); - console.logString("Badge Attestation Schema ID:"); - console.logBytes32(schemaId); + + console.log("Badge Attestation Schema ID:", vm.toString(schemaId)); - // Deploy Internal Resolver via CREATE2 + // This deployment sets 'deployer' as the initial owner and authorized attester TheGuildInternalResolver internalResolver = new TheGuildInternalResolver{ salt: salt }(eas, deployer); - // Register Skill Badge Schema + string memory skillSchema = "string skillDescription, bytes32[] linkedBadges"; bytes32 skillSchemaId = schemaRegistry.register( skillSchema, internalResolver, true ); - console.logString("Skill Badge Schema ID:"); - console.logBytes32(skillSchemaId); - // Deploy or attach to existing badge ranking via CREATE2 + + console.log("Skill Badge Schema ID:", vm.toString(skillSchemaId)); + + new TheGuildBadgeRanking{salt: salt}(badgeRegistry); - // Create some attestations + AttestationRequestData memory data = AttestationRequestData({ - // TheGuild test account recipient: address(0x6cfD0753EC4da15Dcb418E11e921C0665c1d1cBf), expirationTime: 0, revocable: true, @@ -82,11 +78,11 @@ contract FullDeploymentScript is Script { value: 0 }); - AttestationRequest memory request = AttestationRequest({ + eas.attest(AttestationRequest({ schema: schemaId, data: data - }); - eas.attest(request); + })); + vm.stopBroadcast(); } -} +} \ No newline at end of file diff --git a/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol b/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol deleted file mode 100644 index 179262b..0000000 --- a/the-guild-smart-contracts/script/TheGuildInternalResolver.s.sol +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.13; - -import {SchemaResolver} from "eas-contracts/resolver/SchemaResolver.sol"; -import {IEAS, Attestation} from "eas-contracts/IEAS.sol"; -import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; - -/// @title TheGuildInternalResolver -/// @notice EAS schema resolver that restricts attestations to authorized Guild accounts only. -contract TheGuildInternalResolver is SchemaResolver, Ownable { - mapping(address => bool) private _authorizedAttesters; - - event AttesterAuthorized(address indexed attester, bool authorized); - - constructor(IEAS eas, address initialOwner) SchemaResolver(eas) Ownable(initialOwner) { - _authorizedAttesters[initialOwner] = true; - emit AttesterAuthorized(initialOwner, true); - } - - /// @notice Authorize or deauthorize an account to create attestations. - function setAuthorizedAttester(address attester, bool authorized) external onlyOwner { - _authorizedAttesters[attester] = authorized; - emit AttesterAuthorized(attester, authorized); - } - - /// @notice Check if an account is an authorized attester. - function isAuthorizedAttester(address attester) public view returns (bool) { - return _authorizedAttesters[attester]; - } - - /// @inheritdoc SchemaResolver - function onAttest( - Attestation calldata attestation, - uint256 - ) internal view override returns (bool) { - return _authorizedAttesters[attestation.attester]; - } - - /// @inheritdoc SchemaResolver - function onRevoke( - Attestation calldata attestation, - uint256 - ) internal view override returns (bool) { - return _authorizedAttesters[attestation.attester]; - } -}