diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d573adff..71c34f89 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - develop jobs: coverage: name: coverage @@ -19,7 +20,7 @@ jobs: uses: ./.github/actions/install-dependencies - name: Run the tests - run: bun run test:coverage + run: bun run test env: E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }} E2E_PRIVATE_KEY_TWO: ${{ secrets.E2E_PRIVATE_KEY_TWO }} diff --git a/.github/workflows/test-read.yml b/.github/workflows/test-read.yml deleted file mode 100644 index b18236d3..00000000 --- a/.github/workflows/test-read.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: test-read -on: - workflow_dispatch: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] -jobs: - test-read: - name: test-read - permissions: write-all - runs-on: ubuntu-latest - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Install dependencies - uses: ./.github/actions/install-dependencies - - - name: Run the tests - run: bun run test:ci -t=Read - env: - E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }} - E2E_PRIVATE_KEY_TWO: ${{ secrets.E2E_PRIVATE_KEY_TWO }} - BUNDLER_URL: https://bundler.biconomy.io/api/v2/11155111/cJPK7B3ru.dd7f7861-190d-45ic-af80-6877f74b8f44 - E2E_BICO_PAYMASTER_KEY_BASE: ${{ secrets.E2E_BICO_PAYMASTER_KEY_BASE }} - E2E_BICO_PAYMASTER_KEY_AMOY: ${{ secrets.E2E_BICO_PAYMASTER_KEY_AMOY }} - CHAIN_ID: 11155111 - TESTING: true diff --git a/.github/workflows/test-write.yml b/.github/workflows/unit-tests.yml similarity index 93% rename from .github/workflows/test-write.yml rename to .github/workflows/unit-tests.yml index 19684654..4fa90008 100644 --- a/.github/workflows/test-write.yml +++ b/.github/workflows/unit-tests.yml @@ -1,17 +1,15 @@ -name: test-write +name: unit-tests on: workflow_dispatch: - pull_request_review: - types: [submitted] pull_request: - types: [opened] + types: [opened, reopened, synchronize, ready_for_review] jobs: - test-write: - name: test-write + unit-tests: + name: unit-tests permissions: write-all runs-on: ubuntu-latest concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-test-write + group: ${{ github.workflow }}-${{ github.ref }}-unit-tests cancel-in-progress: true steps: - uses: actions/checkout@v3 diff --git a/scripts/sendUserOperation.ts b/scripts/sendUserOperation.ts deleted file mode 100644 index 593303e8..00000000 --- a/scripts/sendUserOperation.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { http, createWalletClient, parseEther } from "viem" -import { privateKeyToAccount } from "viem/accounts" -import { createK1ValidatorModule, createSmartAccountClient } from "../src" -import { getConfig } from "../tests/utils" - -const { chain, chainId, privateKey, privateKeyTwo, bundlerUrl } = getConfig() - -const account = privateKeyToAccount(`0x${privateKey}`) -const accountTwo = privateKeyToAccount(`0x${privateKeyTwo}`) -const recipient = accountTwo.address - -const [walletClient] = [ - createWalletClient({ - account, - chain, - transport: http() - }) -] - -const smartAccount = await createSmartAccountClient({ - chainId, - signer: walletClient, - bundlerUrl -}) - -const sendUserOperation = async () => { - const k1ValidatorModule = await createK1ValidatorModule( - smartAccount.getSigner() - ) - - smartAccount.setActiveValidationModule(k1ValidatorModule) - - const transaction = { - to: recipient, // NFT address - data: "0x", - value: parseEther("0.0001") - } - console.log( - "Your smart account will be deployed at address, make sure it has some funds to pay for user ops: ", - await smartAccount.getAddress() - ) - - const response = await smartAccount.sendTransaction([transaction]) - - const receipt = await response.wait() - console.log("Receipt: ", receipt) -} - -sendUserOperation()