Commit 6e63898d authored by Mark Tyneway's avatar Mark Tyneway

Revert "Downgrade Solidity to 0.8.14"

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