Skip to content

Commit

Permalink
chore: address comment,put thirdparty into thirdparty
Browse files Browse the repository at this point in the history
  • Loading branch information
zsluedem committed Jul 28, 2023
1 parent 38cc202 commit c19bb27
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/contracts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions tests/src/common/gen.rs
Original file line number Diff line number Diff line change
@@ -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"
);

0 comments on commit c19bb27

Please sign in to comment.