Skip to content

Commit

Permalink
chore: add utils directory
Browse files Browse the repository at this point in the history
  • Loading branch information
adu-web3 committed Sep 9, 2024
1 parent 3fa4c85 commit bf6f8c8
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 17 deletions.
5 changes: 3 additions & 2 deletions script/12_RedeployClientChainGateway.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ pragma solidity ^0.8.19;
import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import "../src/core/BeaconProxyBytecode.sol";
import {Bootstrap} from "../src/core/Bootstrap.sol";
import {ClientChainGateway} from "../src/core/ClientChainGateway.sol";
import {CustomProxyAdmin} from "../src/core/CustomProxyAdmin.sol";

import "../src/core/ExoCapsule.sol";
import {Vault} from "../src/core/Vault.sol";
import "../src/utils/BeaconProxyBytecode.sol";
import {CustomProxyAdmin} from "../src/utils/CustomProxyAdmin.sol";

import {BaseScript} from "./BaseScript.sol";

Expand Down
2 changes: 1 addition & 1 deletion script/14_CorrectBootstrapErrors.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.s
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import {ITransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import "../src/core/BeaconProxyBytecode.sol";
import {Bootstrap} from "../src/core/Bootstrap.sol";
import {ClientChainGateway} from "../src/core/ClientChainGateway.sol";
import "../src/utils/BeaconProxyBytecode.sol";

import "../src/core/ExoCapsule.sol";
import {Vault} from "../src/core/Vault.sol";
Expand Down
8 changes: 6 additions & 2 deletions script/15_DeploySafeMulstisigWallet.s.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
pragma solidity ^0.8.13;

import {BaseScript} from "./BaseScript.sol";
import "@safe-contracts/proxies/GnosisSafeProxyFactory.sol";

import "@safe-contracts/GnosisSafeL2.sol";
import "forge-std/StdJson.sol";
import "@safe-contracts/proxies/GnosisSafeProxyFactory.sol";

import "forge-std/Script.sol";
import "forge-std/StdJson.sol";

contract CreateMultisigScript is BaseScript {

using stdJson for string;

function setUp() public override {
Expand Down Expand Up @@ -65,4 +68,5 @@ contract CreateMultisigScript is BaseScript {

vm.stopBroadcast();
}

}
2 changes: 1 addition & 1 deletion script/2_DeployBoth.s.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pragma solidity ^0.8.19;

import "../src/core/BeaconProxyBytecode.sol";
import "../src/core/ClientChainGateway.sol";
import "../src/core/ExoCapsule.sol";
import "../src/core/ExocoreGateway.sol";
import {Vault} from "../src/core/Vault.sol";
import "../src/utils/BeaconProxyBytecode.sol";
import {ExocoreGatewayMock} from "../test/mocks/ExocoreGatewayMock.sol";

import {BaseScript} from "./BaseScript.sol";
Expand Down
5 changes: 3 additions & 2 deletions script/7_DeployBootstrap.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ pragma solidity ^0.8.19;
import {UpgradeableBeacon} from "@openzeppelin/contracts/proxy/beacon/UpgradeableBeacon.sol";
import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";

import "../src/core/BeaconProxyBytecode.sol";
import {Bootstrap} from "../src/core/Bootstrap.sol";
import {ClientChainGateway} from "../src/core/ClientChainGateway.sol";
import {CustomProxyAdmin} from "../src/core/CustomProxyAdmin.sol";

import "../src/core/ExoCapsule.sol";
import {Vault} from "../src/core/Vault.sol";
import "../src/utils/BeaconProxyBytecode.sol";
import {CustomProxyAdmin} from "../src/utils/CustomProxyAdmin.sol";

import {BaseScript} from "./BaseScript.sol";
import {ILayerZeroEndpointV2} from "@layerzero-v2/protocol/contracts/interfaces/ILayerZeroEndpointV2.sol";
Expand Down
2 changes: 1 addition & 1 deletion script/BaseScript.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pragma solidity ^0.8.19;

import "../src/core/BeaconProxyBytecode.sol";
import "../src/interfaces/IClientChainGateway.sol";
import "../src/interfaces/IExoCapsule.sol";
import "../src/interfaces/IExocoreGateway.sol";
import "../src/interfaces/IVault.sol";
import "../src/utils/BeaconProxyBytecode.sol";

import "../src/interfaces/precompiles/IAssets.sol";
import "../src/interfaces/precompiles/IClaimReward.sol";
Expand Down
5 changes: 3 additions & 2 deletions script/integration/1_DeployBootstrap.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.so

import {EndpointV2Mock} from "../../test/mocks/EndpointV2Mock.sol";

import "../../src/core/BeaconProxyBytecode.sol";
import {Bootstrap} from "../../src/core/Bootstrap.sol";
import {CustomProxyAdmin} from "../../src/core/CustomProxyAdmin.sol";

import {Vault} from "../../src/core/Vault.sol";
import {IValidatorRegistry} from "../../src/interfaces/IValidatorRegistry.sol";
import {IVault} from "../../src/interfaces/IVault.sol";
import "../../src/utils/BeaconProxyBytecode.sol";
import {CustomProxyAdmin} from "../../src/utils/CustomProxyAdmin.sol";
import {MyToken} from "../../test/foundry/unit/MyToken.sol";

// Technically this is used for testing but it is marked as a script
Expand Down
2 changes: 1 addition & 1 deletion src/storage/BootstrapStorage.sol
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {BeaconProxyBytecode} from "../core/BeaconProxyBytecode.sol";
import {Vault} from "../core/Vault.sol";
import {IValidatorRegistry} from "../interfaces/IValidatorRegistry.sol";
import {IVault} from "../interfaces/IVault.sol";
import {BeaconProxyBytecode} from "../utils/BeaconProxyBytecode.sol";

import {Errors} from "../libraries/Errors.sol";
import {GatewayStorage} from "./GatewayStorage.sol";
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/foundry/ExocoreDeployer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import "../mocks/ClaimRewardMock.sol";
import "../mocks/DelegationMock.sol";
import {NonShortCircuitEndpointV2Mock} from "../mocks/NonShortCircuitEndpointV2Mock.sol";

import "src/core/BeaconProxyBytecode.sol";
import "src/core/ExoCapsule.sol";
import "src/utils/BeaconProxyBytecode.sol";

import "src/libraries/BeaconChainProofs.sol";
import "src/libraries/Endian.sol";
Expand Down
5 changes: 3 additions & 2 deletions test/foundry/unit/Bootstrap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ pragma solidity ^0.8.0;

import {Bootstrap} from "src/core/Bootstrap.sol";
import {ClientChainGateway} from "src/core/ClientChainGateway.sol";
import {CustomProxyAdmin} from "src/core/CustomProxyAdmin.sol";

import {Vault} from "src/core/Vault.sol";
import {CustomProxyAdmin} from "src/utils/CustomProxyAdmin.sol";

import {IValidatorRegistry} from "src/interfaces/IValidatorRegistry.sol";

Expand All @@ -28,9 +29,9 @@ import "forge-std/Test.sol";
import "forge-std/console.sol";
import "src/libraries/Errors.sol";

import "src/core/BeaconProxyBytecode.sol";
import "src/core/ExoCapsule.sol";
import "src/storage/GatewayStorage.sol";
import "src/utils/BeaconProxyBytecode.sol";

contract BootstrapTest is Test {

Expand Down
2 changes: 1 addition & 1 deletion test/foundry/unit/ClientChainGateway.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {NonShortCircuitEndpointV2Mock} from "../../mocks/NonShortCircuitEndpoint
import "src/interfaces/IExoCapsule.sol";
import "src/interfaces/IVault.sol";

import "src/core/BeaconProxyBytecode.sol";
import "src/utils/BeaconProxyBytecode.sol";

contract SetUp is Test {

Expand Down
2 changes: 1 addition & 1 deletion test/foundry/unit/CustomProxyAdmin.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {CustomProxyAdmin} from "src/core/CustomProxyAdmin.sol";
import {ICustomProxyAdmin} from "src/interfaces/ICustomProxyAdmin.sol";
import {CustomProxyAdmin} from "src/utils/CustomProxyAdmin.sol";

import "forge-std/Test.sol";
import "forge-std/console.sol";
Expand Down
1 change: 1 addition & 0 deletions test/foundry/unit/Multisig.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions test/foundry/unit/TimelockController.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit bf6f8c8

Please sign in to comment.