From 41e13363403c019fd7d53879df89f5f3f5e55780 Mon Sep 17 00:00:00 2001 From: bdrhn9 Date: Mon, 10 Aug 2026 16:02:20 +0300 Subject: [PATCH] Replace @api3/promise-utils with @api3/commons --- package.json | 3 +-- pnpm-lock.yaml | 21 ++++++------------- src/config/index.ts | 2 +- src/data-fetcher-loop/signed-data-verifier.ts | 3 +-- src/gas-price/gas-price.ts | 3 +-- src/heartbeat-loop/heartbeat-loop.ts | 3 +-- src/update-feeds-loops/contracts.ts | 3 +-- src/update-feeds-loops/gas-estimation.ts | 2 +- src/update-feeds-loops/submit-transactions.ts | 3 +-- src/update-feeds-loops/update-feeds-loops.ts | 2 +- 10 files changed, 15 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 0b728459..95a3ed8e 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,9 @@ "tsc": "tsc --project ." }, "dependencies": { - "@api3/commons": "^1.2.0", + "@api3/commons": "^1.3.0", "@api3/contracts": "38.3.0", "@api3/eslint-plugin-commons": "^3.1.1", - "@api3/promise-utils": "^0.4.0", "dotenv": "^17.4.2", "ethers": "^6.17.0", "immer": "^11.1.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7bf16f19..d2f5d94e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,17 +9,14 @@ importers: .: dependencies: '@api3/commons': - specifier: ^1.2.0 - version: 1.2.0 + specifier: ^1.3.0 + version: 1.3.0 '@api3/contracts': specifier: 38.3.0 version: 38.3.0(typescript@5.9.3) '@api3/eslint-plugin-commons': specifier: ^3.1.1 version: 3.1.1(eslint@8.57.1)(jest@29.7.0(@types/node@24.13.3)(ts-node@10.9.2(@types/node@24.13.3)(typescript@5.9.3)))(prettier@3.9.6)(typescript@5.9.3) - '@api3/promise-utils': - specifier: ^0.4.0 - version: 0.4.0 dotenv: specifier: ^17.4.2 version: 17.4.2 @@ -123,9 +120,9 @@ packages: '@api3/airnode-abi@0.15.0': resolution: {integrity: sha512-MMq5pBkXFA6QkqTLCWWygGXz7TdmYe8dFbgQs9IEmp0Av05U7min6rottBcRhjpOEo8LXT8InkIbdmql+UaS3A==} - '@api3/commons@1.2.0': - resolution: {integrity: sha512-9Bovi9tWpGVXxgkXC7YOeBXpiyWo2l8RmkHgfA9GAB4G3vZny+a8WHSQeWLNnJ4Zig7W9JTf2peExEAhhjsLjA==} - engines: {node: '>=18.14.0'} + '@api3/commons@1.3.0': + resolution: {integrity: sha512-2LqiFSa4l+1LwyfJSTpHRrRWBfDCL9xYlcRGO+RlAoRQz9/2Ym55iwuLpsvO2jQt4npNvsEUaOfFIpAohXjJIg==} + engines: {node: '>=18.20.8'} '@api3/contracts@38.3.0': resolution: {integrity: sha512-vscJip1KOh39nSBAPUiyZRKzfknINBkelF+giFhfAxpjZrWS/kgXYQaMMQAG6ZDnI3LXtKfQ2aQdu8mFHlNg+Q==} @@ -141,9 +138,6 @@ packages: '@api3/ois@3.0.0': resolution: {integrity: sha512-scqcvBOBsptgW3rsTLxQSlTA51W1Fr0YpvyKg2JDS2zTDeGNg1gWx9A3tW6fTM4cj57VnowPgj/ZyxQ7w1Ch0Q==} - '@api3/promise-utils@0.4.0': - resolution: {integrity: sha512-+8fcNjjQeQAuuSXFwu8PMZcYzjwjDiGYcMUfAQ0lpREb1zHonwWZ2N0B9h/g1cvWzg9YhElbeb/SyhCrNm+b/A==} - '@babel/code-frame@7.29.7': resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} engines: {node: '>=6.9.0'} @@ -4698,10 +4692,9 @@ snapshots: - bufferutil - utf-8-validate - '@api3/commons@1.2.0': + '@api3/commons@1.3.0': dependencies: '@api3/ois': 3.0.0 - '@api3/promise-utils': 0.4.0 '@octokit/rest': 20.1.2 axios: 1.18.1 dotenv: 17.4.2 @@ -4764,8 +4757,6 @@ snapshots: lodash: 4.18.1 zod: 4.4.3 - '@api3/promise-utils@0.4.0': {} - '@babel/code-frame@7.29.7': dependencies: '@babel/helper-validator-identifier': 7.29.7 diff --git a/src/config/index.ts b/src/config/index.ts index 56278cd5..dd4eadd1 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -2,11 +2,11 @@ import { join } from 'node:path'; import { cwd } from 'node:process'; import { + goSync, interpolateSecretsIntoConfig, loadConfig as loadConfigCommons, loadSecrets as loadSecretsCommons, } from '@api3/commons'; -import { goSync } from '@api3/promise-utils'; import { configSchema } from './schema'; diff --git a/src/data-fetcher-loop/signed-data-verifier.ts b/src/data-fetcher-loop/signed-data-verifier.ts index 37c04e99..9767b08c 100644 --- a/src/data-fetcher-loop/signed-data-verifier.ts +++ b/src/data-fetcher-loop/signed-data-verifier.ts @@ -1,5 +1,4 @@ -import { deriveBeaconId } from '@api3/commons'; -import { goSync } from '@api3/promise-utils'; +import { deriveBeaconId, goSync } from '@api3/commons'; import { ethers } from 'ethers'; import type { SignedData, SignedDataRecordEntry } from '../types'; diff --git a/src/gas-price/gas-price.ts b/src/gas-price/gas-price.ts index fde53638..3f40aaa5 100644 --- a/src/gas-price/gas-price.ts +++ b/src/gas-price/gas-price.ts @@ -1,5 +1,4 @@ -import type { Address, Hex } from '@api3/commons'; -import { go } from '@api3/promise-utils'; +import { go, type Address, type Hex } from '@api3/commons'; import { getBigInt, type ethers } from 'ethers'; import { maxBy, minBy, remove } from 'lodash'; diff --git a/src/heartbeat-loop/heartbeat-loop.ts b/src/heartbeat-loop/heartbeat-loop.ts index 254d3d19..71dcfa48 100644 --- a/src/heartbeat-loop/heartbeat-loop.ts +++ b/src/heartbeat-loop/heartbeat-loop.ts @@ -1,5 +1,4 @@ -import { createSha256Hash, serializePlainObject } from '@api3/commons'; -import { go } from '@api3/promise-utils'; +import { createSha256Hash, go, serializePlainObject } from '@api3/commons'; import { ethers } from 'ethers'; import { loadRawConfig } from '../config'; diff --git a/src/update-feeds-loops/contracts.ts b/src/update-feeds-loops/contracts.ts index 1970bdcb..5f81eede 100644 --- a/src/update-feeds-loops/contracts.ts +++ b/src/update-feeds-loops/contracts.ts @@ -1,10 +1,9 @@ -import { deriveBeaconId, type Address, type Hex } from '@api3/commons'; +import { deriveBeaconId, go, type Address, type Hex } from '@api3/commons'; import { type AirseekerRegistry, AirseekerRegistry__factory as AirseekerRegistryFactory, Api3ServerV1__factory as Api3ServerV1Factory, } from '@api3/contracts'; -import { go } from '@api3/promise-utils'; import { ethers } from 'ethers'; import { zip } from 'lodash'; diff --git a/src/update-feeds-loops/gas-estimation.ts b/src/update-feeds-loops/gas-estimation.ts index 56b8a00a..72f49240 100644 --- a/src/update-feeds-loops/gas-estimation.ts +++ b/src/update-feeds-loops/gas-estimation.ts @@ -1,5 +1,5 @@ +import { go } from '@api3/commons'; import type { Api3ServerV1 } from '@api3/contracts'; -import { go } from '@api3/promise-utils'; import { logger } from '../logger'; import { sanitizeEthersError } from '../utils'; diff --git a/src/update-feeds-loops/submit-transactions.ts b/src/update-feeds-loops/submit-transactions.ts index 13bd7c6b..d4c47813 100644 --- a/src/update-feeds-loops/submit-transactions.ts +++ b/src/update-feeds-loops/submit-transactions.ts @@ -1,6 +1,5 @@ -import type { Address, Hex } from '@api3/commons'; +import { go, type Address, type Hex } from '@api3/commons'; import type { Api3ServerV1 } from '@api3/contracts'; -import { go } from '@api3/promise-utils'; import { type EthersError, ethers } from 'ethers'; import { getRecommendedGasPrice } from '../gas-price'; diff --git a/src/update-feeds-loops/update-feeds-loops.ts b/src/update-feeds-loops/update-feeds-loops.ts index b791411b..8dba50c0 100644 --- a/src/update-feeds-loops/update-feeds-loops.ts +++ b/src/update-feeds-loops/update-feeds-loops.ts @@ -1,5 +1,5 @@ +import { go } from '@api3/commons'; import type { AirseekerRegistry } from '@api3/contracts'; -import { go } from '@api3/promise-utils'; import type { ethers } from 'ethers'; import { isError, range, set, size, uniq } from 'lodash';