From 1b78a344d9bb0df41191f65f91330aa33a97b39a Mon Sep 17 00:00:00 2001 From: Nenad Date: Wed, 20 Sep 2023 13:32:34 +0200 Subject: [PATCH 1/3] Remove redundant imports related to AccountsCreateEndowment + fix pragma --- contracts/core/accounts/facets/AccountsCreateEndowment.sol | 2 +- contracts/core/accounts/storage.sol | 1 - contracts/core/gasFwd/IGasFwdFactory.sol | 2 -- contracts/core/registrar/interfaces/ILocalRegistrar.sol | 1 - contracts/core/registrar/lib/LocalRegistrarLib.sol | 1 - contracts/core/registrar/message.sol | 1 - contracts/core/registrar/storage.sol | 3 --- contracts/core/vault/interfaces/IVault.sol | 2 -- 8 files changed, 1 insertion(+), 12 deletions(-) diff --git a/contracts/core/accounts/facets/AccountsCreateEndowment.sol b/contracts/core/accounts/facets/AccountsCreateEndowment.sol index 4af3c9bee..64a278d01 100644 --- a/contracts/core/accounts/facets/AccountsCreateEndowment.sol +++ b/contracts/core/accounts/facets/AccountsCreateEndowment.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity 0.8.19; import {LibAccounts} from "../lib/LibAccounts.sol"; import {Validator} from "../../validator.sol"; diff --git a/contracts/core/accounts/storage.sol b/contracts/core/accounts/storage.sol index d2060ce93..df8b78577 100644 --- a/contracts/core/accounts/storage.sol +++ b/contracts/core/accounts/storage.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.19; import {LibAccounts} from "./lib/LibAccounts.sol"; -import {LocalRegistrarLib} from "../registrar/lib/LocalRegistrarLib.sol"; import {IterableMappingAddr} from "../../lib/IterableMappingAddr.sol"; import {IterableMappingStrategy} from "../../lib/IterableMappingStrategy.sol"; import {IVault} from "../vault/interfaces/IVault.sol"; diff --git a/contracts/core/gasFwd/IGasFwdFactory.sol b/contracts/core/gasFwd/IGasFwdFactory.sol index c34d06506..21b7fbfb6 100644 --- a/contracts/core/gasFwd/IGasFwdFactory.sol +++ b/contracts/core/gasFwd/IGasFwdFactory.sol @@ -1,8 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {ProxyContract} from "../proxy.sol"; - interface IGasFwdFactory { error InvalidAddress(string param); event GasFwdCreated(address addr); diff --git a/contracts/core/registrar/interfaces/ILocalRegistrar.sol b/contracts/core/registrar/interfaces/ILocalRegistrar.sol index 80347bb8b..1d1828000 100644 --- a/contracts/core/registrar/interfaces/ILocalRegistrar.sol +++ b/contracts/core/registrar/interfaces/ILocalRegistrar.sol @@ -4,7 +4,6 @@ pragma solidity ^0.8.19; import {LocalRegistrarLib} from "../lib/LocalRegistrarLib.sol"; import {LibAccounts} from "../../accounts/lib/LibAccounts.sol"; -import {IAccountsStrategy} from "../../accounts/interfaces/IAccountsStrategy.sol"; interface ILocalRegistrar { /*//////////////////////////////////////////////// diff --git a/contracts/core/registrar/lib/LocalRegistrarLib.sol b/contracts/core/registrar/lib/LocalRegistrarLib.sol index 236eda865..948f3bdb9 100644 --- a/contracts/core/registrar/lib/LocalRegistrarLib.sol +++ b/contracts/core/registrar/lib/LocalRegistrarLib.sol @@ -2,7 +2,6 @@ // author: @stevieraykatz pragma solidity ^0.8.19; -import {IVault} from "../../vault/interfaces/IVault.sol"; import {LibAccounts} from "../../accounts/lib/LibAccounts.sol"; library LocalRegistrarLib { diff --git a/contracts/core/registrar/message.sol b/contracts/core/registrar/message.sol index ce0d79231..9dff50223 100644 --- a/contracts/core/registrar/message.sol +++ b/contracts/core/registrar/message.sol @@ -2,7 +2,6 @@ pragma solidity ^0.8.19; import {LibAccounts} from "../accounts/lib/LibAccounts.sol"; -import {IVault} from "../vault/interfaces/IVault.sol"; library RegistrarMessages { struct InstantiateRequest { diff --git a/contracts/core/registrar/storage.sol b/contracts/core/registrar/storage.sol index ad29a577c..be24e3b9e 100644 --- a/contracts/core/registrar/storage.sol +++ b/contracts/core/registrar/storage.sol @@ -1,9 +1,6 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {LibAccounts} from "../accounts/lib/LibAccounts.sol"; -import {LocalRegistrarLib} from "./lib/LocalRegistrarLib.sol"; - library RegistrarStorage { struct Config { address accountsContract; diff --git a/contracts/core/vault/interfaces/IVault.sol b/contracts/core/vault/interfaces/IVault.sol index 64b1e3df1..1bb1e892a 100644 --- a/contracts/core/vault/interfaces/IVault.sol +++ b/contracts/core/vault/interfaces/IVault.sol @@ -2,8 +2,6 @@ // author: @stevieraykatz pragma solidity ^0.8.19; -import "../../../core/router/IRouter.sol"; - abstract contract IVault { /*//////////////////////////////////////////////// CUSTOM TYPES From 37056e5b25bcb34474fb5193c16c433d711c9732 Mon Sep 17 00:00:00 2001 From: Nenad Date: Tue, 26 Sep 2023 06:23:58 +0200 Subject: [PATCH 2/3] Revert "Remove redundant imports related to AccountsCreateEndowment + fix pragma" This reverts commit 1b78a344d9bb0df41191f65f91330aa33a97b39a. --- contracts/core/accounts/facets/AccountsCreateEndowment.sol | 2 +- contracts/core/accounts/storage.sol | 1 + contracts/core/gasFwd/IGasFwdFactory.sol | 2 ++ contracts/core/registrar/interfaces/ILocalRegistrar.sol | 1 + contracts/core/registrar/lib/LocalRegistrarLib.sol | 1 + contracts/core/registrar/message.sol | 1 + contracts/core/registrar/storage.sol | 3 +++ contracts/core/vault/interfaces/IVault.sol | 2 ++ 8 files changed, 12 insertions(+), 1 deletion(-) diff --git a/contracts/core/accounts/facets/AccountsCreateEndowment.sol b/contracts/core/accounts/facets/AccountsCreateEndowment.sol index 64a278d01..4af3c9bee 100644 --- a/contracts/core/accounts/facets/AccountsCreateEndowment.sol +++ b/contracts/core/accounts/facets/AccountsCreateEndowment.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.19; import {LibAccounts} from "../lib/LibAccounts.sol"; import {Validator} from "../../validator.sol"; diff --git a/contracts/core/accounts/storage.sol b/contracts/core/accounts/storage.sol index df8b78577..d2060ce93 100644 --- a/contracts/core/accounts/storage.sol +++ b/contracts/core/accounts/storage.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.19; import {LibAccounts} from "./lib/LibAccounts.sol"; +import {LocalRegistrarLib} from "../registrar/lib/LocalRegistrarLib.sol"; import {IterableMappingAddr} from "../../lib/IterableMappingAddr.sol"; import {IterableMappingStrategy} from "../../lib/IterableMappingStrategy.sol"; import {IVault} from "../vault/interfaces/IVault.sol"; diff --git a/contracts/core/gasFwd/IGasFwdFactory.sol b/contracts/core/gasFwd/IGasFwdFactory.sol index 21b7fbfb6..c34d06506 100644 --- a/contracts/core/gasFwd/IGasFwdFactory.sol +++ b/contracts/core/gasFwd/IGasFwdFactory.sol @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import {ProxyContract} from "../proxy.sol"; + interface IGasFwdFactory { error InvalidAddress(string param); event GasFwdCreated(address addr); diff --git a/contracts/core/registrar/interfaces/ILocalRegistrar.sol b/contracts/core/registrar/interfaces/ILocalRegistrar.sol index 1d1828000..80347bb8b 100644 --- a/contracts/core/registrar/interfaces/ILocalRegistrar.sol +++ b/contracts/core/registrar/interfaces/ILocalRegistrar.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.19; import {LocalRegistrarLib} from "../lib/LocalRegistrarLib.sol"; import {LibAccounts} from "../../accounts/lib/LibAccounts.sol"; +import {IAccountsStrategy} from "../../accounts/interfaces/IAccountsStrategy.sol"; interface ILocalRegistrar { /*//////////////////////////////////////////////// diff --git a/contracts/core/registrar/lib/LocalRegistrarLib.sol b/contracts/core/registrar/lib/LocalRegistrarLib.sol index 948f3bdb9..236eda865 100644 --- a/contracts/core/registrar/lib/LocalRegistrarLib.sol +++ b/contracts/core/registrar/lib/LocalRegistrarLib.sol @@ -2,6 +2,7 @@ // author: @stevieraykatz pragma solidity ^0.8.19; +import {IVault} from "../../vault/interfaces/IVault.sol"; import {LibAccounts} from "../../accounts/lib/LibAccounts.sol"; library LocalRegistrarLib { diff --git a/contracts/core/registrar/message.sol b/contracts/core/registrar/message.sol index 9dff50223..ce0d79231 100644 --- a/contracts/core/registrar/message.sol +++ b/contracts/core/registrar/message.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.19; import {LibAccounts} from "../accounts/lib/LibAccounts.sol"; +import {IVault} from "../vault/interfaces/IVault.sol"; library RegistrarMessages { struct InstantiateRequest { diff --git a/contracts/core/registrar/storage.sol b/contracts/core/registrar/storage.sol index be24e3b9e..ad29a577c 100644 --- a/contracts/core/registrar/storage.sol +++ b/contracts/core/registrar/storage.sol @@ -1,6 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +import {LibAccounts} from "../accounts/lib/LibAccounts.sol"; +import {LocalRegistrarLib} from "./lib/LocalRegistrarLib.sol"; + library RegistrarStorage { struct Config { address accountsContract; diff --git a/contracts/core/vault/interfaces/IVault.sol b/contracts/core/vault/interfaces/IVault.sol index 1bb1e892a..64b1e3df1 100644 --- a/contracts/core/vault/interfaces/IVault.sol +++ b/contracts/core/vault/interfaces/IVault.sol @@ -2,6 +2,8 @@ // author: @stevieraykatz pragma solidity ^0.8.19; +import "../../../core/router/IRouter.sol"; + abstract contract IVault { /*//////////////////////////////////////////////// CUSTOM TYPES From a6e569820a35695f790e4eb3953b6fc9d686c315 Mon Sep 17 00:00:00 2001 From: Nenad Date: Tue, 26 Sep 2023 06:24:24 +0200 Subject: [PATCH 3/3] Fix pragma in AccountsCreateEndowment --- contracts/core/accounts/facets/AccountsCreateEndowment.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/core/accounts/facets/AccountsCreateEndowment.sol b/contracts/core/accounts/facets/AccountsCreateEndowment.sol index 4af3c9bee..64a278d01 100644 --- a/contracts/core/accounts/facets/AccountsCreateEndowment.sol +++ b/contracts/core/accounts/facets/AccountsCreateEndowment.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity ^0.8.19; +pragma solidity 0.8.19; import {LibAccounts} from "../lib/LibAccounts.sol"; import {Validator} from "../../validator.sol";