Skip to content

Commit

Permalink
Merge branch 'develop' into feat/reduce_default_wait_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
joepegler authored Oct 11, 2024
2 parents cb217a8 + 67ec368 commit 6d743dd
Show file tree
Hide file tree
Showing 36 changed files with 935 additions and 890 deletions.
3 changes: 1 addition & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ E2E_BICO_PAYMASTER_KEY_AMOY=
E2E_BICO_PAYMASTER_KEY_BASE=
CHAIN_ID=80002
CODECOV_TOKEN=
TESTING=false
SILENCE_LABS_NPM_TOKEN=npm_XXX
TESTING=false
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,3 @@ jobs:

- name: Build
uses: ./.github/actions/build
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Run the account tests
run: bun run test:ci -t=Account:Write
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Set remote url
run: git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/bcnmy/biconomy-client-sdk.git
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Use commitlint to check PR title
run: echo "${{ github.event.pull_request.title }}" | bun commitlint
2 changes: 0 additions & 2 deletions .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:

- name: Build
uses: ./.github/actions/build
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Report bundle size
uses: andresz1/size-limit-action@master
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test-playground
on:
workflow_dispatch:
push:
branches:
- test/*
jobs:
test-playground:
name: test-playground
permissions: write-all
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3

- name: Install dependencies
uses: ./.github/actions/install-dependencies

- name: Run the tests
run: bun run test:ci -t=Playground
env:
E2E_PRIVATE_KEY_ONE: ${{ secrets.E2E_PRIVATE_KEY_ONE }}
TESTING: true
2 changes: 0 additions & 2 deletions .github/workflows/test-read.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Run the tests
run: bun run test:ci -t=Read
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-write.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:

- name: Install dependencies
uses: ./.github/actions/install-dependencies
env:
SILENCE_LABS_NPM_TOKEN: ${{ secrets.SILENCE_LABS_NPM_TOKEN }}

- name: Run the account tests
run: bun run test:ci -t=Account:Write
Expand Down
8 changes: 4 additions & 4 deletions .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
{
"name": "core (esm)",
"path": "./dist/_esm/index.js",
"limit": "80 kB",
"limit": "140 kB",
"import": "*",
"ignore": ["node:fs", "fs"]
},
{
"name": "core (cjs)",
"path": "./dist/_cjs/index.js",
"limit": "80 kB",
"limit": "140 kB",
"ignore": ["node:fs", "fs"]
},
{
"name": "account (tree-shaking)",
"path": "./dist/_esm/index.js",
"limit": "80 kB",
"limit": "140 kB",
"import": "{ createSmartAccountClient }",
"ignore": ["node:fs", "fs"]
},
Expand All @@ -36,7 +36,7 @@
{
"name": "modules (tree-shaking)",
"path": "./dist/_esm/modules/index.js",
"limit": "80 kB",
"limit": "140 kB",
"import": "{ createSessionKeyManagerModule }",
"ignore": ["node:fs", "fs"]
}
Expand Down
22 changes: 20 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# @biconomy/account

## 4.5.6
## 4.6.4

### Patch Changes

- shorten default pollInterval

## 4.6.3

### Patch Changes

- fix nextjs logs

## 4.6.2

### Patch Changes

- Temporary removal of DAN

## 4.6.1

### Patch Changes

## 4.5.5

### Patch Changes
Expand All @@ -20,9 +36,11 @@

## 4.5.3

## 4.6.0

### Minor Changes

- Sessions Dx
- Distributed Sessions

## 4.5.2

Expand Down
3 changes: 1 addition & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"_types",
"bun.lockb",
"docs",
"dist",
"walletprovider-sdk"
"dist"
]
},
"organizeImports": {
Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 0 additions & 2 deletions bunfig.toml

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
"dotenv": "^16.4.5",
"ethers": "^6.12.0",
"gh-pages": "^6.1.1",
"node-gyp-build": "^4.8.1",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"size-limit": "^11",
Expand All @@ -106,7 +107,7 @@
"vitest": "^1.3.1"
},
"peerDependencies": {
"typescript": "^5",
"typescript": "^5.5.3",
"viem": "^2"
},
"commitlint": {
Expand All @@ -119,7 +120,6 @@
"commit-msg": "npx --no -- commitlint --edit ${1}"
},
"dependencies": {
"merkletreejs": "^0.4.0",
"@silencelaboratories/walletprovider-sdk": "^0.1.0"
"merkletreejs": "^0.4.0"
}
}
20 changes: 12 additions & 8 deletions src/account/BaseSmartContractAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export enum DeploymentState {

export abstract class BaseSmartContractAccount<
TSigner extends SmartAccountSigner = SmartAccountSigner
> implements ISmartContractAccount<TSigner>
{
> implements ISmartContractAccount<TSigner> {
protected factoryAddress: Address

protected deploymentState: DeploymentState = DeploymentState.UNDEFINED
Expand Down Expand Up @@ -132,7 +131,7 @@ export abstract class BaseSmartContractAccount<
* @param _params -- Typed Data params to sign
*/
async signTypedData(_params: SignTypedDataParams): Promise<`0x${string}`> {
return this.signer.signTypedData(_params)
throw new Error("signTypedData not supported")
}

/**
Expand All @@ -158,14 +157,16 @@ export abstract class BaseSmartContractAccount<
* @param params -- Typed Data params to sign
*/
async signTypedDataWith6492(
// @ts-ignore
params: SignTypedDataParams
): Promise<`0x${string}`> {
const [isDeployed, signature] = await Promise.all([
this.isAccountDeployed(),
this.signTypedData(params)
])
throw new Error("signTypedDataWith6492 not supported")
// const [isDeployed, signature] = await Promise.all([
// this.isAccountDeployed(),
// this.signTypedData(params)
// ])

return this.create6492Signature(isDeployed, signature)
// return this.create6492Signature(isDeployed, signature)
}

/**
Expand Down Expand Up @@ -207,6 +208,7 @@ export abstract class BaseSmartContractAccount<
}

async getInitCode(): Promise<Hex> {

if (this.deploymentState === DeploymentState.DEPLOYED) {
return "0x"
}
Expand All @@ -226,12 +228,14 @@ export abstract class BaseSmartContractAccount<
}

async getAddress(): Promise<Address> {

if (!this.accountAddress) {
const initCode = await this._getAccountInitCode()
Logger.log("[BaseSmartContractAccount](getAddress) initCode: ", initCode)
try {
await this.entryPoint.simulate.getSenderAddress([initCode])
} catch (err: any) {

Logger.log(
"[BaseSmartContractAccount](getAddress) getSenderAddress err: ",
err
Expand Down
Loading

0 comments on commit 6d743dd

Please sign in to comment.