From 45f46e9bedd74ff9d57253f3eacbf798de9e6dbb Mon Sep 17 00:00:00 2001 From: Totoro Date: Wed, 25 Oct 2023 18:09:37 +0300 Subject: [PATCH] chore: bump version to v2.15.11 (#147) feat: update dln-client to v8.2.1 --- package-lock.json | 75 +++++++++++-------------- package.json | 4 +- src/processors/universal.ts | 3 +- src/providers/utils/tryInitAltSolana.ts | 6 +- 4 files changed, 40 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a314f6f..7eb2e022 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@debridge-finance/dln-taker", - "version": "2.16.0", + "version": "2.16.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@debridge-finance/dln-taker", - "version": "2.15.11", + "version": "2.16.1", "license": "GPL-3.0-only", "dependencies": { - "@debridge-finance/dln-client": "8.1.0", + "@debridge-finance/dln-client": "8.2.1", "@debridge-finance/legacy-dln-profitability": "2.1.0", "@debridge-finance/solana-utils": "4.2.1", "@protobuf-ts/plugin": "2.8.1", @@ -562,9 +562,9 @@ "integrity": "sha512-MA93NzDNhgI5KzpMFuenWp5Qfm13q1fkuvge903Kg9/o1JcDgL0coH2Nf0I0OZctqlGC3d34wj3ABQzCaB8KAw==" }, "node_modules/@debridge-finance/dln-client": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@debridge-finance/dln-client/-/dln-client-8.1.0.tgz", - "integrity": "sha512-qJaEIPdHospVM71F99NOI9BqjTzuHucoLRlDQ0y+BKvk+TsI9vZmqld7o7mloH6vHXAZ75aVB2lgMWbISO3NDA==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/@debridge-finance/dln-client/-/dln-client-8.2.1.tgz", + "integrity": "sha512-Ewn1FNeBlzAnboiM7zhQ9xPAeDoh+nIL9lF5jeE7dCiA3uwtwv7HybQTlrkLVwTaeW1dlTTsGOQAootaPrYF4w==", "dependencies": { "@coral-xyz/anchor": "0.28.0", "@debridge-finance/debridge-external-call": "1.0.7", @@ -2239,65 +2239,59 @@ } }, "node_modules/@sentry-internal/tracing": { - "version": "7.74.1", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.74.1.tgz", - "integrity": "sha512-nNaiZreQxCitG2PzYPaC7XtyA9OMsETGYMKAtiK4p62/uTmeYbsBva9BoNx1XeiHRwbrVQYRMKQ9nV5e2jS4/A==", + "version": "7.75.1", + "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.75.1.tgz", + "integrity": "sha512-nynV+7iVcF8k3CqhvI2K7iA8h4ovJhgYHKnXR8RDDevQOqNG2AEX9+hjCj9fZM4MhKHYFqf1od2oO9lTr38kwg==", "dependencies": { - "@sentry/core": "7.74.1", - "@sentry/types": "7.74.1", - "@sentry/utils": "7.74.1", - "tslib": "^2.4.1 || ^1.9.3" + "@sentry/core": "7.75.1", + "@sentry/types": "7.75.1", + "@sentry/utils": "7.75.1" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/core": { - "version": "7.74.1", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.74.1.tgz", - "integrity": "sha512-LvEhOSfdIvwkr+PdlrT/aA/iOLhkXrSkvjqAQyogE4ddCWeYfS0NoirxNt1EaxMBAWKhYZRqzkA7WA4LDLbzlA==", + "version": "7.75.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.75.1.tgz", + "integrity": "sha512-Kw4KyKBxbxbh8OKO0S11Tm0gWP+6AaXXYrsq3hp8H338l/wOmIzyckmCbUrc/XJeoRqaFLJbdcCrcUEDZUvsVQ==", "dependencies": { - "@sentry/types": "7.74.1", - "@sentry/utils": "7.74.1", - "tslib": "^2.4.1 || ^1.9.3" + "@sentry/types": "7.75.1", + "@sentry/utils": "7.75.1" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/node": { - "version": "7.74.1", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.74.1.tgz", - "integrity": "sha512-aMUQ2LFZF64FBr+cgjAqjT4OkpYBIC9lyWI8QqjEHqNho5+LGu18/iVrJPD4fgs4UhGdCuAiQjpC36MbmnIDZA==", + "version": "7.75.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.75.1.tgz", + "integrity": "sha512-E174NbP3j7OIqQQYPtpMGz1FfL/KE5PeGnhoACyMIk0D5MGB7Ia7Y9+nYfHB7+EOJPV2Ob6BYlhemX/MxPrYWg==", "dependencies": { - "@sentry-internal/tracing": "7.74.1", - "@sentry/core": "7.74.1", - "@sentry/types": "7.74.1", - "@sentry/utils": "7.74.1", - "cookie": "^0.5.0", - "https-proxy-agent": "^5.0.0", - "lru_map": "^0.3.3", - "tslib": "^2.4.1 || ^1.9.3" + "@sentry-internal/tracing": "7.75.1", + "@sentry/core": "7.75.1", + "@sentry/types": "7.75.1", + "@sentry/utils": "7.75.1", + "https-proxy-agent": "^5.0.0" }, "engines": { "node": ">=8" } }, "node_modules/@sentry/types": { - "version": "7.74.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.74.1.tgz", - "integrity": "sha512-2jIuPc+YKvXqZETwr2E8VYnsH1zsSUR/wkIvg1uTVeVNyoowJv+YsOtCdeGyL2AwiotUBSPKu7O1Lz0kq5rMOQ==", + "version": "7.75.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.75.1.tgz", + "integrity": "sha512-km+ygqgMDaFfTrbQwdhrptFqx0Oq15jZABqIoIpbaOCkCAMm+tyCqrFS8dTfaq5wpCktqWOy2qU/DOpppO99Cg==", "engines": { "node": ">=8" } }, "node_modules/@sentry/utils": { - "version": "7.74.1", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.74.1.tgz", - "integrity": "sha512-qUsqufuHYcy5gFhLZslLxA5kcEOkkODITXW3c7D+x+8iP/AJqa8v8CeUCVNS7RetHCuIeWAbbTClC4c411EwQg==", + "version": "7.75.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.75.1.tgz", + "integrity": "sha512-QzW2eRjY20epD//9/tQ0FTNwdAL6XZi+LyJNUQIeK3NMnc5NgHrgpxId87gmFq8cNx47utH1Blub8RuMbKqiwQ==", "dependencies": { - "@sentry/types": "7.74.1", - "tslib": "^2.4.1 || ^1.9.3" + "@sentry/types": "7.75.1" }, "engines": { "node": ">=8" @@ -7362,11 +7356,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru_map": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/lru_map/-/lru_map-0.3.3.tgz", - "integrity": "sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==" - }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", diff --git a/package.json b/package.json index 6d295eb7..48ee17f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@debridge-finance/dln-taker", - "version": "2.16.0", + "version": "2.16.1", "description": "DLN executor is the rule-based daemon service developed to automatically execute orders placed on the deSwap Liquidity Network (DLN) across supported blockchains", "license": "GPL-3.0-only", "author": "deBridge", @@ -32,7 +32,7 @@ }, "types": "./dist/index.d.ts", "dependencies": { - "@debridge-finance/dln-client": "8.1.0", + "@debridge-finance/dln-client": "8.2.1", "@debridge-finance/legacy-dln-profitability": "2.1.0", "@debridge-finance/solana-utils": "4.2.1", "@protobuf-ts/plugin": "2.8.1", diff --git a/src/processors/universal.ts b/src/processors/universal.ts index d106566b..687683aa 100644 --- a/src/processors/universal.ts +++ b/src/processors/universal.ts @@ -10,6 +10,7 @@ import { OrderState, tokenAddressToString, SwapConnectorRequest, + SwapConnectorResult, } from '@debridge-finance/dln-client'; import BigNumber from 'bignumber.js'; import { Logger } from 'pino'; @@ -940,7 +941,7 @@ class UniversalProcessor extends BaseOrderProcessor { context: OrderProcessorContext, logger: Logger, ): Promise<{ - swapResult?: SwapConnectorRequest['routeHint']; + swapResult?: SwapConnectorResult; transaction: Awaited>; }> { if (buffersAreEqual(reserveDstToken, order.take.tokenAddress)) { diff --git a/src/providers/utils/tryInitAltSolana.ts b/src/providers/utils/tryInitAltSolana.ts index bcbabee9..904953ae 100644 --- a/src/providers/utils/tryInitAltSolana.ts +++ b/src/providers/utils/tryInitAltSolana.ts @@ -25,11 +25,13 @@ export async function tryInitTakerALT( chains: ChainId[], solanaClient: Solana.DlnClient, logger: Logger, - retries = 3, + retries = 5, ) { for (let i = 0; i < retries; i += 1) { + // WARN: initForTaket requires explicit payer (tx signer) and actual taker addresses + // On MPC feat activation initForTaker payer will be = helper wallet and taker = mpc address // eslint-disable-next-line no-await-in-loop -- Intentional because works only during initialization - const maybeTxs = await solanaClient.initForTaker(wallet.publicKey, chains); + const maybeTxs = await solanaClient.initForTaker(wallet.publicKey, wallet.publicKey, chains); if (!maybeTxs) { logger.info( `ALT already initialized or was found: ${solanaClient.fulfillPreswapALT!.toBase58()}`,