diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d844fb..2ee59df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,46 +10,46 @@ env: CARGO_TERM_COLOR: always jobs: - build_rust_and_test: - name: Rust project - latest - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.4 - - uses: pnpm/action-setup@v4 - with: - version: 9 - - run: rustup update stable && rustup default stable - - run: rustup toolchain install nightly -c rustfmt - - run: git submodule update --init --recursive - - run: make setup-thirdparty - - run: docker compose up -d - working-directory: test/scripts/forked_state - - run: while ! curl localhost:8545/health; do sleep 1; done - - run: while ! curl localhost:4337/health; do sleep 1; done - - run: while ! curl localhost:3000/ping; do sleep 1; done - - run: cargo build --workspace --all-features --all-targets - - run: cargo test --all-features --lib --bins - # - run: cargo clippy --workspace --all-features --all-targets -- -D warnings - - run: cargo +nightly fmt --all -- --check + # build_rust_and_test: + # name: Rust project - latest + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Run sccache-cache + # uses: mozilla-actions/sccache-action@v0.0.4 + # - uses: pnpm/action-setup@v4 + # with: + # version: 9 + # - run: rustup update stable && rustup default stable + # - run: rustup toolchain install nightly -c rustfmt + # - run: git submodule update --init --recursive + # - run: make setup-thirdparty + # - run: docker compose up -d + # working-directory: test/scripts/forked_state + # - run: while ! curl localhost:8545/health; do sleep 1; done + # - run: while ! curl localhost:4337/health; do sleep 1; done + # - run: while ! curl localhost:3000/ping; do sleep 1; done + # - run: cargo build --workspace --all-features --all-targets + # - run: cargo test --all-features --lib --bins + # # - run: cargo clippy --workspace --all-features --all-targets -- -D warnings + # - run: cargo +nightly fmt --all -- --check - udeps: - name: Unused dependencies - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.4 - - uses: pnpm/action-setup@v4 - with: - version: 9 - - run: rustup update stable && rustup default stable - - run: rustup toolchain install nightly -c rustfmt - - run: git submodule update --init --recursive - - run: make setup-thirdparty - - run: cargo install cargo-udeps - - run: cargo +nightly udeps --workspace + # udeps: + # name: Unused dependencies + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Run sccache-cache + # uses: mozilla-actions/sccache-action@v0.0.4 + # - uses: pnpm/action-setup@v4 + # with: + # version: 9 + # - run: rustup update stable && rustup default stable + # - run: rustup toolchain install nightly -c rustfmt + # - run: git submodule update --init --recursive + # - run: make setup-thirdparty + # - run: cargo install cargo-udeps + # - run: cargo +nightly udeps --workspace # build_wasm: # name: Build on WASM @@ -76,34 +76,93 @@ jobs: - debug steps: - uses: actions/checkout@v4 - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.4 - - uses: pnpm/action-setup@v4 - with: - version: 9 - - run: rustup update stable && rustup default stable - - run: git submodule update --init --recursive - - run: make setup-thirdparty - - run: make build-ios-bindings - - name: Select Xcode 15.4 - run: sudo xcode-select -s /Applications/Xcode_15.4.app - - name: Build ${{ matrix.config }} - run: make CONFIG=${{ matrix.config }} build-swift-apple-platforms - # - name: Install Docker - # run: | - # HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker - # sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components - # open -a /Applications/Docker.app --args --unattended --accept-license - # echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." - # while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done - # - name: Start test infrastructure - # run: docker compose up --debug - # working-directory: test/scripts/forked_state - # - name: Wait for local RPC to be ready - # run: while ! curl localhost:8545/health; do sleep 1; done - # - name: Wait for local bundler to be ready - # run: while ! curl localhost:4337/health; do sleep 1; done - # - name: Wait for local paymaster to be ready - # run: while ! curl localhost:3000/ping; do sleep 1; done + # - name: Run sccache-cache + # uses: mozilla-actions/sccache-action@v0.0.4 + # - uses: pnpm/action-setup@v4 + # with: + # version: 9 + # - run: rustup update stable && rustup default stable + # - run: git submodule update --init --recursive + # - run: make setup-thirdparty + # - run: make build-ios-bindings + # - name: Select Xcode 15.4 + # run: sudo xcode-select -s /Applications/Xcode_15.4.app + # - name: Build ${{ matrix.config }} + # run: make CONFIG=${{ matrix.config }} build-swift-apple-platforms + - name: Install Docker + run: | + curl -fsSL https://desktop.docker.com/mac/main/arm64/Docker.dmg -o Docker.dmg + sudo hdiutil attach Docker.dmg + echo "user: $(whoami)" + # sudo /Volumes/Docker/Docker.app/Contents/MacOS/install --accept-license --user=runner + cp -R /Volumes/Docker/Docker.app /Applications/ + sudo hdiutil detach /Volumes/Docker + + echo "ls -la /Applications/" + ls -la /Applications/ + + echo "sudo /Applications/Docker.app/Contents/MacOS/install --accept-license --user=runner" + sudo /Applications/Docker.app/Contents/MacOS/install --accept-license --user=runner + + echo "sudo xattr -rd com.apple.quarantine /Applications/Docker.app" + sudo xattr -rd com.apple.quarantine /Applications/Docker.app + + ls -la /Applications/Docker.app/Contents/Resources/bin/ + sudo xattr -rd com.apple.quarantine /Applications/Docker.app + open -a /Applications/Docker.app + echo "PATH: $PATH" + echo "/Applications/Docker.app/Contents/Resources/bin/docker info:" + echo $(/Applications/Docker.app/Contents/Resources/bin/docker info) + echo "docker info:" + echo $(docker info) + sudo /usr/bin/tccutil reset All com.docker.docker + echo "ls -l /var/run/docker.sock:" + ls -l /var/run/docker.sock + # echo "ls -l /Users/runner/.docker/run/docker.sock:" + # ls -l /Users/runner/.docker/run/docker.sock + + echo "mkdir -p ~/.docker/run" + mkdir -p ~/.docker/run + echo "~/.docker/run/docker.sock" + touch ~/.docker/run/docker.sock + + echo "chmod 666 ~/.docker/run/docker.sock" + chmod 666 ~/.docker/run/docker.sock + + # echo "running sudo `chmod 666 /var/run/docker.sock`" + # sudo chmod 666 /var/run/docker.sock + + echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." + # while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1 && echo "sleep 1"; done + timeout=600 # 10 minutes + elapsed=0 + sleeptime=10 + while ! docker info > /dev/null 2>&1 && [ $elapsed -lt $timeout ]; do + echo "Waiting for Docker to start..." + echo "ps aux | grep dockerd:" + echo $(ps aux | grep [d]ockerd) + sleep $sleeptime + elapsed=$((elapsed+sleeptime)) + done + + if [ $elapsed -ge $timeout ]; then + echo "Docker failed to start in $timeout seconds." + exit 1 + fi + # run: | + # HOMEBREW_NO_AUTO_UPDATE=1 brew install --cask docker + # sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components + # open -a /Applications/Docker.app --args --unattended --accept-license + # echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." + # while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done + - name: Start test infrastructure + run: docker compose up --debug + working-directory: test/scripts/forked_state + - name: Wait for local RPC to be ready + run: while ! curl localhost:8545/health; do sleep 1; done + - name: Wait for local bundler to be ready + run: while ! curl localhost:4337/health; do sleep 1; done + - name: Wait for local paymaster to be ready + run: while ! curl localhost:3000/ping; do sleep 1; done # - name: Run ${{ matrix.config }} tests # run: make CONFIG=${{ matrix.config }} test-swift-apple-platforms diff --git a/crates/yttrium/src/smart_accounts/simple_account/sender_address.rs b/crates/yttrium/src/smart_accounts/simple_account/sender_address.rs index 7b48de8..cd4b3e0 100644 --- a/crates/yttrium/src/smart_accounts/simple_account/sender_address.rs +++ b/crates/yttrium/src/smart_accounts/simple_account/sender_address.rs @@ -22,8 +22,6 @@ pub async fn get_sender_address_with_signer( chain_id: u64, signer: PrivateKeySigner, ) -> eyre::Result
{ - let bundler_base_url = config.clone().endpoints.bundler.base_url; - let paymaster_base_url = config.clone().endpoints.paymaster.base_url; let rpc_base_url = config.clone().endpoints.rpc.base_url; let chain_id = ChainId::new_eip155(chain_id.clone());