@pushchain/core 5.1.12 → 5.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/orchestrator/internals/confirmation.js +2 -2
- package/src/lib/orchestrator/internals/execute-standard.js +25 -3
- package/src/lib/orchestrator/internals/outbound-sync.d.ts +3 -3
- package/src/lib/orchestrator/internals/outbound-sync.js +3 -3
- package/src/lib/push-chain/push-chain.js +0 -3
package/package.json
CHANGED
|
@@ -50,7 +50,7 @@ function waitForEvmConfirmationsWithCountdown(ctx, evmClient, txHash, confirmati
|
|
|
50
50
|
if (Date.now() - start > timeoutMs) {
|
|
51
51
|
throw new Error(`Timeout: transaction ${txHash} not confirmed with ${confirmations} confirmations within ${timeoutMs} ms`);
|
|
52
52
|
}
|
|
53
|
-
yield new Promise((r) => setTimeout(r,
|
|
53
|
+
yield new Promise((r) => setTimeout(r, 3000));
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
}
|
|
@@ -127,7 +127,7 @@ function waitForLockerFeeConfirmation(ctx, txHashBytes) {
|
|
|
127
127
|
if (Date.now() - start > timeout) {
|
|
128
128
|
throw new Error(`Timeout: fee-lock tx ${txHash} not confirmed with ${fastConfirmations} confirmations within ${timeout} ms`);
|
|
129
129
|
}
|
|
130
|
-
yield new Promise((r) => setTimeout(r,
|
|
130
|
+
yield new Promise((r) => setTimeout(r, 3000));
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
case enums_1.VM.SVM: {
|
|
@@ -53,6 +53,28 @@ function encodePayloadForOrigin(ctx, payload) {
|
|
|
53
53
|
}
|
|
54
54
|
return (0, signing_1.encodeUniversalPayload)(payload);
|
|
55
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Lazy variant of `encodePayloadForOrigin`. The encoded bytes only ride to
|
|
58
|
+
* the chain on the fee-locking branch (consumed by `lockFee` → origin
|
|
59
|
+
* gateway → relayer → `DecodeUniversalPayloadSolana`). On the non-fee-
|
|
60
|
+
* locking branch the bytes are placed into `req` but `req` is never sent —
|
|
61
|
+
* `sendUniversalTx` ships the proto-struct UniversalPayload via
|
|
62
|
+
* `MsgExecutePayload` instead.
|
|
63
|
+
*
|
|
64
|
+
* Skipping the encode on the non-fee-locking branch sidesteps the SVM
|
|
65
|
+
* encoder's u64 ceiling for the R2 SVM outbound recursive seam (Slack
|
|
66
|
+
* 2026-04-23 regression), which sets `execute.value = multicallNativeValue`
|
|
67
|
+
* — a wei-scale UPC budget that routinely exceeds 2^64 on thin pSOL/WPC
|
|
68
|
+
* pools. The chain decoder is u64-only, so we can't widen the wire format
|
|
69
|
+
* without coordinated chain work; this skip is the SDK-only fix that
|
|
70
|
+
* unblocks Riyanshu's case without changing the wire format.
|
|
71
|
+
*/
|
|
72
|
+
function encodePayloadForOriginIfNeeded(ctx, payload, feeLockingRequired) {
|
|
73
|
+
if (!feeLockingRequired) {
|
|
74
|
+
return '0x';
|
|
75
|
+
}
|
|
76
|
+
return encodePayloadForOrigin(ctx, payload);
|
|
77
|
+
}
|
|
56
78
|
function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks) {
|
|
57
79
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
80
|
var _a, _b, _c;
|
|
@@ -167,7 +189,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
|
|
|
167
189
|
}, helpers_1.bigintReplacer));
|
|
168
190
|
req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
|
|
169
191
|
recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
|
|
170
|
-
payload:
|
|
192
|
+
payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadForReq, feeLockingRequired),
|
|
171
193
|
});
|
|
172
194
|
}
|
|
173
195
|
else {
|
|
@@ -196,7 +218,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
|
|
|
196
218
|
}, helpers_1.bigintReplacer));
|
|
197
219
|
req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
|
|
198
220
|
recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
|
|
199
|
-
payload:
|
|
221
|
+
payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadOther, feeLockingRequired),
|
|
200
222
|
});
|
|
201
223
|
}
|
|
202
224
|
}
|
|
@@ -217,7 +239,7 @@ function executeStandardPayload(ctx, execute, eventBuffer, getResponseCallbacks)
|
|
|
217
239
|
}, helpers_1.bigintReplacer));
|
|
218
240
|
req = (0, payload_builder_1.buildUniversalTxRequest)(ctx.universalSigner.account.address, {
|
|
219
241
|
recipient: viem_1.zeroAddress, token: viem_1.zeroAddress, amount: BigInt(0),
|
|
220
|
-
payload:
|
|
242
|
+
payload: encodePayloadForOriginIfNeeded(ctx, universalPayloadSelf, feeLockingRequired),
|
|
221
243
|
});
|
|
222
244
|
}
|
|
223
245
|
}
|
|
@@ -8,9 +8,9 @@ import { CHAIN } from '../../constants/enums';
|
|
|
8
8
|
import type { CascadeHopInfo, WaitForOutboundOptions, OutboundTxDetails, TransactionRouteType } from '../orchestrator.types';
|
|
9
9
|
import type { OrchestratorContext } from './context';
|
|
10
10
|
/** Initial wait before the first poll (ms). */
|
|
11
|
-
export declare const OUTBOUND_INITIAL_WAIT_MS =
|
|
11
|
+
export declare const OUTBOUND_INITIAL_WAIT_MS = 15000;
|
|
12
12
|
/** Interval between consecutive polls (ms). */
|
|
13
|
-
export declare const OUTBOUND_POLL_INTERVAL_MS =
|
|
13
|
+
export declare const OUTBOUND_POLL_INTERVAL_MS = 3000;
|
|
14
14
|
/** Maximum total timeout for the outbound polling loop (ms). */
|
|
15
15
|
export declare const OUTBOUND_MAX_TIMEOUT_MS = 180000;
|
|
16
16
|
/** Maximum total timeout for the R3 inbound round-trip polling loop (ms). */
|
|
@@ -49,7 +49,7 @@ export declare class OutboundFailedError extends Error {
|
|
|
49
49
|
* @internal Used by .wait() for outbound routes - not part of public API.
|
|
50
50
|
* Uses polling with configurable initial wait, interval, and timeout.
|
|
51
51
|
*
|
|
52
|
-
* Default strategy:
|
|
52
|
+
* Default strategy: 15s initial wait, then poll every 3s, 180s total timeout.
|
|
53
53
|
*
|
|
54
54
|
* @param ctx - Orchestrator context
|
|
55
55
|
* @param pushChainTxHash - The Push Chain transaction hash
|
|
@@ -23,9 +23,9 @@ const outbound_tracker_1 = require("./outbound-tracker");
|
|
|
23
23
|
// Outbound sync configuration constants
|
|
24
24
|
// ============================================================================
|
|
25
25
|
/** Initial wait before the first poll (ms). */
|
|
26
|
-
exports.OUTBOUND_INITIAL_WAIT_MS =
|
|
26
|
+
exports.OUTBOUND_INITIAL_WAIT_MS = 15000; // 15s
|
|
27
27
|
/** Interval between consecutive polls (ms). */
|
|
28
|
-
exports.OUTBOUND_POLL_INTERVAL_MS =
|
|
28
|
+
exports.OUTBOUND_POLL_INTERVAL_MS = 3000; // 3s
|
|
29
29
|
/** Maximum total timeout for the outbound polling loop (ms). */
|
|
30
30
|
exports.OUTBOUND_MAX_TIMEOUT_MS = 180000; // 180s (3 min)
|
|
31
31
|
/** Maximum total timeout for the R3 inbound round-trip polling loop (ms). */
|
|
@@ -132,7 +132,7 @@ function verifyExternalEvmReceipt(ctx, destinationChain, externalTxHash) {
|
|
|
132
132
|
* @internal Used by .wait() for outbound routes - not part of public API.
|
|
133
133
|
* Uses polling with configurable initial wait, interval, and timeout.
|
|
134
134
|
*
|
|
135
|
-
* Default strategy:
|
|
135
|
+
* Default strategy: 15s initial wait, then poll every 3s, 180s total timeout.
|
|
136
136
|
*
|
|
137
137
|
* @param ctx - Orchestrator context
|
|
138
138
|
* @param pushChainTxHash - The Push Chain transaction hash
|
|
@@ -82,9 +82,6 @@ class PushChain {
|
|
|
82
82
|
return orchestrator.execute.bind(orchestrator)(...args);
|
|
83
83
|
},
|
|
84
84
|
prepareTransaction: (params) => {
|
|
85
|
-
if (this.isReadMode) {
|
|
86
|
-
throw new Error('Read only mode cannot call prepareTransaction function');
|
|
87
|
-
}
|
|
88
85
|
return orchestrator.prepareTransaction.bind(orchestrator)(params);
|
|
89
86
|
},
|
|
90
87
|
executeTransactions: (txs) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|