Skip to content

Commit

Permalink
Merge pull request #447 from bcnmy/develop
Browse files Browse the repository at this point in the history
v4.1.0
  • Loading branch information
livingrockrises authored Mar 6, 2024
2 parents 5a9c3b0 + 99c65a5 commit 466968d
Show file tree
Hide file tree
Showing 64 changed files with 2,141 additions and 584 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ E2E_PRIVATE_KEY_ONE=
E2E_PRIVATE_KEY_TWO=
E2E_BICO_PAYMASTER_KEY_MUMBAI=
E2E_BICO_PAYMASTER_KEY_BASE=
BICONOMY_SDK_DEBUG=true
E2E_BICO_PAYMASTER_KEY_OP=
BICONOMY_SDK_DEBUG=true
WITH_MAINNET_TESTS=false
35 changes: 0 additions & 35 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Bug Report
description: File a bug/issue
title: 'bug: <title>'
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! The more info you provide, the more we can help you.

- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please search to see if an issue already exists for the bug you encountered.
options: - label: I have searched the existing issues
required: true

- type: input
attributes:
label: Package Version
description: What version of the SDK are you using?
placeholder: 4.0.0
validations:
required: true

- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false

- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false

- type: textarea
attributes:
label: Steps To Reproduce
description: Steps or code snippets to reproduce the behaviour.
validations:
required: false

- type: textarea
attributes:
label: Package.json (or lockfile) content
description: Packages used in your project. This will help us understand the environment you are working in, and check if there are dependencies that might be causing the issue.
validations:
required: false

- type: input
attributes:
label: Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
description: |
[Please provide by forking this project](https://stackblitz.com/~/github.com/bcnmy/sdk-examples) and making relevant changes to the boilerplate. This makes investigating issues and helping you out significantly easier! For most issues, you will likely get asked to provide one so why not add one now :)
validations:
required: false

- type: textarea
attributes:
label: Anything else?
description: |
Browser info? Screenshots? Anything that will give us more context about the issue you are encountering!

Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.

validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask Question
url: https://github.com/bcnmy/biconomy-client-sdk/discussions
about: Ask questions and discuss with other community members
- name: Request Feature
url: https://github.com/bcnmy/biconomy-client-sdk/discussions
about: Requests features or brainstorm ideas for new functionality
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
workflow_dispatch:
push:
branches:
- develop
- v4
- docs

permissions:
contents: write
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/mainnet_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: E2E Test workflow - with mainnet tests
on:
workflow_dispatch:
jobs:
e2e_test:
name: E2E tests - with mainnet tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout
uses: "actions/checkout@main"

- name: Set Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile && yarn build

- name: Run tests
env:
E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }}
E2E_PRIVATE_KEY_TWO: ${{ secrets.E2E_PRIVATE_KEY_TWO }}
E2E_BICO_PAYMASTER_KEY_MUMBAI: ${{ secrets.E2E_BICO_PAYMASTER_KEY_MUMBAI }}
E2E_BICO_PAYMASTER_KEY_BASE: ${{ secrets.E2E_BICO_PAYMASTER_KEY_BASE }}
E2E_BICO_PAYMASTER_KEY_OP: ${{ secrets.E2E_BICO_PAYMASTER_KEY_OP }}
WITH_MAINNET_TESTS: true
run: yarn test:e2e
1 change: 1 addition & 0 deletions .github/workflows/pull_request_approved.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ jobs:
E2E_PRIVATE_KEY_TWO: ${{ secrets.E2E_PRIVATE_KEY_TWO }}
E2E_BICO_PAYMASTER_KEY_MUMBAI: ${{ secrets.E2E_BICO_PAYMASTER_KEY_MUMBAI }}
E2E_BICO_PAYMASTER_KEY_BASE: ${{ secrets.E2E_BICO_PAYMASTER_KEY_BASE }}
E2E_BICO_PAYMASTER_KEY_OP: ${{ secrets.E2E_BICO_PAYMASTER_KEY_OP }}
run: yarn test:e2e
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { createSmartAccountClient } from "@biconomy/account";
const smartAccount = await createSmartAccountClient({
signer: viemWalletOrEthersSigner,
bundlerUrl: "", // From dashboard.biconomy.io
biconomyPaymasterApiKey: "", // From dashboard.biconomy.io
paymasterUrl: "", // From dashboard.biconomy.io
});

const { wait } = await smartAccount.sendTransaction({ to: "0x...", value: 1 });
Expand Down Expand Up @@ -55,7 +55,7 @@ npm i @biconomy/account
| Key | Description |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [signer](https://bcnmy.github.io/biconomy-client-sdk/packages/account/docs/interfaces/SmartAccountSigner.html) | This signer will be used for signing userOps for any transactions you build. Will accept ethers.JsonRpcSigner as well as a viemWallet |
| [biconomyPaymasterApiKey](https://dashboard.biconomy.io) | You can pass in a biconomyPaymasterApiKey necessary for sponsoring transactions (retrieved from the biconomy dashboard) |
| [paymasterUrl](https://dashboard.biconomy.io) | You can pass in a paymasterUrl necessary for sponsoring transactions (retrieved from the biconomy dashboard) |
| [bundlerUrl](https://dashboard.biconomy.io) | You can pass in a bundlerUrl (retrieved from the biconomy dashboard) for sending transactions |

```typescript
Expand All @@ -70,7 +70,7 @@ const signer = createWalletClient({ account, chain, transport: http() });
const smartAccount = await createSmartAccountClient({
signer,
bundlerUrl,
biconomyPaymasterApiKey,
paymasterUrl,
});
```

Expand Down
6 changes: 6 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ const config: Config = {
// "node_modules"
// ],

workerThreads: true,
// This is experimental feature. Keep in mind that the worker threads use structured clone instead of JSON.stringify() to serialize messages.
// This means that built-in JavaScript objects as BigInt, Map or Set will get serialized properly.
// However extra properties set on Error, Map or Set will not be passed on through the serialization step.
// For more details see the article on structured clone.

// An array of file extensions your modules use
moduleFileExtensions: ["js", "mjs", "cjs", "jsx", "ts", "tsx", "json", "node"],

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"lint": "eslint -c .eslintrc.js 'packages/*/src/**/*.{ts,tsx}'",
"lint:fix": "eslint -c .eslintrc.js 'packages/*/src/**/*.{ts,tsx}' --fix",
"test:run": "yarn jest --runInBand",
"test": "concurrently -k --success first 'yarn start:ganache' 'yarn test:run'",
"test": "concurrently -k --success first 'yarn start:ganache' 'yarn test:run' && exit 0",
"start:ganache": "ganache -m 'direct buyer cliff train rice spirit census refuse glare expire innocent quote'",
"test:ci": "FORCE_COLOR=1 lerna run test:ci --stream --npm-client=yarn",
"test:coverage": "concurrently -k --success first 'yarn start:ganache' 'yarn jest --runInBand --coverage'",
Expand Down
28 changes: 28 additions & 0 deletions packages/account/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## 4.1.0 (2023-04-03)

Features:

- Added Speed optimisation, removing redundant gasEstimate call to bundler ([2371b2](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/2371b230cd5806ec4c7c95ba604d6f924b4be768))
- Added smartAccount.getBalances() method ([4b8bae](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/4b8bae412577b846e700b168976cefa6b0803ff6))
- Added smartAccount.getSupportedTokens() method ([6d2fb27](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/6d2fb27d6f9b424e440e45990ea06820a9d16d4b))
- Added smartAccount.deploy() method ([be9dc4](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/be9dc4d74a3e5a22e69416983436997cf2ea417c))
- Increased checking of the chainId from the bundler, paymaster and the provider ([5d2f3](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/5d2f34d8f0fb4f9ff7c7ddc00336471e57efdcfd))
- Added entity name to Logger calls ([9278ec](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/9278ecc21e060ef75ab29a0d054d95d69cd4ae27))
- Export a 'getChain' by id helper, which returns a viem chain ([ab2ba](https://github.com/bcnmy/biconomy-client-sdk/pull/449/commits/ab2ba2c518ce867c52bf90b9018dfc1b4ec3b4d4))
- Add "stateOverride" optional param ([20fd54](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/20fd54c817d2dcbc6b7d9a247d890d91b19a9c2f))

Fixes:

- Fix for encodeAbiParameters inside batched session module ([b27061](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/b27061e2eec7bafb0620e88e6d94e56e9a13cb76))
- added flag to skip calldata approval patch ([75698](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/75698c827015533e32acb1f535bdf6b738876217))
- Fixed the particle auth build

Chores:

- Added tests for ecdsa module ([1a8f29](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/1a8f296c26c9fedd57023f8f6423d7662a3adfee))
- Increased test coverage ([329003](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/329003cebb6b4034496e41651985804cdec0d311))
- Improved issue reporting guidelines ([8b9fb5d](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/8b9fb5de9556870611307c12e57df333619d9252))
- Added e2e tests for optimism, ran from GH actions ([5051ba](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/5051ba5ff14220ad616f1ec3bc93a3f42d6f8887))
- Added ABI SVM test ([49c96](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/49c968220e2db0aeee5cc6419f45df2b98f9792c))
- Added tests for batched session router testing ([2eb9765](https://github.com/bcnmy/biconomy-client-sdk/pull/447/commits/2eb9765d066fcb7b35d08223257aeb9b38c7a78b))

## 4.0.3 (2023-28-02)

VERSION Bump Only.
Expand Down
6 changes: 3 additions & 3 deletions packages/account/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { createSmartAccountClient } from "@biconomy/account";
const smartAccount = await createSmartAccountClient({
signer: viemWalletOrEthersSigner,
bundlerUrl: "", // From dashboard.biconomy.io
biconomyPaymasterApiKey: "", // From dashboard.biconomy.io
paymasterUrl: "", // From dashboard.biconomy.io
});

const { wait } = await smartAccount.sendTransaction({ to: "0x...", value: 1 });
Expand Down Expand Up @@ -55,7 +55,7 @@ For a step-by-step guide on integrating **ERC4337 Account Abstraction** and **Sm
| Key | Description |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| [signer](https://bcnmy.github.io/biconomy-client-sdk/packages/account/docs/interfaces/SmartAccountSigner.html) | This signer will be used for signing userOps for any transactions you build. Will accept ethers.JsonRpcSigner as well as a viemWallet |
| [biconomyPaymasterApiKey](https://dashboard.biconomy.io) | You can pass in a biconomyPaymasterApiKey necessary for sponsoring transactions (retrieved from the biconomy dashboard) |
| [paymasterUrl](https://dashboard.biconomy.io) | You can pass in a paymasterUrl necessary for sponsoring transactions (retrieved from the biconomy dashboard) |
| [bundlerUrl](https://dashboard.biconomy.io) | You can pass in a bundlerUrl (retrieved from the biconomy dashboard) for sending transactions |

```typescript
Expand All @@ -70,7 +70,7 @@ const signer = createWalletClient({ account, chain, transport: http() });
const smartAccount = await createSmartAccountClient({
signer,
bundlerUrl,
biconomyPaymasterApiKey,
paymasterUrl,
});
```

Expand Down
10 changes: 5 additions & 5 deletions packages/account/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biconomy/account",
"version": "4.0.3",
"version": "4.1.0",
"description": "This package provides apis for ERC-4337 based smart account implementations",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -68,10 +68,10 @@
},
"dependencies": {
"@alchemy/aa-core": "^3.1.1",
"@biconomy/bundler": "^4.0.3",
"@biconomy/common": "^4.0.3",
"@biconomy/modules": "^4.0.3",
"@biconomy/paymaster": "^4.0.3",
"@biconomy/bundler": "^4.1.0",
"@biconomy/common": "^4.1.0",
"@biconomy/modules": "^4.1.0",
"@biconomy/paymaster": "^4.1.0",
"viem": "^2.7.12"
}
}
Loading

0 comments on commit 466968d

Please sign in to comment.