Commit b317943e authored by lbeder's avatar lbeder Committed by Mark Tyneway

Downgrade Solidity to 0.8.14

parent 7248038b
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.19; pragma solidity 0.8.15;
import { Address } from "@openzeppelin/contracts/utils/Address.sol"; import { Address } from "@openzeppelin/contracts/utils/Address.sol";
...@@ -70,17 +70,14 @@ contract EAS is IEAS, Semver, EIP712Verifier { ...@@ -70,17 +70,14 @@ contract EAS is IEAS, Semver, EIP712Verifier {
error NotPayable(); error NotPayable();
error WrongSchema(); error WrongSchema();
// The global schema registry.
ISchemaRegistry private constant _schemaRegistry = ISchemaRegistry(Predeploys.SCHEMA_REGISTRY);
// The global mapping between attestations and their UIDs. // The global mapping between attestations and their UIDs.
mapping(bytes32 uid => Attestation attestation) private _db; mapping(bytes32 => Attestation) private _db;
// The global mapping between data and their timestamps. // The global mapping between data and their timestamps.
mapping(bytes32 data => uint64 timestamp) private _timestamps; mapping(bytes32 => uint64) private _timestamps;
// The global mapping between data and their revocation timestamps. // The global mapping between data and their revocation timestamps.
mapping(address revoker => mapping(bytes32 data => uint64 timestamp)) private _revocationsOffchain; mapping(address => mapping(bytes32 => uint64)) private _revocationsOffchain;
// Upgrade forward-compatibility storage gap // Upgrade forward-compatibility storage gap
uint256[MAX_GAP - 3] private __gap; uint256[MAX_GAP - 3] private __gap;
...@@ -95,7 +92,7 @@ contract EAS is IEAS, Semver, EIP712Verifier { ...@@ -95,7 +92,7 @@ contract EAS is IEAS, Semver, EIP712Verifier {
* @inheritdoc IEAS * @inheritdoc IEAS
*/ */
function getSchemaRegistry() external pure returns (ISchemaRegistry) { function getSchemaRegistry() external pure returns (ISchemaRegistry) {
return _schemaRegistry; return ISchemaRegistry(Predeploys.SCHEMA_REGISTRY);
} }
/** /**
...@@ -441,7 +438,7 @@ contract EAS is IEAS, Semver, EIP712Verifier { ...@@ -441,7 +438,7 @@ contract EAS is IEAS, Semver, EIP712Verifier {
res.uids = new bytes32[](length); res.uids = new bytes32[](length);
// Ensure that we aren't attempting to attest to a non-existing schema. // Ensure that we aren't attempting to attest to a non-existing schema.
SchemaRecord memory schemaRecord = _schemaRegistry.getSchema(schema); SchemaRecord memory schemaRecord = ISchemaRegistry(Predeploys.SCHEMA_REGISTRY).getSchema(schema);
if (schemaRecord.uid == EMPTY_UID) { if (schemaRecord.uid == EMPTY_UID) {
revert InvalidSchema(); revert InvalidSchema();
} }
...@@ -531,7 +528,7 @@ contract EAS is IEAS, Semver, EIP712Verifier { ...@@ -531,7 +528,7 @@ contract EAS is IEAS, Semver, EIP712Verifier {
bool last bool last
) private returns (uint256) { ) private returns (uint256) {
// Ensure that a non-existing schema ID wasn't passed by accident. // Ensure that a non-existing schema ID wasn't passed by accident.
SchemaRecord memory schemaRecord = _schemaRegistry.getSchema(schema); SchemaRecord memory schemaRecord = ISchemaRegistry(Predeploys.SCHEMA_REGISTRY).getSchema(schema);
if (schemaRecord.uid == EMPTY_UID) { if (schemaRecord.uid == EMPTY_UID) {
revert InvalidSchema(); revert InvalidSchema();
} }
...@@ -777,7 +774,7 @@ contract EAS is IEAS, Semver, EIP712Verifier { ...@@ -777,7 +774,7 @@ contract EAS is IEAS, Semver, EIP712Verifier {
* @param time The timestamp. * @param time The timestamp.
*/ */
function _revokeOffchain(address revoker, bytes32 data, uint64 time) private { function _revokeOffchain(address revoker, bytes32 data, uint64 time) private {
mapping(bytes32 data => uint64 timestamp) storage revocations = _revocationsOffchain[revoker]; mapping(bytes32 => uint64) storage revocations = _revocationsOffchain[revoker];
if (revocations[data] != 0) { if (revocations[data] != 0) {
revert AlreadyRevokedOffchain(); revert AlreadyRevokedOffchain();
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.19; pragma solidity 0.8.15;
import { Semver } from "../universal/Semver.sol"; import { Semver } from "../universal/Semver.sol";
...@@ -17,7 +17,7 @@ contract SchemaRegistry is ISchemaRegistry, Semver { ...@@ -17,7 +17,7 @@ contract SchemaRegistry is ISchemaRegistry, Semver {
error AlreadyExists(); error AlreadyExists();
// The global mapping between schema records and their IDs. // The global mapping between schema records and their IDs.
mapping(bytes32 uid => SchemaRecord schemaRecord) private _registry; mapping(bytes32 => SchemaRecord) private _registry;
// Upgrade forward-compatibility storage gap // Upgrade forward-compatibility storage gap
uint256[MAX_GAP - 1] private __gap; uint256[MAX_GAP - 1] private __gap;
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.19; pragma solidity 0.8.15;
import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import { EIP712 } from "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.19; pragma solidity 0.8.15;
import { Semver } from "../../universal/Semver.sol"; import { Semver } from "../../universal/Semver.sol";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment