Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5 migration of get-balance (native) and get-all-events api #810

Closed
wants to merge 12 commits into from
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
8 changes: 4 additions & 4 deletions .github/workflows/build-image-tag.yml
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ 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
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on: pull_request

jobs:
lint:
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

- name: Run lint
run: yarn 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
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,6 @@ https
# Auto generated OpenAPI file
openapi.json
.aider*

# Jetbrains IDEs
.idea
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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"superjson": "^2.2.1",
"thirdweb": "^5.71.0",
"uuid": "^9.0.1",
"viem": "^2.21.54",
"winston": "^3.14.1",
"zod": "^3.23.8"
},
Expand All @@ -94,8 +95,6 @@
"resolutions": {
"@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",
Expand All @@ -104,5 +103,6 @@
"secp256k1": ">=4.0.4",
"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
Loading