@across-protocol/sdk 4.1.8 → 4.1.9
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/dist/cjs/clients/BundleDataClient/BundleDataClient.js +54 -49
- package/dist/cjs/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/cjs/clients/HubPoolClient.js +1 -5
- package/dist/cjs/clients/HubPoolClient.js.map +1 -1
- package/dist/cjs/clients/SpokePoolClient.d.ts +1 -3
- package/dist/cjs/clients/SpokePoolClient.js +19 -12
- package/dist/cjs/clients/SpokePoolClient.js.map +1 -1
- package/dist/cjs/constants.d.ts +0 -1
- package/dist/cjs/constants.js +1 -2
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/interfaces/HubPool.d.ts +1 -4
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js +3 -2
- package/dist/cjs/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/cjs/utils/BlockUtils.js +1 -1
- package/dist/cjs/utils/BlockUtils.js.map +1 -1
- package/dist/cjs/utils/CachingUtils.js +3 -3
- package/dist/cjs/utils/CachingUtils.js.map +1 -1
- package/dist/cjs/utils/LogUtils.d.ts +0 -1
- package/dist/cjs/utils/LogUtils.js +1 -7
- package/dist/cjs/utils/LogUtils.js.map +1 -1
- package/dist/cjs/utils/NetworkUtils.js +1 -1
- package/dist/cjs/utils/NetworkUtils.js.map +1 -1
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js +43 -39
- package/dist/esm/clients/BundleDataClient/BundleDataClient.js.map +1 -1
- package/dist/esm/clients/HubPoolClient.js +1 -5
- package/dist/esm/clients/HubPoolClient.js.map +1 -1
- package/dist/esm/clients/SpokePoolClient.d.ts +3 -5
- package/dist/esm/clients/SpokePoolClient.js +22 -15
- package/dist/esm/clients/SpokePoolClient.js.map +1 -1
- package/dist/esm/constants.d.ts +0 -1
- package/dist/esm/constants.js +0 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/interfaces/HubPool.d.ts +1 -4
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js +2 -1
- package/dist/esm/relayFeeCalculator/chain-queries/baseQuery.js.map +1 -1
- package/dist/esm/utils/BlockUtils.js +1 -1
- package/dist/esm/utils/BlockUtils.js.map +1 -1
- package/dist/esm/utils/CachingUtils.js +1 -1
- package/dist/esm/utils/CachingUtils.js.map +1 -1
- package/dist/esm/utils/LogUtils.d.ts +0 -7
- package/dist/esm/utils/LogUtils.js +0 -11
- package/dist/esm/utils/LogUtils.js.map +1 -1
- package/dist/esm/utils/NetworkUtils.js +1 -1
- package/dist/esm/utils/NetworkUtils.js.map +1 -1
- package/dist/types/clients/BundleDataClient/BundleDataClient.d.ts.map +1 -1
- package/dist/types/clients/HubPoolClient.d.ts.map +1 -1
- package/dist/types/clients/SpokePoolClient.d.ts +3 -5
- package/dist/types/clients/SpokePoolClient.d.ts.map +1 -1
- package/dist/types/constants.d.ts +0 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/interfaces/HubPool.d.ts +1 -4
- package/dist/types/interfaces/HubPool.d.ts.map +1 -1
- package/dist/types/relayFeeCalculator/chain-queries/baseQuery.d.ts.map +1 -1
- package/dist/types/utils/LogUtils.d.ts +0 -7
- package/dist/types/utils/LogUtils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/clients/BundleDataClient/BundleDataClient.ts +48 -63
- package/src/clients/HubPoolClient.ts +1 -5
- package/src/clients/SpokePoolClient.ts +10 -11
- package/src/constants.ts +0 -2
- package/src/interfaces/HubPool.ts +1 -4
- package/src/relayFeeCalculator/chain-queries/baseQuery.ts +1 -1
- package/src/utils/BlockUtils.ts +1 -1
- package/src/utils/CachingUtils.ts +1 -1
- package/src/utils/LogUtils.ts +0 -12
- package/src/utils/NetworkUtils.ts +1 -1
|
@@ -54,7 +54,6 @@ export interface ExecutedRootBundle extends SortableEvent {
|
|
|
54
54
|
bundleLpFees: BigNumber[];
|
|
55
55
|
netSendAmounts: BigNumber[];
|
|
56
56
|
runningBalances: BigNumber[];
|
|
57
|
-
incentiveBalances: BigNumber[];
|
|
58
57
|
leafId: number;
|
|
59
58
|
l1Tokens: string[];
|
|
60
59
|
proof: string[];
|
|
@@ -62,17 +61,15 @@ export interface ExecutedRootBundle extends SortableEvent {
|
|
|
62
61
|
|
|
63
62
|
export type ExecutedRootBundleStringified = Omit<
|
|
64
63
|
ExecutedRootBundle,
|
|
65
|
-
"bundleLpFees" | "netSendAmounts" | "runningBalances"
|
|
64
|
+
"bundleLpFees" | "netSendAmounts" | "runningBalances"
|
|
66
65
|
> & {
|
|
67
66
|
bundleLpFees: string[];
|
|
68
67
|
netSendAmounts: string[];
|
|
69
68
|
runningBalances: string[];
|
|
70
|
-
incentiveBalances: string[];
|
|
71
69
|
};
|
|
72
70
|
|
|
73
71
|
export type TokenRunningBalance = {
|
|
74
72
|
runningBalance: BigNumber;
|
|
75
|
-
incentiveBalance: BigNumber;
|
|
76
73
|
};
|
|
77
74
|
|
|
78
75
|
export interface RelayerRefundLeafWithGroup extends RelayerRefundLeaf {
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
BigNumber,
|
|
14
14
|
toBNWei,
|
|
15
15
|
bnZero,
|
|
16
|
-
assert,
|
|
17
16
|
chainIsOPStack,
|
|
18
17
|
fixedPointAdjustment,
|
|
19
18
|
} from "../../utils";
|
|
19
|
+
import assert from "assert";
|
|
20
20
|
import { Logger, QueryInterface } from "../relayFeeCalculator";
|
|
21
21
|
import { Transport } from "viem";
|
|
22
22
|
import { getGasPriceEstimate } from "../../gasPriceOracle/oracle";
|
package/src/utils/BlockUtils.ts
CHANGED
|
@@ -34,11 +34,11 @@ const defaultHighBlockOffset = 10;
|
|
|
34
34
|
const cacheTTL = 60 * 15;
|
|
35
35
|
const now = getCurrentTime(); // Seed the cache with initial values.
|
|
36
36
|
const blockTimes: { [chainId: number]: BlockTimeAverage } = {
|
|
37
|
-
[CHAIN_IDs.DOCTOR_WHO]: { average: 1, timestamp: now, blockRange: 1 },
|
|
38
37
|
[CHAIN_IDs.INK]: { average: 1, timestamp: now, blockRange: 1 },
|
|
39
38
|
[CHAIN_IDs.LINEA]: { average: 3, timestamp: now, blockRange: 1 },
|
|
40
39
|
[CHAIN_IDs.MAINNET]: { average: 12.5, timestamp: now, blockRange: 1 },
|
|
41
40
|
[CHAIN_IDs.OPTIMISM]: { average: 2, timestamp: now, blockRange: 1 },
|
|
41
|
+
[CHAIN_IDs.UNICHAIN]: { average: 1, timestamp: now, blockRange: 1 },
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_CACHING_SAFE_LAG, DEFAULT_CACHING_TTL } from "../constants";
|
|
2
2
|
import { CachingMechanismInterface, Deposit, Fill, SlowFillRequest } from "../interfaces";
|
|
3
|
-
import
|
|
3
|
+
import assert from "assert";
|
|
4
4
|
import { composeRevivers, objectWithBigNumberReviver } from "./ReviverUtils";
|
|
5
5
|
import { getRelayEventKey } from "./SpokeUtils";
|
|
6
6
|
import { getCurrentTime } from "./TimeUtils";
|
package/src/utils/LogUtils.ts
CHANGED
|
@@ -24,15 +24,3 @@ export function formattedLog(
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Asserts the truth of a condition. If the condition is false, an error is thrown with the provided message.
|
|
30
|
-
* @param condition The condition to assert.
|
|
31
|
-
* @param message The message to throw if the condition is false.
|
|
32
|
-
* @throws Error if the condition is false.
|
|
33
|
-
*/
|
|
34
|
-
export function assert(condition: boolean, message: string): void {
|
|
35
|
-
if (!condition) {
|
|
36
|
-
throw new Error(message);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -144,9 +144,9 @@ export function chainIsCCTPEnabled(chainId: number): boolean {
|
|
|
144
144
|
// Mainnets
|
|
145
145
|
CHAIN_IDs.ARBITRUM,
|
|
146
146
|
CHAIN_IDs.BASE,
|
|
147
|
-
CHAIN_IDs.DOCTOR_WHO,
|
|
148
147
|
CHAIN_IDs.OPTIMISM,
|
|
149
148
|
CHAIN_IDs.POLYGON,
|
|
149
|
+
CHAIN_IDs.UNICHAIN,
|
|
150
150
|
// Testnets
|
|
151
151
|
CHAIN_IDs.BASE_SEPOLIA,
|
|
152
152
|
CHAIN_IDs.OPTIMISM_SEPOLIA,
|