From 1719bf979995cbddfedf9dd8b6567235c19c5eb8 Mon Sep 17 00:00:00 2001 From: Petar Penovic Date: Mon, 20 Jan 2025 12:27:58 +0100 Subject: [PATCH 1/4] test: streamline syncing stats tests --- __tests__/rpcProvider.test.ts | 19 +++++++------------ __tests__/schemas/rpc.json | 9 ++++++++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/__tests__/rpcProvider.test.ts b/__tests__/rpcProvider.test.ts index 76dbd1b4f..4101aae43 100644 --- a/__tests__/rpcProvider.test.ts +++ b/__tests__/rpcProvider.test.ts @@ -32,6 +32,7 @@ import { waitNextBlock, } from './config/fixtures'; import { initializeMatcher } from './config/schema'; +import { isBoolean } from '../src/utils/typed'; describeIfRpc('RPCProvider', () => { const rpcProvider = getTestProvider(false); @@ -307,16 +308,17 @@ describeIfRpc('RPCProvider', () => { expect(Array.isArray(transactions)).toBe(true); }); + test('getSyncingStats', async () => { + const syncingStats = await rpcProvider.getSyncingStats(); + expect(syncingStats).toMatchSchemaRef('GetSyncingStatsResponse'); + if (isBoolean(syncingStats)) expect(syncingStats).toBe(false); + }); + xtest('traceBlockTransactions', async () => { await rpcProvider.getBlockTransactionsTraces(latestBlock.block_hash); }); describeIfDevnet('devnet only', () => { - test('getSyncingStats', async () => { - const syncingStats = await rpcProvider.getSyncingStats(); - expect(syncingStats).toBe(false); - }); - test('getEvents ', async () => { const randomWallet = stark.randomAddress(); const classHash = '0x011ab8626b891bcb29f7cc36907af7670d6fb8a0528c7944330729d8f01e9ea3'; @@ -440,13 +442,6 @@ describeIfRpc('RPCProvider', () => { }); }); }); - - describeIfNotDevnet('global rpc only', () => { - test('getSyncingStats', async () => { - const syncingStats = await rpcProvider.getSyncingStats(); - expect(syncingStats).toMatchSchemaRef('GetSyncingStatsResponse'); - }); - }); }); describeIfTestnet('RPCProvider', () => { diff --git a/__tests__/schemas/rpc.json b/__tests__/schemas/rpc.json index b449713c4..a5eb03ed0 100644 --- a/__tests__/schemas/rpc.json +++ b/__tests__/schemas/rpc.json @@ -2,7 +2,14 @@ "$id": "rpcSchemas", "definitions": { "GetSyncingStatsResponse": { - "$ref": "starknet_api_openrpc#/components/schemas/SYNC_STATUS" + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "starknet_api_openrpc#/components/schemas/SYNC_STATUS" + } + ] }, "StarknetEmittedEvent": { "$ref": "starknet_api_openrpc#/components/schemas/EMITTED_EVENT" From 698461950333c1df6cef302e1947e1012c3097f4 Mon Sep 17 00:00:00 2001 From: Petar Penovic Date: Tue, 21 Jan 2025 18:20:05 +0100 Subject: [PATCH 2/4] ci: bump devnet --- .github/workflows/_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index fbbd3c56d..778b527ee 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -24,7 +24,7 @@ jobs: # TODO - periodically check if conditional services are supported; https://github.com/actions/runner/issues/822 services: devnet: - image: ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.2.2' || '' }} + image: ${{ (inputs.use-devnet) && 'shardlabs/starknet-devnet-rs:0.2.4' || '' }} ports: - 5050:5050 From f09f20da47396456350d26610dabd2e2641a5a98 Mon Sep 17 00:00:00 2001 From: Dhruv Kelawala Date: Thu, 23 Jan 2025 14:09:02 +0000 Subject: [PATCH 3/4] fix: pass signerDetails to fix estimateFeeBulk (#1299) --- src/account/default.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/account/default.ts b/src/account/default.ts index ad15db5e8..09d945c41 100644 --- a/src/account/default.ts +++ b/src/account/default.ts @@ -990,6 +990,7 @@ export class Account extends Provider implements AccountInterface { return { ...common, ...payload, + ...signerDetails, }; } if (transaction.type === TransactionType.DEPLOY) { @@ -1003,6 +1004,7 @@ export class Account extends Provider implements AccountInterface { return { ...common, ...payload, + ...signerDetails, type: TransactionType.INVOKE, }; } @@ -1016,6 +1018,7 @@ export class Account extends Provider implements AccountInterface { return { ...common, ...payload, + ...signerDetails, }; } if (transaction.type === TransactionType.DEPLOY_ACCOUNT) { @@ -1028,6 +1031,7 @@ export class Account extends Provider implements AccountInterface { return { ...common, ...payload, + ...signerDetails, }; } throw Error(`accountInvocationsFactory: unsupported transaction type: ${transaction}`); From 8fb2193462b5bb743f551cdec631d5923f09e657 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 23 Jan 2025 14:09:58 +0000 Subject: [PATCH 4/4] chore(release): 6.21.1 [skip ci] ## [6.21.1](https://github.com/starknet-io/starknet.js/compare/v6.21.0...v6.21.1) (2025-01-23) ### Bug Fixes * pass signerDetails to fix estimateFeeBulk ([#1299](https://github.com/starknet-io/starknet.js/issues/1299)) ([f09f20d](https://github.com/starknet-io/starknet.js/commit/f09f20da47396456350d26610dabd2e2641a5a98)) --- CHANGELOG.md | 6 ++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87eac0258..dc580a86e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [6.21.1](https://github.com/starknet-io/starknet.js/compare/v6.21.0...v6.21.1) (2025-01-23) + +### Bug Fixes + +- pass signerDetails to fix estimateFeeBulk ([#1299](https://github.com/starknet-io/starknet.js/issues/1299)) ([f09f20d](https://github.com/starknet-io/starknet.js/commit/f09f20da47396456350d26610dabd2e2641a5a98)) + # [6.21.0](https://github.com/starknet-io/starknet.js/compare/v6.20.3...v6.21.0) (2025-01-08) ### Bug Fixes diff --git a/package-lock.json b/package-lock.json index bdf7b1a04..d16a6e036 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "starknet", - "version": "6.21.0", + "version": "6.21.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "starknet", - "version": "6.21.0", + "version": "6.21.1", "license": "MIT", "dependencies": { "@noble/curves": "1.7.0", diff --git a/package.json b/package.json index b89faaa5d..e965c541c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "starknet", - "version": "6.21.0", + "version": "6.21.1", "description": "JavaScript library for Starknet", "license": "MIT", "repository": {