From 6889ca1b630e294131660c83816078d74465a7a0 Mon Sep 17 00:00:00 2001 From: Sergey <2901744+evercoinx@users.noreply.github.com.> Date: Mon, 30 Sep 2024 16:42:24 +0200 Subject: [PATCH] Fix pragma and imports for some contracts --- contracts/interfaces/IPolygonMigration.sol | 2 +- contracts/lib/ExitPayloadReader.sol | 3 ++- contracts/lib/Merkle.sol | 4 ++-- contracts/lib/MerklePatriciaProof.sol | 4 ++-- contracts/lib/RLPReader.sol | 7 ++----- contracts/state-transfer/FxStateChildTunnel.sol | 7 +++---- contracts/state-transfer/FxStateRootTunnel.sol | 7 +++---- contracts/state-transfer/RateProvider.sol | 11 +++++------ contracts/tunnel/FxBaseChildTunnel.sol | 4 ++-- contracts/tunnel/FxBaseRootTunnel.sol | 6 +++--- 10 files changed, 25 insertions(+), 30 deletions(-) diff --git a/contracts/interfaces/IPolygonMigration.sol b/contracts/interfaces/IPolygonMigration.sol index 28051cb6..c9896a8b 100644 --- a/contracts/interfaces/IPolygonMigration.sol +++ b/contracts/interfaces/IPolygonMigration.sol @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: MIT +// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.7; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; diff --git a/contracts/lib/ExitPayloadReader.sol b/contracts/lib/ExitPayloadReader.sol index 51ecb7b6..bf309c6c 100644 --- a/contracts/lib/ExitPayloadReader.sol +++ b/contracts/lib/ExitPayloadReader.sol @@ -1,4 +1,5 @@ -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; import { RLPReader } from "./RLPReader.sol"; diff --git a/contracts/lib/Merkle.sol b/contracts/lib/Merkle.sol index b3a85d01..26f53f15 100644 --- a/contracts/lib/Merkle.sol +++ b/contracts/lib/Merkle.sol @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; library Merkle { function checkMembership( diff --git a/contracts/lib/MerklePatriciaProof.sol b/contracts/lib/MerklePatriciaProof.sol index b1bab44f..92cc557a 100644 --- a/contracts/lib/MerklePatriciaProof.sol +++ b/contracts/lib/MerklePatriciaProof.sol @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; import { RLPReader } from "./RLPReader.sol"; diff --git a/contracts/lib/RLPReader.sol b/contracts/lib/RLPReader.sol index 9cf02eb2..c0c5ba2e 100644 --- a/contracts/lib/RLPReader.sol +++ b/contracts/lib/RLPReader.sol @@ -1,8 +1,5 @@ -/* - * @author Hamdi Allam hamdi.allam97@gmail.com - * Please reach out with any questions or concerns - */ -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; diff --git a/contracts/state-transfer/FxStateChildTunnel.sol b/contracts/state-transfer/FxStateChildTunnel.sol index a18de959..1928aed1 100644 --- a/contracts/state-transfer/FxStateChildTunnel.sol +++ b/contracts/state-transfer/FxStateChildTunnel.sol @@ -1,8 +1,7 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.7; - -import "@openzeppelin/contracts/access/AccessControl.sol"; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; +import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { FxBaseChildTunnel } from "../tunnel/FxBaseChildTunnel.sol"; /** diff --git a/contracts/state-transfer/FxStateRootTunnel.sol b/contracts/state-transfer/FxStateRootTunnel.sol index 00ee0561..4d46f322 100644 --- a/contracts/state-transfer/FxStateRootTunnel.sol +++ b/contracts/state-transfer/FxStateRootTunnel.sol @@ -1,8 +1,7 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.7; - -import "@openzeppelin/contracts/access/AccessControl.sol"; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; +import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; import { FxBaseRootTunnel } from "../tunnel/FxBaseRootTunnel.sol"; /** diff --git a/contracts/state-transfer/RateProvider.sol b/contracts/state-transfer/RateProvider.sol index 14205161..4d7c62f8 100644 --- a/contracts/state-transfer/RateProvider.sol +++ b/contracts/state-transfer/RateProvider.sol @@ -1,10 +1,9 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.7; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; -import "@openzeppelin/contracts/access/AccessControl.sol"; - -import "../interfaces/IRateProvider.sol"; -import "../interfaces/IFxStateChildTunnel.sol"; +import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol"; +import { IRateProvider } from "../interfaces/IRateProvider.sol"; +import { IFxStateChildTunnel } from "../interfaces/IFxStateChildTunnel.sol"; /** * @title RateProvider diff --git a/contracts/tunnel/FxBaseChildTunnel.sol b/contracts/tunnel/FxBaseChildTunnel.sol index 18c22c4a..404a158c 100644 --- a/contracts/tunnel/FxBaseChildTunnel.sol +++ b/contracts/tunnel/FxBaseChildTunnel.sol @@ -1,5 +1,5 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; // IFxMessageProcessor represents interface to process message interface IFxMessageProcessor { diff --git a/contracts/tunnel/FxBaseRootTunnel.sol b/contracts/tunnel/FxBaseRootTunnel.sol index e0678f5e..7adfe08c 100644 --- a/contracts/tunnel/FxBaseRootTunnel.sol +++ b/contracts/tunnel/FxBaseRootTunnel.sol @@ -1,10 +1,10 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.0; +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.7; import { RLPReader } from "../lib/RLPReader.sol"; import { MerklePatriciaProof } from "../lib/MerklePatriciaProof.sol"; import { Merkle } from "../lib/Merkle.sol"; -import "../lib/ExitPayloadReader.sol"; +import { ExitPayloadReader } from "../lib/ExitPayloadReader.sol"; interface IFxStateSender { function sendMessageToChild(