From f6c89eaaaed21d989b092102b0fec70175df0e66 Mon Sep 17 00:00:00 2001 From: boyuanx Date: Tue, 9 Jul 2024 14:38:10 -0700 Subject: [PATCH 1/5] Added missing revoke check when attesting --- src/core/SP.sol | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/SP.sol b/src/core/SP.sol index d0605e4..0bfcd0b 100644 --- a/src/core/SP.sol +++ b/src/core/SP.sol @@ -605,7 +605,7 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { } function version() external pure override returns (string memory) { - return "1.1.2"; + return "1.1.3"; } function getDelegatedRegisterHash(Schema memory schema) public pure override returns (bytes32) { @@ -701,6 +701,7 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { emit SchemaRegistered(schemaId); } + // solhint-disable-next-line code-complexity function _attest( Attestation memory attestation, string memory indexingKey, @@ -713,7 +714,6 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { if ($.paused) revert Paused(); attestationId = $.attestationCounter++; attestation.attestTimestamp = uint64(block.timestamp); - attestation.revokeTimestamp = 0; // In delegation mode, the attester is already checked ahead of time. if (!delegateMode && attestation.attester != _msgSender()) { revert AttestationWrongAttester(); @@ -727,6 +727,9 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { ) { revert AttestationWrongAttester(); } + if (attestation.revoked || attestation.revokeTimestamp > 0) { + revert AttestationAlreadyRevoked(); + } Schema memory s = $.schemaRegistry[attestation.schemaId]; if (!__schemaExists(attestation.schemaId)) revert SchemaNonexistent(); if (s.maxValidFor > 0) { From 5da9438fa6cf181756c83b08f0bee5a99fa8df77 Mon Sep 17 00:00:00 2001 From: boyuanx Date: Fri, 12 Jul 2024 11:37:40 -0400 Subject: [PATCH 2/5] Removed illegal file --- "\001\240\025\031@\270\311\333@8" | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 "\001\240\025\031@\270\311\333@8" diff --git "a/\001\240\025\031@\270\311\333@8" "b/\001\240\025\031@\270\311\333@8" deleted file mode 100644 index e69de29..0000000 From 365083137611ca2a590c3ed6ccc3f4b295c8b308 Mon Sep 17 00:00:00 2001 From: boyuanx Date: Fri, 12 Jul 2024 14:54:07 -0400 Subject: [PATCH 3/5] chore: bump Solidity version --- .vscode/settings.json | 2 +- foundry.toml | 2 +- hardhat.config.ts | 2 +- src/core/SP.sol | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 419451f..06e6078 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { - "solidity.compileUsingRemoteVersion": "v0.8.24+commit.e11b9ed9", + "solidity.compileUsingRemoteVersion": "v0.8.26+commit.8a97fa7a", "editor.formatOnSave": true, "[solidity]": { "editor.defaultFormatter": "JuanBlanco.solidity" diff --git a/foundry.toml b/foundry.toml index fe5084b..5c2e19d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -1,7 +1,7 @@ [profile.default] src = "src" out = "out" -solc = "0.8.23" +solc = "0.8.26" bytecode_hash = "none" optimizer = true optimizer_runs = 50 diff --git a/hardhat.config.ts b/hardhat.config.ts index 515781e..43cd364 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -18,7 +18,7 @@ const config: HardhatUserConfig = { solidity: { compilers: [ { - version: "0.8.24", + version: "0.8.26", settings: { optimizer: { enabled: true, diff --git a/src/core/SP.sol b/src/core/SP.sol index 0bfcd0b..742263f 100644 --- a/src/core/SP.sol +++ b/src/core/SP.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GNU AGPLv3 -pragma solidity ^0.8.20; +pragma solidity ^0.8.26; import { ISP } from "../interfaces/ISP.sol"; import { ISPHook } from "../interfaces/ISPHook.sol"; From 357534a37fcbeeace1ce852b0dd4f150d87aefd7 Mon Sep 17 00:00:00 2001 From: boyuanx Date: Fri, 12 Jul 2024 15:22:01 -0400 Subject: [PATCH 4/5] feat: remove `registerBatch` and related functions to save code size --- src/core/SP.sol | 32 -------------------------------- src/interfaces/ISP.sol | 15 --------------- 2 files changed, 47 deletions(-) diff --git a/src/core/SP.sol b/src/core/SP.sol index 742263f..b826a40 100644 --- a/src/core/SP.sol +++ b/src/core/SP.sol @@ -89,34 +89,6 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { _callGlobalHook(); } - function registerBatch( - Schema[] calldata schemas, - bytes calldata delegateSignature - ) - external - override - returns (uint64[] memory schemaIds) - { - bool delegateMode = delegateSignature.length != 0; - address registrant = schemas[0].registrant; - if (delegateMode) { - // solhint-disable-next-line max-line-length - __checkDelegationSignature(schemas[0].registrant, getDelegatedRegisterBatchHash(schemas), delegateSignature); - } else { - if (schemas[0].registrant != _msgSender()) { - revert SchemaWrongRegistrant(); - } - } - schemaIds = new uint64[](schemas.length); - for (uint256 i = 0; i < schemas.length; i++) { - if (delegateMode && schemas[i].registrant != registrant) { - revert SchemaWrongRegistrant(); - } - schemaIds[i] = _register(schemas[i]); - } - _callGlobalHook(); - } - function attest( Attestation calldata attestation, string calldata indexingKey, @@ -612,10 +584,6 @@ contract SP is ISP, UUPSUpgradeable, OwnableUpgradeable { return keccak256(abi.encode(REGISTER_ACTION_NAME, schema)); } - function getDelegatedRegisterBatchHash(Schema[] memory schemas) public pure override returns (bytes32) { - return keccak256(abi.encode(REGISTER_ACTION_NAME, schemas)); - } - function getDelegatedAttestHash(Attestation memory attestation) public pure override returns (bytes32) { return keccak256(abi.encode(ATTEST_ACTION_NAME, attestation)); } diff --git a/src/interfaces/ISP.sol b/src/interfaces/ISP.sol index 47f6931..2b5bbfa 100644 --- a/src/interfaces/ISP.sol +++ b/src/interfaces/ISP.sol @@ -229,16 +229,6 @@ interface ISP is IVersionable { ) external; - /** - * @notice Batch registers a Schema. - */ - function registerBatch( - Schema[] calldata schemas, - bytes calldata delegateSignature - ) - external - returns (uint64[] calldata schemaIds); - /** * @notice Batch attests. */ @@ -359,11 +349,6 @@ interface ISP is IVersionable { */ function getDelegatedRegisterHash(Schema memory schema) external pure returns (bytes32); - /** - * @notice Returns the hash that will be used to authorize a delegated batch registration. - */ - function getDelegatedRegisterBatchHash(Schema[] memory schemas) external pure returns (bytes32); - /** * @notice Returns the hash that will be used to authorize a delegated attestation. */ From 7b065f8680fed0afc50ae64fb1038426c015cb57 Mon Sep 17 00:00:00 2001 From: tyjkawa <107705896+tyjkawa@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:08:35 -0700 Subject: [PATCH 5/5] Revised test cases for removed Batch Register Feature and for added check of Revoked Attestations --- test/SP.test.sol | 213 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 173 insertions(+), 40 deletions(-) diff --git a/test/SP.test.sol b/test/SP.test.sol index 08f92a0..51f0c1f 100644 --- a/test/SP.test.sol +++ b/test/SP.test.sol @@ -47,19 +47,32 @@ contract SPTest is Test { // NON DELEGATED TEST CASES function test_register() public { - Schema[] memory schemas = _createMockSchemas(); + Schema[] memory schemas = _createMockSchemas(); // Make Two Schemas // Register 2 different schemas, check events & storage - uint64 currentSchemaCounter = sp.schemaCounter(); + uint64 currentSchemaCounter = sp.schemaCounter(); // Current Schema Counter + + // Warping to Mock Timestamp + uint64 mockTimestamp = 12_345; + vm.warp(mockTimestamp); + + // Expecting Emitting Events vm.expectEmit(); emit SchemaRegistered(currentSchemaCounter++); + uint64 schemaId0 = sp.register(schemas[0], ""); + + vm.expectEmit(); emit SchemaRegistered(currentSchemaCounter++); - uint64 mockTimestamp = 12_345; - vm.warp(mockTimestamp); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + uint64 schemaId1 = sp.register(schemas[1], ""); + + // Expected Schema Schema memory schema0Expected = schemas[0]; Schema memory schema1Expected = schemas[1]; - Schema memory schema0Actual = sp.getSchema(schemaIds[0]); - Schema memory schema1Actual = sp.getSchema(schemaIds[1]); + + // Actual Schemas + Schema memory schema0Actual = sp.getSchema(schemaId0); + Schema memory schema1Actual = sp.getSchema(schemaId1); + + // Asserting Actual Schema = Expected Schema assertEq(schema0Expected.data, schema0Actual.data); assertEq(schema0Expected.revocable, schema0Actual.revocable); assertEq(address(schema0Expected.hook), address(schema0Actual.hook)); @@ -75,23 +88,32 @@ contract SPTest is Test { function test_attest() public { uint64 mockTimestamp = 12_345; vm.warp(mockTimestamp); - // Register 2 different schemas - Schema[] memory schemas = _createMockSchemas(); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); - // Create two normal attestations + + // Creating Two Schemas + Schema[] memory schemas = _createMockSchemas(); // Two Mock Schemas + + // Registering Two Schemas + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + + // Create Two Normal Attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); + // Modify the second one to trigger `AttestationInvalidDuration` uint64 attestationId0 = sp.attestationCounter(); attestations[1].validUntil = uint64(mockTimestamp + attestations[1].validUntil + schemas[1].maxValidFor + 1); vm.expectRevert(abi.encodeWithSelector(AttestationInvalidDuration.selector)); vm.prank(prankSender); sp.attestBatch(attestations, indexingKeys, "", ""); + // Reset and trigger `SchemaNonexistent` (attestations,) = _createMockAttestations(schemaIds); attestations[1].schemaId = 0; vm.expectRevert(abi.encodeWithSelector(SchemaNonexistent.selector)); vm.prank(prankSender); sp.attestBatch(attestations, indexingKeys, "", ""); + // Reset and trigger `AttestationNonexistent` for a linked attestation (attestations,) = _createMockAttestations(schemaIds); uint64 nonexistentAttestationId = 100_000; @@ -99,6 +121,7 @@ contract SPTest is Test { vm.expectRevert(abi.encodeWithSelector(AttestationNonexistent.selector)); vm.prank(prankSender); sp.attestBatch(attestations, indexingKeys, "", ""); + // Reset and trigger `AttestationWrongAttester` for a linked attestation (attestations,) = _createMockAttestations(schemaIds); attestations[1].attester = prankRecipient0; @@ -110,6 +133,7 @@ contract SPTest is Test { vm.expectRevert(abi.encodeWithSelector(AttestationWrongAttester.selector)); vm.prank(prankRecipient0); sp.attest(attestations[1], indexingKeys[1], "", ""); + // Reset and make attest normally (attestations,) = _createMockAttestations(schemaIds); attestations[1].linkedAttestationId = attestationId0; @@ -117,6 +141,7 @@ contract SPTest is Test { emit AttestationMade(attestationId0 + 1, indexingKeys[1]); vm.prank(prankSender); sp.attest(attestations[1], indexingKeys[1], "", ""); + // Check storage Attestation memory attestation0Actual = sp.getAttestation(attestationId0); Attestation memory attestation1Actual = sp.getAttestation(attestationId0 + 1); @@ -133,12 +158,18 @@ contract SPTest is Test { function test_revokeFail() public { // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + + // Registering Two Schemas + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + // Make two normal attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); vm.prank(prankSender); uint64[] memory attestationIds = sp.attestBatch(attestations, indexingKeys, "", ""); string[] memory reasons = _createMockReasons(); + // Trigger `AttestationNonexistent` uint64 originalAttestationid = attestationIds[0]; uint64 fakeAttestationId = 10_000; @@ -147,10 +178,12 @@ contract SPTest is Test { vm.prank(prankSender); sp.revokeBatch(attestationIds, reasons, "", ""); attestationIds[0] = originalAttestationid; + // Trigger `AttestationIrrevocable` vm.expectRevert(abi.encodeWithSelector(AttestationIrrevocable.selector)); vm.prank(prankSender); sp.revokeBatch(attestationIds, reasons, "", ""); + // Trigger `AttestationWrongAttester` vm.expectRevert(abi.encodeWithSelector(AttestationWrongAttester.selector)); sp.revokeBatch(attestationIds, reasons, "", ""); @@ -159,15 +192,20 @@ contract SPTest is Test { function test_revoke() public { uint64 mockTimestamp = 12_345; vm.warp(mockTimestamp); + // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); schemas[1].revocable = true; - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + // Make two normal attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); vm.prank(prankSender); uint64[] memory attestationIds = sp.attestBatch(attestations, indexingKeys, "", ""); string[] memory reasons = _createMockReasons(); + // Revoke normally vm.expectEmit(); emit AttestationRevoked(attestationIds[0], reasons[0]); @@ -175,6 +213,7 @@ contract SPTest is Test { vm.prank(prankSender); sp.revokeBatch(attestationIds, reasons, "", ""); assertEq(sp.getAttestation(attestationIds[0]).revokeTimestamp, mockTimestamp); + // Revoke again and trigger `AttestationAlreadyRevoked` vm.expectRevert(abi.encodeWithSelector(AttestationAlreadyRevoked.selector)); vm.prank(prankSender); @@ -219,6 +258,53 @@ contract SPTest is Test { sp.revokeOffchainBatch(attestationIds, reasons, ""); } + function test_attestationsAlreadyRevoked() public { + uint64 mockTimestamp = 12_345; + vm.warp(mockTimestamp); + + // Register 2 different schemas + Schema[] memory schemas = _createMockSchemas(); + schemas[1].revocable = true; + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + + // Make two normal attestations + (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); + vm.prank(prankSender); + uint64[] memory attestationIds = sp.attestBatch(attestations, indexingKeys, "", ""); + string[] memory reasons = _createMockReasons(); + + // Revoke normally + vm.expectEmit(); + emit AttestationRevoked(attestationIds[0], reasons[0]); + emit AttestationRevoked(attestationIds[1], reasons[1]); + vm.prank(prankSender); + sp.revokeBatch(attestationIds, reasons, "", ""); + assertEq(sp.getAttestation(attestationIds[0]).revokeTimestamp, mockTimestamp); + + // Revoke again and trigger `AttestationAlreadyRevoked` + vm.expectRevert(abi.encodeWithSelector(AttestationAlreadyRevoked.selector)); + vm.prank(prankSender); + sp.revokeBatch(attestationIds, reasons, "", ""); + + // Attest Initial Attestation Struct Again + vm.prank(prankSender); + sp.attestBatch(attestations, indexingKeys, "", ""); + + // Attest with Attestation[0] revoketimestamp > 0 and Attestation[1] revoked = true + (Attestation[] memory attestationsRevoked, string[] memory indexingKeysRevoked) = + _createRevokedMockAttestations(schemaIds); + + vm.prank(prankSender); + vm.expectRevert(abi.encodeWithSelector(AttestationAlreadyRevoked.selector)); + sp.attest(attestationsRevoked[0], indexingKeysRevoked[0], "", ""); + + vm.prank(prankSender); + vm.expectRevert(abi.encodeWithSelector(AttestationAlreadyRevoked.selector)); + sp.attest(attestationsRevoked[1], indexingKeysRevoked[1], "", ""); + } + // DELEGATED TEST CASES function test_register_delegated() public { @@ -232,22 +318,14 @@ contract SPTest is Test { sp.register(schemas[0], _vrsToSignature(v, r, s)); } - function test_register_batch_delegated() public { - (address signer, uint256 signerPk) = makeAddrAndKey("registrant"); - Schema[] memory schemas = _createMockSchemas(); - schemas[0].registrant = signer; - schemas[1].registrant = signer; - bytes32 hash = sp.getDelegatedRegisterBatchHash(schemas); - (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, MessageHashUtils.toEthSignedMessageHash(hash)); - vm.expectRevert(abi.encodeWithSelector(SchemaWrongRegistrant.selector)); - sp.registerBatch(schemas, ""); - sp.registerBatch(schemas, _vrsToSignature(v, r, s)); - } - function test_attest_delegated() public { // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + uint64 attestationId0 = sp.attestationCounter(); // Create two normal attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); @@ -277,27 +355,35 @@ contract SPTest is Test { function test_attest_batch_delegated() public { // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + uint64 attestationId0 = sp.attestationCounter(); + // Create two normal attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); + // Create ECDSA signature (address signer, uint256 signerPk) = makeAddrAndKey("signer"); attestations[0].attester = signer; attestations[1].attester = signer; bytes32 hash = sp.getDelegatedAttestBatchHash(attestations); (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, MessageHashUtils.toEthSignedMessageHash(hash)); + // Delegate attest batch sp.attestBatch(attestations, indexingKeys, _vrsToSignature(v, r, s), ""); Attestation memory attestation0Actual = sp.getAttestation(attestationId0); Attestation memory attestation1Actual = sp.getAttestation(attestationId0 + 1); assertEq(attestation0Actual.attester, signer); assertEq(attestation1Actual.attester, signer); + // Alter attestation after generating signature, should fail signature check attestations[1].attester = prankSender; vm.expectRevert(abi.encodeWithSelector(InvalidDelegateSignature.selector)); sp.attestBatch(attestations, indexingKeys, _vrsToSignature(v, r, s), ""); attestations[1].attester = signer; + // Try to make signer sign for someone else, should fail checks // Altering the first reference attester, should revert with `InvalidDelegateSignature` attestations[0].attester = prankSender; @@ -306,6 +392,7 @@ contract SPTest is Test { vm.expectRevert(abi.encodeWithSelector(InvalidDelegateSignature.selector)); sp.attestBatch(attestations, indexingKeys, _vrsToSignature(v, r, s), ""); attestations[0].attester = signer; + // Altering the second attester, should fail attester consistency check attestations[1].attester = prankSender; hash = sp.getDelegatedAttestBatchHash(attestations); @@ -346,7 +433,11 @@ contract SPTest is Test { function test_revoke_delegated() public { // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + uint64 attestationId0 = sp.attestationCounter(); // Create two normal attestations (Attestation[] memory attestations, string[] memory indexingKeys) = _createMockAttestations(schemaIds); @@ -371,7 +462,11 @@ contract SPTest is Test { // Register 2 different schemas Schema[] memory schemas = _createMockSchemas(); schemas[1].revocable = true; - uint64[] memory schemaIds = sp.registerBatch(schemas, ""); + + uint64[] memory schemaIds = new uint64[](2); // Two Schema Ids + schemaIds[0] = sp.register(schemas[0], ""); + schemaIds[1] = sp.register(schemas[1], ""); + uint64[] memory attestationIds = new uint64[](2); attestationIds[0] = sp.attestationCounter(); attestationIds[1] = attestationIds[0] + 1; @@ -467,11 +562,11 @@ contract SPTest is Test { return schemas; } - function _createMockRecipient() internal view returns (address[] memory) { - address[] memory addresses = new address[](1); - addresses[0] = prankRecipient0; - return addresses; - } + // function _createMockRecipient() internal view returns (address[] memory) { + // address[] memory addresses = new address[](1); + // addresses[0] = prankRecipient0; + // return addresses; + // } function _createMockRecipients() internal view returns (bytes[] memory) { bytes[] memory addresses = new bytes[](2); @@ -527,6 +622,44 @@ contract SPTest is Test { return (attestations, indexingKeys); } + function _createRevokedMockAttestations(uint64[] memory schemaIds) + internal + view + returns (Attestation[] memory, string[] memory) + { + Attestation memory attestation0 = Attestation({ + schemaId: schemaIds[0], + linkedAttestationId: 0, + attestTimestamp: 0, + revokeTimestamp: 100, + data: "", + attester: prankSender, + validUntil: uint64(block.timestamp), + dataLocation: DataLocation.ONCHAIN, + revoked: false, + recipients: _createMockRecipients() + }); + Attestation memory attestation1 = Attestation({ + schemaId: schemaIds[1], + linkedAttestationId: 0, + attestTimestamp: 0, + revokeTimestamp: 0, + data: "", + attester: prankSender, + validUntil: uint64(block.timestamp), + dataLocation: DataLocation.ONCHAIN, + revoked: true, + recipients: _createMockRecipients() + }); + Attestation[] memory attestations = new Attestation[](2); + attestations[0] = attestation0; + attestations[1] = attestation1; + string[] memory indexingKeys = new string[](2); + indexingKeys[0] = "test indexing key 0"; + indexingKeys[1] = "test indexing key 1"; + return (attestations, indexingKeys); + } + function _createMockReasons() internal pure returns (string[] memory) { string[] memory reasons = new string[](2); reasons[0] = "Reason 1"; @@ -534,12 +667,12 @@ contract SPTest is Test { return reasons; } - function _createMockResolverFeesETH() internal pure returns (uint256[] memory, uint256) { - uint256[] memory fees = new uint256[](2); - fees[0] = 1 ether; - fees[1] = 4 ether; - return (fees, 5 ether); - } + // function _createMockResolverFeesETH() internal pure returns (uint256[] memory, uint256) { + // uint256[] memory fees = new uint256[](2); + // fees[0] = 1 ether; + // fees[1] = 4 ether; + // return (fees, 5 ether); + // } function _vrsToSignature(uint8 v, bytes32 r, bytes32 s) internal pure returns (bytes memory) { return abi.encodePacked(r, s, v);