Commit 2fc5c84d authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: cleanup libraries (#8907)

* contracts-bedrock: cleanup libraries

Updates the pragma in libraries to be more permissive, making it less
complex to import the libraries into different codebases. The actual
implementations enforce a particular version, so it is safe to allow
the libs to have permissive versioning contrainsts. Also update the
code to use the absolute path for imports relative from the project
root. Using this import pattern is the standard for the codebase.

* contracts-bedrock: remove warning
parent d893a531
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity 0.8.15; pragma solidity ^0.8.0;
import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol"; import { SignedMath } from "@openzeppelin/contracts/utils/math/SignedMath.sol";
import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol"; import { FixedPointMathLib } from "@rari-capital/solmate/src/utils/FixedPointMathLib.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { ResourceMetering } from "../L1/ResourceMetering.sol"; import { ResourceMetering } from "src/L1/ResourceMetering.sol";
/// @title Constants /// @title Constants
/// @notice Constants is a library for storing constants. Simple! Don't put everything in here, just /// @notice Constants is a library for storing constants. Simple! Don't put everything in here, just
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15; pragma solidity ^0.8.15;
import "./DisputeTypes.sol"; import "src/libraries/DisputeTypes.sol";
//////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////
// `DisputeGameFactory` Errors // // `DisputeGameFactory` Errors //
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { Types } from "./Types.sol"; import { Types } from "src/libraries/Types.sol";
import { Hashing } from "./Hashing.sol"; import { Hashing } from "src/libraries/Hashing.sol";
import { RLPWriter } from "./rlp/RLPWriter.sol"; import { RLPWriter } from "src/libraries/rlp/RLPWriter.sol";
/// @title Encoding /// @title Encoding
/// @notice Encoding handles Optimism's various different encoding schemes. /// @notice Encoding handles Optimism's various different encoding schemes.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; pragma solidity ^0.8.0;
import { Types } from "./Types.sol"; import { Types } from "src/libraries/Types.sol";
import { Encoding } from "./Encoding.sol"; import { Encoding } from "src/libraries/Encoding.sol";
/// @title Hashing /// @title Hashing
/// @notice Hashing handles Optimism's various different hashing schemes. /// @notice Hashing handles Optimism's various different hashing schemes.
......
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