From c19bb27c24a48154a864fc199cb81ba76084efc5 Mon Sep 17 00:00:00 2001 From: Will Qiu Date: Fri, 28 Jul 2023 16:11:16 +0800 Subject: [PATCH] chore: address comment,put thirdparty into thirdparty --- .github/workflows/ci.yml | 4 ++-- .gitmodules | 8 +++---- Makefile | 4 ++-- crates/contracts/build.rs | 2 +- .../{ => thirdparty}/account-abstraction | 0 tests/src/common/gen.rs | 24 +++++++++---------- tests/{ => thirdparty}/bundler | 0 7 files changed, 21 insertions(+), 21 deletions(-) rename crates/contracts/{ => thirdparty}/account-abstraction (100%) rename tests/{ => thirdparty}/bundler (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c79fa73..b8a2eeef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,14 +35,14 @@ jobs: with: node-version: '14' cache: 'yarn' - cache-dependency-path: crates/contracts/account-abstraction + cache-dependency-path: crates/contracts/thirdparty/account-abstraction - name: Setup Yarn cache - submodule "thirdparty/bundler" uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - cache-dependency-path: tests/bundler + cache-dependency-path: tests/thirdparty/bundler - name: Setup third-party dependencies run: | diff --git a/.gitmodules b/.gitmodules index 5b60d5df..ffe59523 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "tests/bundler"] - path = tests/bundler +[submodule "tests/thirdparty/bundler"] + path = tests/thirdparty/bundler url = https://github.com/eth-infinitism/bundler.git -[submodule "crates/contracts/account-abstraction"] - path = crates/contracts/account-abstraction +[submodule "crates/contracts/thirdparty/account-abstraction"] + path = crates/contracts/thirdparty/account-abstraction url = https://github.com/eth-infinitism/account-abstraction.git diff --git a/Makefile b/Makefile index 217f6356..f71ad6d1 100644 --- a/Makefile +++ b/Makefile @@ -23,8 +23,8 @@ fetch-thirdparty: git submodule update --init setup-thirdparty: - cd crates/contracts/account-abstraction && yarn install --frozen-lockfile --immutable && yarn compile && cd ../.. - cd tests/bundler && yarn install --frozen-lockfile --immutable && yarn preprocess && cd ../.. + cd crates/contracts/thirdparty/account-abstraction && yarn install --frozen-lockfile --immutable && yarn compile && cd ../../../.. + cd tests/thirdparty/bundler && yarn install --frozen-lockfile --immutable && yarn preprocess && cd ../../.. test: cargo test --workspace diff --git a/crates/contracts/build.rs b/crates/contracts/build.rs index 6bd9312b..ffe91899 100644 --- a/crates/contracts/build.rs +++ b/crates/contracts/build.rs @@ -2,7 +2,7 @@ use ethers_solc::{Project, ProjectPathsConfig}; use std::{env, path::PathBuf}; fn compile_aa_interfaces() -> anyhow::Result<()> { - let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("account-abstraction"); + let root = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("thirdparty/account-abstraction"); let target_path = PathBuf::from(env::var("OUT_DIR").expect("OUT_DIR not set")); let build_path_config = ProjectPathsConfig::builder() // only interfaces are needed diff --git a/crates/contracts/account-abstraction b/crates/contracts/thirdparty/account-abstraction similarity index 100% rename from crates/contracts/account-abstraction rename to crates/contracts/thirdparty/account-abstraction diff --git a/tests/src/common/gen.rs b/tests/src/common/gen.rs index 4f925cbf..457d18e9 100644 --- a/tests/src/common/gen.rs +++ b/tests/src/common/gen.rs @@ -1,48 +1,48 @@ use ethers::prelude::abigen; abigen!(SimpleAccountFactory, - "$CARGO_WORKSPACE_DIR/crates/contracts/account-abstraction/artifacts/contracts/samples/SimpleAccountFactory.sol/SimpleAccountFactory.json"); + "$CARGO_WORKSPACE_DIR/crates/contracts/thirdparty/account-abstraction/artifacts/contracts/samples/SimpleAccountFactory.sol/SimpleAccountFactory.json"); abigen!(SimpleAccount, - "$CARGO_WORKSPACE_DIR/crates/contracts/account-abstraction/artifacts/contracts/samples/SimpleAccount.sol/SimpleAccount.json"); + "$CARGO_WORKSPACE_DIR/crates/contracts/thirdparty/account-abstraction/artifacts/contracts/samples/SimpleAccount.sol/SimpleAccount.json"); abigen!( EntryPointContract, - "$CARGO_WORKSPACE_DIR/crates/contracts/account-abstraction/artifacts/contracts/core/EntryPoint.sol/EntryPoint.json" + "$CARGO_WORKSPACE_DIR/crates/contracts/thirdparty/account-abstraction/artifacts/contracts/core/EntryPoint.sol/EntryPoint.json" ); abigen!( TestOpcodesAccountFactory, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestOpcodesAccount.sol/TestOpcodesAccountFactory.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestOpcodesAccount.sol/TestOpcodesAccountFactory.json" ); abigen!( TestOpcodesAccount, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestOpcodesAccount.sol/TestOpcodesAccount.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestOpcodesAccount.sol/TestOpcodesAccount.json" ); abigen!( TestStorageAccount, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestStorageAccount.sol/TestStorageAccount.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestStorageAccount.sol/TestStorageAccount.json" ); abigen!( TestRecursionAccount, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestRecursionAccount.sol/TestRecursionAccount.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestRecursionAccount.sol/TestRecursionAccount.json" ); abigen!( TestStorageAccountFactory, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestStorageAccount.sol/TestStorageAccountFactory.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestStorageAccount.sol/TestStorageAccountFactory.json" ); abigen!( TestRulesAccount, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestRulesAccount.sol/TestRulesAccount.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestRulesAccount.sol/TestRulesAccount.json" ); abigen!( TestRulesAccountFactory, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestRulesAccount.sol/TestRulesAccountFactory.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestRulesAccount.sol/TestRulesAccountFactory.json" ); abigen!( TracerTest, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TracerTest.sol/TracerTest.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TracerTest.sol/TracerTest.json" ); abigen!( TestCoin, - "$CARGO_WORKSPACE_DIR/tests/bundler/packages/bundler/artifacts/contracts/tests/TestCoin.sol/TestCoin.json" + "$CARGO_WORKSPACE_DIR/tests/thirdparty/bundler/packages/bundler/artifacts/contracts/tests/TestCoin.sol/TestCoin.json" ); diff --git a/tests/bundler b/tests/thirdparty/bundler similarity index 100% rename from tests/bundler rename to tests/thirdparty/bundler