Skip to content

Commit

Permalink
Merge branch 'main' into pb/circle-w3s
Browse files Browse the repository at this point in the history
  • Loading branch information
d4mr committed Dec 12, 2024
2 parents f89c8f7 + d982be9 commit bea4e34
Show file tree
Hide file tree
Showing 533 changed files with 6,777 additions and 7,494 deletions.
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
runner: ubuntu-24.04
arch: amd64
- platform: linux/arm64
runner: ubuntu-24.04-arm64
Expand All @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.target_commitish }}

Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:

merge-manifests:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
LATEST_TAG: ${{ github.event.release.target_commitish == 'main' && 'thirdweb/engine:latest' || '' }}
steps:
Expand Down Expand Up @@ -86,4 +86,4 @@ jobs:
- name: Inspect latest image (if applicable)
if: ${{ env.LATEST_TAG != '' }}
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: Check Build
name: Build

on: pull_request

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"

- name: Install dependencies
run: yarn install

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on: pull_request

jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"

- name: Install dependencies
run: yarn install

- name: Run lint
run: yarn lint
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
runner: ubuntu-24.04
arch: amd64
- platform: linux/arm64
runner: ubuntu-24.04-arm64
arch: arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -48,7 +48,7 @@ jobs:

merge-manifests:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -67,4 +67,4 @@ jobs:
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:nightly
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:nightly
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "yarn"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ on:
jobs:
stale:

runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This PR is stale because it has been open for 7 days with no activity. Remove stale label or comment or this PR will be closed in 3 days.'
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ web_modules/
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

Expand Down Expand Up @@ -152,3 +149,6 @@ https
# Auto generated OpenAPI file
openapi.json
.aider*

# Jetbrains IDEs
.idea
17 changes: 0 additions & 17 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--ignore-engines true
--ignore-engines true
27 changes: 9 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"start:run": "node --experimental-specifier-resolution=node ./dist/index.js",
"start:docker": "docker compose --profile engine --env-file ./.env up --remove-orphans",
"start:docker-force-build": "docker compose --profile engine --env-file ./.env up --remove-orphans --build",
"lint:fix": "eslint --fix 'src/**/*.ts'",
"test:unit": "vitest",
"test:coverage": "vitest run --coverage",
"lint": "yarn biome lint",
"copy-files": "cp -r ./src/prisma ./dist/"
},
"dependencies": {
Expand All @@ -32,7 +32,6 @@
"@cloud-cryptographic-wallet/cloud-kms-signer": "^0.1.2",
"@cloud-cryptographic-wallet/signer": "^0.0.5",
"@ethersproject/json-wallets": "^5.7.0",
"@fastify/basic-auth": "^5.1.1",
"@fastify/swagger": "^8.9.0",
"@fastify/type-provider-typebox": "^3.2.0",
"@fastify/websocket": "^8.2.0",
Expand Down Expand Up @@ -67,10 +66,10 @@
"pg": "^8.11.3",
"prisma": "^5.14.0",
"prom-client": "^15.1.3",
"prool": "^0.0.16",
"superjson": "^2.2.1",
"thirdweb": "5.61.3",
"thirdweb": "^5.71.0",
"uuid": "^9.0.1",
"viem": "^2.21.54",
"winston": "^3.14.1",
"zod": "^3.23.8"
},
Expand All @@ -84,34 +83,26 @@
"@types/pg": "^8.6.6",
"@types/uuid": "^9.0.1",
"@types/ws": "^8.5.5",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"@vitest/coverage-v8": "^2.0.3",
"eslint": "^9.3.0",
"eslint-config-prettier": "^8.7.0",
"openapi-typescript-codegen": "^0.25.0",
"prettier": "^2.8.7",
"prool": "^0.0.16",
"typescript": "^5.1.3",
"vitest": "^2.0.3"
},
"lint-staged": {
"*.{js,ts}": "eslint --cache --fix",
"*.{js,ts,md}": "prettier --write"
},
"prisma": {
"schema": "./src/prisma/schema.prisma"
},
"resolutions": {
"@thirdweb-dev/auth/**/axios": ">=1.7.4",
"@thirdweb-dev/auth/**/axios": ">=1.7.8",
"@thirdweb-dev/auth/**/web3-utils": ">=4.2.1",
"ethers-gcp-kms-signer/**/protobufjs": ">=7.2.5",
"fastify/**/find-my-way": ">=8.2.2",
"@grpc/grpc-js": ">=1.8.22",
"body-parser": ">=1.20.3",
"cookie": ">=0.7.0",
"elliptic": ">=6.6.0",
"micromatch": ">=4.0.8",
"secp256k1": ">=4.0.4",
"ws": ">=8.17.1"
}
"ws": ">=8.17.1",
"cross-spawn": ">=7.0.6"
},
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610"
}
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/engine",
"version": "0.0.16",
"version": "0.0.17",
"main": "dist/thirdweb-dev-engine.cjs.js",
"module": "dist/thirdweb-dev-engine.esm.js",
"files": [
Expand Down
18 changes: 11 additions & 7 deletions sdk/src/services/AccountFactoryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class AccountFactoryService {
/**
* Get all smart accounts
* Get all the smart accounts for this account factory.
* @param chain Chain ID or name
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
* @param contractAddress Contract address
* @returns any Default Response
* @throws ApiError
Expand Down Expand Up @@ -45,7 +45,7 @@ export class AccountFactoryService {
* Get associated smart accounts
* Get all the smart accounts for this account factory associated with the specific admin wallet.
* @param signerAddress The address of the signer to get associated accounts from
* @param chain Chain ID or name
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
* @param contractAddress Contract address
* @returns any Default Response
* @throws ApiError
Expand Down Expand Up @@ -82,7 +82,7 @@ export class AccountFactoryService {
* Check if deployed
* Check if a smart account has been deployed to the blockchain.
* @param adminAddress The address of the admin to check if the account address is deployed
* @param chain Chain ID or name
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
* @param contractAddress Contract address
* @param extraData Extra data to use in predicting the account address
* @returns any Default Response
Expand Down Expand Up @@ -122,7 +122,7 @@ export class AccountFactoryService {
* Predict smart account address
* Get the counterfactual address of a smart account.
* @param adminAddress The address of the admin to predict the account address for
* @param chain Chain ID or name
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
* @param contractAddress Contract address
* @param extraData Extra data (account salt) to add to use in predicting the account address
* @returns any Default Response
Expand Down Expand Up @@ -161,14 +161,14 @@ export class AccountFactoryService {
/**
* Create smart account
* Create a smart account for this account factory.
* @param chain Chain ID or name
* @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred.
* @param contractAddress Contract address
* @param xBackendWalletAddress Backend wallet address
* @param requestBody
* @param simulateTx Simulate the transaction on-chain without executing
* @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes.
* @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared.
* @param xAccountAddress Smart account address
* @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain.
* @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract.
* @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop.
* @returns any Default Response
* @throws ApiError
Expand All @@ -191,6 +191,10 @@ export class AccountFactoryService {
* Gas limit for the transaction
*/
gas?: string;
/**
* Gas price for the transaction. Do not use this if maxFeePerGas is set or if you want to use EIP-1559 type transactions. Only use this if you want to use legacy transactions.
*/
gasPrice?: string;
/**
* Maximum fee per gas
*/
Expand Down
Loading

0 comments on commit bea4e34

Please sign in to comment.